Skip to content

Commit b716ae6

Browse files
committed
Add test back.
1 parent 9781a0d commit b716ae6

File tree

4 files changed

+10
-8
lines changed

4 files changed

+10
-8
lines changed

flink-cdc-connect/flink-cdc-source-connectors/flink-connector-oracle-cdc/src/test/java/org/apache/flink/cdc/connectors/oracle/source/NewlyAddedTableITCase.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919

2020
import org.apache.flink.cdc.connectors.oracle.testutils.OracleTestUtils.FailoverPhase;
2121
import org.apache.flink.cdc.connectors.oracle.testutils.OracleTestUtils.FailoverType;
22+
import org.apache.flink.cdc.connectors.utils.TestValuesHelper;
2223
import org.apache.flink.configuration.Configuration;
2324
import org.apache.flink.configuration.StateRecoveryOptions;
2425
import org.apache.flink.core.execution.JobClient;
@@ -686,7 +687,7 @@ private void testNewlyAddedTableOneByOne(
686687
}
687688
fetchedDataList.addAll(expectedSnapshotDataThisRound);
688689
waitForUpsertSinkSize("sink", fetchedDataList.size());
689-
assertEqualsInAnyOrder(fetchedDataList, TestValuesSinkHelper.getUpsertResults("sink"));
690+
assertEqualsInAnyOrder(fetchedDataList, TestValuesHelper.getUpsertResults("sink"));
690691
// Wait 1s until snapshot phase finished, make sure the binlog data is not lost.
691692
Thread.sleep(1000L);
692693

@@ -729,7 +730,7 @@ private void testNewlyAddedTableOneByOne(
729730
// the result size of sink may arrive fetchedDataList.size() with old data, wait one
730731
// checkpoint to wait retract old record and send new record
731732
Thread.sleep(1000);
732-
assertEqualsInAnyOrder(fetchedDataList, TestValuesSinkHelper.getUpsertResults("sink"));
733+
assertEqualsInAnyOrder(fetchedDataList, TestValuesHelper.getUpsertResults("sink"));
733734

734735
// step 6: trigger savepoint
735736
if (round != captureAddressTables.length - 1) {

flink-cdc-connect/flink-cdc-source-connectors/flink-connector-oracle-cdc/src/test/java/org/apache/flink/cdc/connectors/oracle/testutils/OracleTestUtils.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
package org.apache.flink.cdc.connectors.oracle.testutils;
1919

2020
import org.apache.flink.api.common.JobID;
21-
import org.apache.flink.cdc.connectors.oracle.source.TestValuesSinkHelper;
21+
import org.apache.flink.cdc.connectors.utils.TestValuesHelper;
2222
import org.apache.flink.runtime.highavailability.nonha.embedded.EmbeddedHaServices;
2323
import org.apache.flink.runtime.highavailability.nonha.embedded.HaLeadershipControl;
2424
import org.apache.flink.runtime.minicluster.MiniCluster;
@@ -119,7 +119,7 @@ public static void waitForUpsertSinkSize(String sinkName, int expectedSize)
119119
public static int upsertSinkSize(String sinkName) {
120120
synchronized (TestValuesTableFactory.class) {
121121
try {
122-
return TestValuesSinkHelper.getUpsertResults(sinkName).size();
122+
return TestValuesHelper.getUpsertResults(sinkName).size();
123123
} catch (IllegalArgumentException e) {
124124
// job is not started yet
125125
return 0;

flink-cdc-connect/flink-cdc-source-connectors/flink-connector-postgres-cdc/src/test/java/org/apache/flink/cdc/connectors/postgres/source/NewlyAddedTableITCase.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
import org.apache.flink.cdc.connectors.postgres.testutils.PostgresTestUtils;
2222
import org.apache.flink.cdc.connectors.postgres.testutils.UniqueDatabase;
2323
import org.apache.flink.cdc.connectors.utils.ExternalResourceProxy;
24+
import org.apache.flink.cdc.connectors.utils.TestValuesHelper;
2425
import org.apache.flink.configuration.Configuration;
2526
import org.apache.flink.configuration.StateRecoveryOptions;
2627
import org.apache.flink.core.execution.JobClient;
@@ -724,7 +725,7 @@ private void testNewlyAddedTableOneByOne(
724725
}
725726
fetchedDataList.addAll(expectedSnapshotDataThisRound);
726727
PostgresTestUtils.waitForUpsertSinkSize("sink", fetchedDataList.size());
727-
assertEqualsInAnyOrder(fetchedDataList, TestValuesSinkHelper.getUpsertResults("sink"));
728+
assertEqualsInAnyOrder(fetchedDataList, TestValuesHelper.getUpsertResults("sink"));
728729
// Wait 1s until snapshot phase finished, make sure the binlog data is not lost.
729730
Thread.sleep(1000L);
730731

@@ -767,7 +768,7 @@ private void testNewlyAddedTableOneByOne(
767768
// the result size of sink may arrive fetchedDataList.size() with old data, wait one
768769
// checkpoint to wait retract old record and send new record
769770
Thread.sleep(1000);
770-
assertEqualsInAnyOrder(fetchedDataList, TestValuesSinkHelper.getUpsertResults("sink"));
771+
assertEqualsInAnyOrder(fetchedDataList, TestValuesHelper.getUpsertResults("sink"));
771772

772773
// step 6: trigger savepoint
773774
if (round != captureAddressTables.length - 1) {

flink-cdc-connect/flink-cdc-source-connectors/flink-connector-postgres-cdc/src/test/java/org/apache/flink/cdc/connectors/postgres/testutils/PostgresTestUtils.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
package org.apache.flink.cdc.connectors.postgres.testutils;
1919

2020
import org.apache.flink.api.common.JobID;
21-
import org.apache.flink.cdc.connectors.postgres.source.TestValuesSinkHelper;
21+
import org.apache.flink.cdc.connectors.utils.TestValuesHelper;
2222
import org.apache.flink.runtime.highavailability.nonha.embedded.EmbeddedHaServices;
2323
import org.apache.flink.runtime.highavailability.nonha.embedded.HaLeadershipControl;
2424
import org.apache.flink.runtime.minicluster.MiniCluster;
@@ -111,7 +111,7 @@ public static void waitForUpsertSinkSize(String sinkName, int expectedSize)
111111
public static int upsertSinkSize(String sinkName) {
112112
synchronized (TestValuesTableFactory.class) {
113113
try {
114-
return TestValuesSinkHelper.getUpsertResults(sinkName).size();
114+
return TestValuesHelper.getUpsertResults(sinkName).size();
115115
} catch (IllegalArgumentException e) {
116116
// job is not started yet
117117
return 0;

0 commit comments

Comments
 (0)