|
|
|
@ -84,8 +84,8 @@ public class PolardbxSourceITCase extends PolardbxSourceTestBase {
|
|
|
|
|
+ " 'server-time-zone' = 'UTC',"
|
|
|
|
|
+ " 'server-id' = '%s'"
|
|
|
|
|
+ ")",
|
|
|
|
|
HOST_NAME,
|
|
|
|
|
PORT,
|
|
|
|
|
getHost(),
|
|
|
|
|
getPort(),
|
|
|
|
|
USER_NAME,
|
|
|
|
|
PASSWORD,
|
|
|
|
|
DATABASE,
|
|
|
|
@ -110,7 +110,8 @@ public class PolardbxSourceITCase extends PolardbxSourceTestBase {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
List<String> realSnapshotData =
|
|
|
|
|
fetchAndConvert(iterator, expectedSnapshotData.size(), Row::toString);
|
|
|
|
|
fetchAndConvert(
|
|
|
|
|
iterator, expectedSnapshotData.size(), WAITING_TIMEOUT, Row::toString);
|
|
|
|
|
assertEqualsInAnyOrder(expectedSnapshotData, realSnapshotData);
|
|
|
|
|
|
|
|
|
|
// second step: check the sink data
|
|
|
|
@ -157,7 +158,8 @@ public class PolardbxSourceITCase extends PolardbxSourceTestBase {
|
|
|
|
|
for (int i = 0; i < captureCustomerTables.length; i++) {
|
|
|
|
|
expectedBinlogData.addAll(Arrays.asList(expectedBinlog));
|
|
|
|
|
}
|
|
|
|
|
List<String> realBinlog = fetchAndConvert(iterator, expectedBinlog.length, Row::toString);
|
|
|
|
|
List<String> realBinlog =
|
|
|
|
|
fetchAndConvert(iterator, expectedBinlog.length, WAITING_TIMEOUT, Row::toString);
|
|
|
|
|
assertEqualsInOrder(expectedBinlogData, realBinlog);
|
|
|
|
|
tableResult.getJobClient().get().cancel().get();
|
|
|
|
|
}
|
|
|
|
@ -236,8 +238,8 @@ public class PolardbxSourceITCase extends PolardbxSourceTestBase {
|
|
|
|
|
+ " 'server-time-zone' = 'UTC',"
|
|
|
|
|
+ " 'server-id' = '%s'"
|
|
|
|
|
+ ")",
|
|
|
|
|
HOST_NAME,
|
|
|
|
|
PORT,
|
|
|
|
|
getHost(),
|
|
|
|
|
getPort(),
|
|
|
|
|
USER_NAME,
|
|
|
|
|
PASSWORD,
|
|
|
|
|
DATABASE,
|
|
|
|
@ -247,7 +249,8 @@ public class PolardbxSourceITCase extends PolardbxSourceTestBase {
|
|
|
|
|
|
|
|
|
|
TableResult tableResult = tEnv.executeSql("select * from polardbx_full_types");
|
|
|
|
|
CloseableIterator<Row> iterator = tableResult.collect();
|
|
|
|
|
List<String> realSnapshotData = fetchAndConvert(iterator, 1, Row::toString);
|
|
|
|
|
List<String> realSnapshotData =
|
|
|
|
|
fetchAndConvert(iterator, 1, WAITING_TIMEOUT, Row::toString);
|
|
|
|
|
String[] expectedSnapshotData =
|
|
|
|
|
new String[] {
|
|
|
|
|
"+I[100001, 127, 255, 32767, 65535, 8388607, 16777215, 2147483647, 4294967295, 2147483647, "
|
|
|
|
@ -303,8 +306,8 @@ public class PolardbxSourceITCase extends PolardbxSourceTestBase {
|
|
|
|
|
+ " 'server-time-zone' = 'UTC',"
|
|
|
|
|
+ " 'server-id' = '%s'"
|
|
|
|
|
+ ")",
|
|
|
|
|
HOST_NAME,
|
|
|
|
|
PORT,
|
|
|
|
|
getHost(),
|
|
|
|
|
getPort(),
|
|
|
|
|
USER_NAME,
|
|
|
|
|
PASSWORD,
|
|
|
|
|
DATABASE,
|
|
|
|
@ -329,7 +332,8 @@ public class PolardbxSourceITCase extends PolardbxSourceTestBase {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
List<String> realSnapshotData =
|
|
|
|
|
fetchAndConvert(iterator, expectedSnapshotData.size(), Row::toString);
|
|
|
|
|
fetchAndConvert(
|
|
|
|
|
iterator, expectedSnapshotData.size(), WAITING_TIMEOUT, Row::toString);
|
|
|
|
|
assertEqualsInAnyOrder(expectedSnapshotData, realSnapshotData);
|
|
|
|
|
|
|
|
|
|
// second step: check the sink data
|
|
|
|
@ -378,7 +382,8 @@ public class PolardbxSourceITCase extends PolardbxSourceTestBase {
|
|
|
|
|
"+I[7, 9999, 9999, 1007, 2022-01-17T00:00]",
|
|
|
|
|
"-D[7, 9999, 9999, 1007, 2022-01-17T00:00]"
|
|
|
|
|
};
|
|
|
|
|
List<String> realBinlog = fetchAndConvert(iterator, expectedBinlog.length, Row::toString);
|
|
|
|
|
List<String> realBinlog =
|
|
|
|
|
fetchAndConvert(iterator, expectedBinlog.length, WAITING_TIMEOUT, Row::toString);
|
|
|
|
|
assertEqualsInAnyOrder(Arrays.asList(expectedBinlog), realBinlog);
|
|
|
|
|
tableResult.getJobClient().get().cancel().get();
|
|
|
|
|
}
|
|
|
|
|