DBZ-8134 Fix parsing of server ID

This commit is contained in:
Vojtech Juranek 2024-08-12 12:29:14 +02:00 committed by Jiri Pechanec
parent 7c8be7c517
commit d2877ee641
2 changed files with 12 additions and 1 deletions

View File

@ -832,7 +832,7 @@ public String getPassword() {
* @return the database cluster server unique identifier
*/
public long getServerId() {
return config.getInteger(SERVER_ID);
return config.getLong(SERVER_ID);
}
/**

View File

@ -2699,6 +2699,17 @@ public void shouldEmitTruncateOperation() throws Exception {
stopConnector();
}
@Test
@FixFor("DBZ-8134")
public void shouldAcceptLongAsServerId() throws InterruptedException {
Configuration config = DATABASE.defaultConfig()
.with(BinlogConnectorConfig.SERVER_ID, "202309181059")
.build();
start(getConnectorClass(), config);
waitForStreamingRunning(DATABASE.getServerName());
stopConnector();
}
protected String getExpectedQuery(String statement) {
return statement;