From fadd831f5581409a870752aa383fea11ea1ebab2 Mon Sep 17 00:00:00 2001 From: Eric Giffon Date: Thu, 17 Oct 2024 14:23:11 +0200 Subject: SONAR-22871 Fix CLOB type assertions --- .../src/testFixtures/java/org/sonar/db/AbstractDbTester.java | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'server') diff --git a/server/sonar-db-core/src/testFixtures/java/org/sonar/db/AbstractDbTester.java b/server/sonar-db-core/src/testFixtures/java/org/sonar/db/AbstractDbTester.java index 783c296128b..39807031d67 100644 --- a/server/sonar-db-core/src/testFixtures/java/org/sonar/db/AbstractDbTester.java +++ b/server/sonar-db-core/src/testFixtures/java/org/sonar/db/AbstractDbTester.java @@ -63,6 +63,7 @@ import static com.google.common.collect.Lists.asList; import static java.sql.Types.BIGINT; import static java.sql.Types.BIT; import static java.sql.Types.BOOLEAN; +import static java.sql.Types.CLOB; import static java.sql.Types.DECIMAL; import static java.sql.Types.DOUBLE; import static java.sql.Types.INTEGER; @@ -77,13 +78,15 @@ public class AbstractDbTester extends ExternalResource { private static final Pattern INDEX_NAME_PATTERN = Pattern.compile("COALESCE\\(([\\w_]*),"); - private static final Map POSTGRES_TYPE_SUBSTITUTION = Map.of(BOOLEAN, BIT, - DOUBLE, NUMERIC); + private static final Map POSTGRES_TYPE_SUBSTITUTION = Map.of( + BOOLEAN, BIT, + DOUBLE, NUMERIC, + CLOB, VARCHAR); private static final Map MSSQL_TYPE_SUBSTITUTION = Map.of( BOOLEAN, BIT, VARCHAR, NVARCHAR, - DOUBLE, DECIMAL); - + DOUBLE, DECIMAL, + CLOB, NVARCHAR); private static final Map ORACLE_TYPE_SUBSTITUTION = Map.of( BOOLEAN, NUMERIC, BIGINT, NUMERIC, -- cgit v1.2.3