Skip to content

Commit

Permalink
Added test to cover RENAME table with database.override.map
Browse files Browse the repository at this point in the history
  • Loading branch information
subkanthi committed Oct 9, 2024
1 parent aa0945e commit a5ec2af
Showing 1 changed file with 9 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,15 @@ public void testDatabaseOverride() throws Exception {
assertTrue(customersCol2 == 1);



Thread.sleep(10000);
// Execute the query in MySQL to rename table.
conn.prepareStatement("rename table products.prodtable to products.prodtable2").execute();
Thread.sleep(10000);
ResultSet customersVersionResult2 = writer.executeQueryWithResultSet("select col2 from customers.custtable2 final where col1 = 'a'");

Check failure on line 155 in sink-connector-lightweight/src/test/java/com/altinity/clickhouse/debezium/embedded/cdc/DatabaseOverrideIT.java

View workflow job for this annotation

GitHub Actions / JUnit Test Report

DatabaseOverrideIT.testDatabaseOverride

Code: 60. DB::Exception: Unknown table expression identifier 'customers.custtable2' in scope SELECT col2 FROM customers.custtable2 FINAL WHERE col1 = 'a'. (UNKNOWN_TABLE) (version 24.9.2.42 (official build))
Raw output
java.sql.BatchUpdateException: 
Code: 60. DB::Exception: Unknown table expression identifier 'customers.custtable2' in scope SELECT col2 FROM customers.custtable2 FINAL WHERE col1 = 'a'. (UNKNOWN_TABLE) (version 24.9.2.42 (official build))

	at com.altinity.clickhouse.debezium.embedded.cdc.DatabaseOverrideIT.testDatabaseOverride(DatabaseOverrideIT.java:155)
while(customersVersionResult2.next()) {
customersCol2 = customersVersionResult2.getLong("col2");
}
assertTrue(customersCol2 == 2);
clickHouseDebeziumEmbeddedApplication.getDebeziumEventCapture().engine.close();

conn.close();
Expand Down

0 comments on commit a5ec2af

Please sign in to comment.