DBZ-2916 Fix test failures

This commit is contained in:
Chris Cranford 2021-05-18 13:53:43 -04:00
parent 2d87fa9b3d
commit a33af6a2d7
2 changed files with 15 additions and 14 deletions

View File

@ -160,7 +160,7 @@ void processResult(ResultSet resultSet) throws SQLException {
historyRecorder.record(scn, tableName, segOwner, operationCode, changeTime, txId, 0, redoSql); historyRecorder.record(scn, tableName, segOwner, operationCode, changeTime, txId, 0, redoSql);
LOGGER.info("DDL: {}, REDO_SQL: {}", logMessage, redoSql); LOGGER.info("DDL: {}, REDO_SQL: {}", logMessage, redoSql);
try { try {
assert tableName != null; if (tableName != null) {
final TableId tableId = RowMapper.getTableId(connectorConfig.getCatalogName(), resultSet); final TableId tableId = RowMapper.getTableId(connectorConfig.getCatalogName(), resultSet);
dispatcher.dispatchSchemaChangeEvent(tableId, dispatcher.dispatchSchemaChangeEvent(tableId,
new OracleSchemaChangeEventEmitter( new OracleSchemaChangeEventEmitter(
@ -174,6 +174,7 @@ void processResult(ResultSet resultSet) throws SQLException {
changeTime.toInstant(), changeTime.toInstant(),
streamingMetrics)); streamingMetrics));
} }
}
catch (InterruptedException e) { catch (InterruptedException e) {
throw new DebeziumException("Failed to dispatch DDL event", e); throw new DebeziumException("Failed to dispatch DDL event", e);
} }

View File

@ -1076,7 +1076,7 @@ public void shouldNotEmitDdlEventsForNonTableObjects() throws Exception {
Awaitility.await() Awaitility.await()
.atMost(TestHelper.defaultMessageConsumerPollTimeout(), TimeUnit.SECONDS) .atMost(TestHelper.defaultMessageConsumerPollTimeout(), TimeUnit.SECONDS)
.until(() -> { .until(() -> {
if (logInterceptor.countOccurrences("Processing DDL event ") == expected) { if (logInterceptor.countOccurrences("DDL: ") == expected) {
return true; return true;
} }
return false; return false;