DBZ-8114: start connector after altering schema to avoid having to stop and start it again for Informix

This commit is contained in:
Lars M Johansson 2024-08-05 15:32:36 +02:00 committed by Jiri Pechanec
parent 9780fe256e
commit da143ef8b2

View File

@ -211,7 +211,6 @@ public void shouldRespectJsonFormatAsString() throws Exception {
@Test @Test
@FixFor({ "DBZ-1169", "DBZ-3940" }) @FixFor({ "DBZ-1169", "DBZ-3940" })
public void shouldSupportAllFeatures() throws Exception { public void shouldSupportAllFeatures() throws Exception {
startConnectorWithNoSnapshot();
final StringBuilder placements = new StringBuilder(); final StringBuilder placements = new StringBuilder();
placements.append(envelope(getFieldSchemaVersion(), "eventVersion")).append(","); placements.append(envelope(getFieldSchemaVersion(), "eventVersion")).append(",");
@ -228,6 +227,8 @@ public void shouldSupportAllFeatures() throws Exception {
alterTableWithExtra4Fields(); alterTableWithExtra4Fields();
startConnectorWithNoSnapshot();
databaseConnection().execute(createInsert( databaseConnection().execute(createInsert(
"f9171eb6-19f3-4579-9206-0e179d2ebad7", "f9171eb6-19f3-4579-9206-0e179d2ebad7",
"UserUpdated", "UserUpdated",
@ -282,7 +283,6 @@ public void shouldSupportAllFeatures() throws Exception {
@Test @Test
@FixFor({ "DBZ-1707", "DBZ-3940" }) @FixFor({ "DBZ-1707", "DBZ-3940" })
public void shouldConvertMicrosecondsTimestampToMilliseconds() throws Exception { public void shouldConvertMicrosecondsTimestampToMilliseconds() throws Exception {
startConnectorWithNoSnapshot();
outboxEventRouter = new EventRouter<>(); outboxEventRouter = new EventRouter<>();
final Map<String, String> config = new HashMap<>(); final Map<String, String> config = new HashMap<>();
@ -291,6 +291,8 @@ public void shouldConvertMicrosecondsTimestampToMilliseconds() throws Exception
alterTableWithTimestampField(); alterTableWithTimestampField();
startConnectorWithNoSnapshot();
databaseConnection().execute(createInsert( databaseConnection().execute(createInsert(
"f9171eb6-19f3-4579-9206-0e179d2ebad7", "f9171eb6-19f3-4579-9206-0e179d2ebad7",
"UserUpdated", "UserUpdated",
@ -314,7 +316,6 @@ public void shouldConvertMicrosecondsTimestampToMilliseconds() throws Exception
@Test @Test
@FixFor({ "DBZ-1320", "DBZ-3940" }) @FixFor({ "DBZ-1320", "DBZ-3940" })
public void shouldNotProduceTombstoneEventForNullPayload() throws Exception { public void shouldNotProduceTombstoneEventForNullPayload() throws Exception {
startConnectorWithNoSnapshot();
final StringBuilder placements = new StringBuilder(); final StringBuilder placements = new StringBuilder();
placements.append(envelope(getFieldSchemaVersion(), "eventVersion")).append(","); placements.append(envelope(getFieldSchemaVersion(), "eventVersion")).append(",");
@ -332,6 +333,8 @@ public void shouldNotProduceTombstoneEventForNullPayload() throws Exception {
alterTableWithExtra4Fields(); alterTableWithExtra4Fields();
startConnectorWithNoSnapshot();
databaseConnection().execute(createInsert( databaseConnection().execute(createInsert(
"a9d76f78-bda6-48d3-97ed-13a146163218", "a9d76f78-bda6-48d3-97ed-13a146163218",
"UserUpdated", "UserUpdated",
@ -374,7 +377,6 @@ public void shouldNotProduceTombstoneEventForNullPayload() throws Exception {
@Test @Test
@FixFor({ "DBZ-1320", "DBZ-3940" }) @FixFor({ "DBZ-1320", "DBZ-3940" })
public void shouldProduceTombstoneEventForNullPayload() throws Exception { public void shouldProduceTombstoneEventForNullPayload() throws Exception {
startConnectorWithNoSnapshot();
final StringBuilder placements = new StringBuilder(); final StringBuilder placements = new StringBuilder();
placements.append(envelope(getFieldSchemaVersion(), "eventVersion")).append(","); placements.append(envelope(getFieldSchemaVersion(), "eventVersion")).append(",");
@ -393,6 +395,8 @@ public void shouldProduceTombstoneEventForNullPayload() throws Exception {
alterTableWithExtra4Fields(); alterTableWithExtra4Fields();
startConnectorWithNoSnapshot();
databaseConnection().execute(createInsert( databaseConnection().execute(createInsert(
"a9d76f78-bda6-48d3-97ed-13a146163218", "a9d76f78-bda6-48d3-97ed-13a146163218",
"UserUpdated", "UserUpdated",
@ -433,7 +437,6 @@ public void shouldProduceTombstoneEventForNullPayload() throws Exception {
@Test @Test
@FixFor({ "DBZ-1320", "DBZ-3940" }) @FixFor({ "DBZ-1320", "DBZ-3940" })
public void shouldProduceTombstoneEventForEmptyPayload() throws Exception { public void shouldProduceTombstoneEventForEmptyPayload() throws Exception {
startConnectorWithNoSnapshot();
outboxEventRouter = new EventRouter<>(); outboxEventRouter = new EventRouter<>();
final Map<String, String> config = new HashMap<>(); final Map<String, String> config = new HashMap<>();
@ -441,6 +444,9 @@ public void shouldProduceTombstoneEventForEmptyPayload() throws Exception {
outboxEventRouter.configure(config); outboxEventRouter.configure(config);
alterTableModifyPayload(); alterTableModifyPayload();
startConnectorWithNoSnapshot();
databaseConnection().execute(createInsert( databaseConnection().execute(createInsert(
"a9d76f78-bda6-48d3-97ed-13a146163218", "a9d76f78-bda6-48d3-97ed-13a146163218",
"UserUpdated", "UserUpdated",