Skip to content

Commit 0687d58

Browse files
tests[vitess-cdc]: Remove LegacyRowResource.INSTANCE usage
1 parent 5a64938 commit 0687d58

File tree

1 file changed

+10
-14
lines changed

1 file changed

+10
-14
lines changed

flink-connector-vitess-cdc/src/test/java/com/vervetica/cdc/connectors/vitess/table/VitessConnectorITCase.java

Lines changed: 10 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -23,13 +23,11 @@
2323
import org.apache.flink.table.api.TableResult;
2424
import org.apache.flink.table.api.bridge.java.StreamTableEnvironment;
2525
import org.apache.flink.table.planner.factories.TestValuesTableFactory;
26-
import org.apache.flink.table.utils.LegacyRowResource;
2726
import org.apache.flink.types.Row;
2827
import org.apache.flink.util.CloseableIterator;
2928

3029
import com.vervetica.cdc.connectors.vitess.VitessTestBase;
3130
import org.junit.Before;
32-
import org.junit.ClassRule;
3331
import org.junit.Test;
3432

3533
import java.sql.Connection;
@@ -55,8 +53,6 @@ public class VitessConnectorITCase extends VitessTestBase {
5553
env,
5654
EnvironmentSettings.newInstance().useBlinkPlanner().inStreamingMode().build());
5755

58-
@ClassRule public static LegacyRowResource usesLegacyRows = LegacyRowResource.INSTANCE;
59-
6056
@Before
6157
public void before() {
6258
TestValuesTableFactory.clearAllData();
@@ -143,13 +139,13 @@ public void testConsumingAllEvents()
143139

144140
List<String> expected =
145141
Arrays.asList(
146-
"scooter,3.140",
147-
"car battery,8.100",
148-
"12-pack drill bits,0.800",
149-
"hammer,2.625",
150-
"rocks,5.100",
151-
"jacket,0.600",
152-
"spare tire,22.200");
142+
"+I[scooter, 3.140]",
143+
"+I[car battery, 8.100]",
144+
"+I[12-pack drill bits, 0.800]",
145+
"+I[hammer, 2.625]",
146+
"+I[rocks, 5.100]",
147+
"+I[jacket, 0.600]",
148+
"+I[spare tire, 22.200]");
153149

154150
List<String> actual = TestValuesTableFactory.getResults("sink");
155151
assertEqualsInAnyOrder(expected, actual);
@@ -223,9 +219,9 @@ public void testAllTypes() throws Throwable {
223219

224220
List<String> expected =
225221
Arrays.asList(
226-
"1,127,255,32767,65535,2147483647,4294967295,2147483647,9223372036854775807,Hello World,abc,123.102,404.4443,123.4567,346,true",
227-
"1,127,255,32767,65535,2147483647,4294967295,2147483647,9223372036854775807,Hello World,abc,123.102,404.4443,123.4567,346,true",
228-
"1,127,255,32767,65535,2147483647,4294967295,2147483647,9223372036854775807,Bye World,abc,123.102,404.4443,123.4567,346,true");
222+
"+I[1, 127, 255, 32767, 65535, 2147483647, 4294967295, 2147483647, 9223372036854775807, Hello World, abc, 123.102, 404.4443, 123.4567, 346, true]",
223+
"-U[1, 127, 255, 32767, 65535, 2147483647, 4294967295, 2147483647, 9223372036854775807, Hello World, abc, 123.102, 404.4443, 123.4567, 346, true]",
224+
"+U[1, 127, 255, 32767, 65535, 2147483647, 4294967295, 2147483647, 9223372036854775807, Bye World, abc, 123.102, 404.4443, 123.4567, 346, true]");
229225

230226
List<String> actual = fetchRows(result.collect(), expected.size());
231227
assertEquals(expected, actual);

0 commit comments

Comments
 (0)