DBZ-3577 Fix race condition in shouldFailOnSchemaInconsistency test

This commit is contained in:
Kate 2021-07-27 15:34:27 -04:00 committed by Jiri Pechanec
parent 9b66ab374a
commit 6a30ad3811

View File

@ -558,10 +558,18 @@ private void inconsistentSchema(EventProcessingFailureHandlingMode mode) throws
final JdbcConnection connection = db.connect();
final Connection jdbc = connection.connection();
final Statement statement = jdbc.createStatement()) {
if (mode == null) {
waitForStreamingRunning("mysql", DATABASE.getServerName(), "streaming");
}
statement.executeUpdate("INSERT INTO customers VALUES (default,'John','Lazy','john.lazy@acme.com')");
}
waitForStreamingRunning("mysql", DATABASE.getServerName(), "streaming");
if (mode == null) {
waitForConnectorShutdown("mysql", DATABASE.getServerName());
}
else {
waitForStreamingRunning("mysql", DATABASE.getServerName(), "streaming");
}
stopConnector();
final Throwable e = exception.get();
if (e != null) {