DBZ-8035 Stabilize OracleMetricsIT tests
This commit is contained in:
parent
6977cb47a1
commit
110d3f38c1
@ -49,14 +49,14 @@ protected Configuration.Builder noSnapshot(Configuration.Builder config) {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void executeInsertStatements() throws SQLException {
|
protected void executeInsertStatements() throws SQLException {
|
||||||
connection.execute("INSERT INTO debezium.customer VALUES (NULL, 'Billie-Bob', 1234.56, TO_DATE('2018-02-22', 'yyyy-mm-dd'))");
|
connection.executeWithoutCommitting("INSERT INTO debezium.customer VALUES (NULL, 'Billie-Bob', 1234.56, TO_DATE('2018-02-22', 'yyyy-mm-dd'))");
|
||||||
connection.execute("INSERT INTO debezium.customer VALUES (NULL, 'Bruce', 2345.67, null)");
|
connection.executeWithoutCommitting("INSERT INTO debezium.customer VALUES (NULL, 'Bruce', 2345.67, null)");
|
||||||
connection.execute("COMMIT");
|
connection.execute("COMMIT");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected String tableName() {
|
protected String tableName() {
|
||||||
return "ORCLPDB1.DEBEZIUM.CUSTOMER";
|
return TestHelper.getDatabaseName() + ".DEBEZIUM.CUSTOMER";
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -125,6 +125,8 @@ public void testSnapshotAndStreamingMetrics() throws Exception {
|
|||||||
assertConnectorIsRunning();
|
assertConnectorIsRunning();
|
||||||
|
|
||||||
assertSnapshotMetrics();
|
assertSnapshotMetrics();
|
||||||
|
consumeRecords(2);
|
||||||
|
|
||||||
assertStreamingMetrics(false, expectedEvents());
|
assertStreamingMetrics(false, expectedEvents());
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -140,6 +142,7 @@ public void testSnapshotAndStreamingWithCustomMetrics() throws Exception {
|
|||||||
start(x -> x.with(CommonConnectorConfig.CUSTOM_METRIC_TAGS, "env=test,bu=bigdata"));
|
start(x -> x.with(CommonConnectorConfig.CUSTOM_METRIC_TAGS, "env=test,bu=bigdata"));
|
||||||
|
|
||||||
assertSnapshotWithCustomMetrics(customMetricTags);
|
assertSnapshotWithCustomMetrics(customMetricTags);
|
||||||
|
consumeRecords(2);
|
||||||
assertStreamingWithCustomMetrics(customMetricTags, expectedEvents());
|
assertStreamingWithCustomMetrics(customMetricTags, expectedEvents());
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -183,6 +186,7 @@ public void testPauseAndResumeAdvancedStreamingMetrics() throws Exception {
|
|||||||
|
|
||||||
invokeOperation(getMultiplePartitionStreamingMetricsObjectName(), "resume");
|
invokeOperation(getMultiplePartitionStreamingMetricsObjectName(), "resume");
|
||||||
insertRecords();
|
insertRecords();
|
||||||
|
consumeRecords(4);
|
||||||
assertAdvancedMetrics(4);
|
assertAdvancedMetrics(4);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user