From da143ef8b2e34e424a7b455fa56eb9e75f37a7b4 Mon Sep 17 00:00:00 2001 From: Lars M Johansson Date: Mon, 5 Aug 2024 15:32:36 +0200 Subject: [PATCH] DBZ-8114: start connector after altering schema to avoid having to stop and start it again for Informix --- .../outbox/AbstractEventRouterTest.java | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/debezium-embedded/src/test/java/io/debezium/transforms/outbox/AbstractEventRouterTest.java b/debezium-embedded/src/test/java/io/debezium/transforms/outbox/AbstractEventRouterTest.java index 4944d0243..fbb33f539 100644 --- a/debezium-embedded/src/test/java/io/debezium/transforms/outbox/AbstractEventRouterTest.java +++ b/debezium-embedded/src/test/java/io/debezium/transforms/outbox/AbstractEventRouterTest.java @@ -211,7 +211,6 @@ public void shouldRespectJsonFormatAsString() throws Exception { @Test @FixFor({ "DBZ-1169", "DBZ-3940" }) public void shouldSupportAllFeatures() throws Exception { - startConnectorWithNoSnapshot(); final StringBuilder placements = new StringBuilder(); placements.append(envelope(getFieldSchemaVersion(), "eventVersion")).append(","); @@ -228,6 +227,8 @@ public void shouldSupportAllFeatures() throws Exception { alterTableWithExtra4Fields(); + startConnectorWithNoSnapshot(); + databaseConnection().execute(createInsert( "f9171eb6-19f3-4579-9206-0e179d2ebad7", "UserUpdated", @@ -282,7 +283,6 @@ public void shouldSupportAllFeatures() throws Exception { @Test @FixFor({ "DBZ-1707", "DBZ-3940" }) public void shouldConvertMicrosecondsTimestampToMilliseconds() throws Exception { - startConnectorWithNoSnapshot(); outboxEventRouter = new EventRouter<>(); final Map config = new HashMap<>(); @@ -291,6 +291,8 @@ public void shouldConvertMicrosecondsTimestampToMilliseconds() throws Exception alterTableWithTimestampField(); + startConnectorWithNoSnapshot(); + databaseConnection().execute(createInsert( "f9171eb6-19f3-4579-9206-0e179d2ebad7", "UserUpdated", @@ -314,7 +316,6 @@ public void shouldConvertMicrosecondsTimestampToMilliseconds() throws Exception @Test @FixFor({ "DBZ-1320", "DBZ-3940" }) public void shouldNotProduceTombstoneEventForNullPayload() throws Exception { - startConnectorWithNoSnapshot(); final StringBuilder placements = new StringBuilder(); placements.append(envelope(getFieldSchemaVersion(), "eventVersion")).append(","); @@ -332,6 +333,8 @@ public void shouldNotProduceTombstoneEventForNullPayload() throws Exception { alterTableWithExtra4Fields(); + startConnectorWithNoSnapshot(); + databaseConnection().execute(createInsert( "a9d76f78-bda6-48d3-97ed-13a146163218", "UserUpdated", @@ -374,7 +377,6 @@ public void shouldNotProduceTombstoneEventForNullPayload() throws Exception { @Test @FixFor({ "DBZ-1320", "DBZ-3940" }) public void shouldProduceTombstoneEventForNullPayload() throws Exception { - startConnectorWithNoSnapshot(); final StringBuilder placements = new StringBuilder(); placements.append(envelope(getFieldSchemaVersion(), "eventVersion")).append(","); @@ -393,6 +395,8 @@ public void shouldProduceTombstoneEventForNullPayload() throws Exception { alterTableWithExtra4Fields(); + startConnectorWithNoSnapshot(); + databaseConnection().execute(createInsert( "a9d76f78-bda6-48d3-97ed-13a146163218", "UserUpdated", @@ -433,7 +437,6 @@ public void shouldProduceTombstoneEventForNullPayload() throws Exception { @Test @FixFor({ "DBZ-1320", "DBZ-3940" }) public void shouldProduceTombstoneEventForEmptyPayload() throws Exception { - startConnectorWithNoSnapshot(); outboxEventRouter = new EventRouter<>(); final Map config = new HashMap<>(); @@ -441,6 +444,9 @@ public void shouldProduceTombstoneEventForEmptyPayload() throws Exception { outboxEventRouter.configure(config); alterTableModifyPayload(); + + startConnectorWithNoSnapshot(); + databaseConnection().execute(createInsert( "a9d76f78-bda6-48d3-97ed-13a146163218", "UserUpdated",