Skip to content

Commit

Permalink
DBZ-4321 Fix test stability issues
Browse files Browse the repository at this point in the history
  • Loading branch information
Naros committed Dec 13, 2023
1 parent a5b8108 commit d7149ef
Showing 1 changed file with 15 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
*/
package io.debezium.connector.informix;

import java.util.concurrent.TimeUnit;

import org.junit.After;
import org.junit.Before;

Expand All @@ -25,6 +27,8 @@ public class InformixReselectColumnsProcessorIT extends AbstractReselectProcesso
@Before
public void beforeEach() throws Exception {
connection = TestHelper.testConnection();
connection.setAutoCommit(false);

initializeConnectorTestFramework();
Testing.Files.delete(TestHelper.SCHEMA_HISTORY_PATH);
super.beforeEach();
Expand Down Expand Up @@ -78,6 +82,7 @@ protected String reselectColumnsList() {

@Override
protected void createTable() throws Exception {
connection.execute("DROP TABLE IF EXISTS DBZ4321");
connection.execute("CREATE TABLE DBZ4321 (id int not null, data varchar(50), data2 int, primary key(id))");
}

Expand All @@ -97,7 +102,17 @@ protected String getInsertWithNullValue() {

@Override
protected void waitForStreamingStarted() throws InterruptedException {
waitForSnapshotToBeCompleted(TestHelper.TEST_CONNECTOR, TestHelper.TEST_DATABASE);
waitForStreamingRunning(TestHelper.TEST_CONNECTOR, TestHelper.TEST_DATABASE);
}

protected SourceRecords consumeRecordsByTopicReselectWhenNullStreaming() throws InterruptedException {
waitForAvailableRecords(10, TimeUnit.SECONDS);
return super.consumeRecordsByTopicReselectWhenNullStreaming();
}

protected SourceRecords consumeRecordsByTopicReselectWhenNotNullStreaming() throws InterruptedException {
waitForAvailableRecords(10, TimeUnit.SECONDS);
return super.consumeRecordsByTopicReselectWhenNotNullStreaming();
}
}

0 comments on commit d7149ef

Please sign in to comment.