From 9f5844da8b459f6477ad501f2a8cf5f6304f9981 Mon Sep 17 00:00:00 2001 From: Vojtech Juranek Date: Tue, 5 Nov 2024 11:02:24 +0100 Subject: [PATCH 1/3] DBZ-8381 Migrate Spanner testsuite to async engine --- .../connector/spanner/AbstractSpannerConnectorIT.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/test/java/io/debezium/connector/spanner/AbstractSpannerConnectorIT.java b/src/test/java/io/debezium/connector/spanner/AbstractSpannerConnectorIT.java index dc73231..e213fbf 100644 --- a/src/test/java/io/debezium/connector/spanner/AbstractSpannerConnectorIT.java +++ b/src/test/java/io/debezium/connector/spanner/AbstractSpannerConnectorIT.java @@ -12,10 +12,10 @@ import io.debezium.connector.spanner.util.Connection; import io.debezium.connector.spanner.util.Database; import io.debezium.connector.spanner.util.KafkaEnvironment; -import io.debezium.embedded.AbstractConnectorTest; +import io.debezium.embedded.async.AbstractAsyncEngineConnectorTest; import io.debezium.util.Testing; -public class AbstractSpannerConnectorIT extends AbstractConnectorTest { +public class AbstractSpannerConnectorIT extends AbstractAsyncEngineConnectorTest { private static final KafkaEnvironment KAFKA_ENVIRONMENT = new KafkaEnvironment( KafkaEnvironment.DOCKER_COMPOSE_FILE); From ff1b8b063c96531abfb09c85045f7a616ef623df Mon Sep 17 00:00:00 2001 From: Vojtech Juranek Date: Tue, 19 Nov 2024 12:40:47 +0100 Subject: [PATCH 2/3] DBZ-8381 Specify maxium number of tasks in testsuite Otherwise tests fail, see DBZ-8428 for more details. As we create and start more tasks now (before `EmbeddedEngine` actually started only one task), increase also wait time for records. --- .../debezium/connector/spanner/AbstractSpannerConnectorIT.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/test/java/io/debezium/connector/spanner/AbstractSpannerConnectorIT.java b/src/test/java/io/debezium/connector/spanner/AbstractSpannerConnectorIT.java index e213fbf..d994c2b 100644 --- a/src/test/java/io/debezium/connector/spanner/AbstractSpannerConnectorIT.java +++ b/src/test/java/io/debezium/connector/spanner/AbstractSpannerConnectorIT.java @@ -45,6 +45,7 @@ public class AbstractSpannerConnectorIT extends AbstractAsyncEngineConnectorTest .with("bootstrap.servers", KAFKA_ENVIRONMENT.kafkaBrokerApiOn().getAddress()) .with("heartbeat.interval.ms", "300000") .with("gcp.spanner.low-watermark.enabled", false) + .with("tasks.max", 3) // see DBZ-8428 .build(); protected static final Configuration basePgConfig = Configuration.copy(baseConfig) @@ -66,7 +67,7 @@ public static void after() throws InterruptedException { } public static int waitTimeForRecords() { - return Integer.parseInt(System.getProperty(TEST_PROPERTY_PREFIX + "records.waittime", "10")); + return Integer.parseInt(System.getProperty(TEST_PROPERTY_PREFIX + "records.waittime", "30")); } protected String getTopicName(Configuration config, String tableName) { From f6eadd3ca9804e566a43064475b70a698bed09db Mon Sep 17 00:00:00 2001 From: Vojtech Juranek Date: Tue, 19 Nov 2024 12:43:34 +0100 Subject: [PATCH 3/3] DBZ-8381 Remove DB2 specific logger setup --- src/test/resources/logback-test.xml | 6 ------ 1 file changed, 6 deletions(-) diff --git a/src/test/resources/logback-test.xml b/src/test/resources/logback-test.xml index a9ccf97..9a199d5 100644 --- a/src/test/resources/logback-test.xml +++ b/src/test/resources/logback-test.xml @@ -21,10 +21,4 @@ level="warn" additivity="false"> - - - -