DBZ-4004 Fix SQL Server test EventProcessingFailureHandlingIT

This commit is contained in:
Chris Cranford 2022-07-20 13:49:29 -04:00 committed by Chris Cranford
parent 2c2cb9213a
commit b7a4bbb183
2 changed files with 6 additions and 2 deletions

View File

@ -89,7 +89,7 @@ public void warn() throws Exception {
Awaitility.await()
.alias("Found warning message in logs")
.atMost(TestHelper.waitTimeForRecords(), TimeUnit.SECONDS).until(() -> {
.atMost(TestHelper.waitTimeForLogEntries(), TimeUnit.SECONDS).until(() -> {
return logInterceptor.containsWarnMessage("Error while processing event at offset {");
});
}
@ -151,7 +151,7 @@ public void fail() throws Exception {
Awaitility.await()
.alias("Found error message in logs")
.atMost(TestHelper.waitTimeForRecords(), TimeUnit.SECONDS).until(() -> {
.atMost(TestHelper.waitTimeForLogEntries(), TimeUnit.SECONDS).until(() -> {
boolean foundErrorMessageInLogs = logInterceptor.containsStacktraceElement("Error while processing event at offset {");
return foundErrorMessageInLogs && !engine.isRunning();
});

View File

@ -528,6 +528,10 @@ public static int waitTimeForRecords() {
return Integer.parseInt(System.getProperty(TEST_PROPERTY_PREFIX + "records.waittime", "5"));
}
public static int waitTimeForLogEntries() {
return Integer.parseInt(System.getProperty(TEST_PROPERTY_PREFIX + "log.waittime", "15"));
}
/**
* Utility method that will poll the CDC change tables and provide the record handler with the changes detected.
* The record handler can then make a determination as to whether to return {@code true} if the expected outcome