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

View File

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