From 3ba231d5b9aa4f8f23360c4a47351838148afe5b Mon Sep 17 00:00:00 2001 From: zhangliang Date: Thu, 2 Nov 2023 23:17:30 +0800 Subject: [PATCH] Fix test case --- .../mysql/ingest/MySQLIncrementalDumperTest.java | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/kernel/data-pipeline/dialect/mysql/src/test/java/org/apache/shardingsphere/data/pipeline/mysql/ingest/MySQLIncrementalDumperTest.java b/kernel/data-pipeline/dialect/mysql/src/test/java/org/apache/shardingsphere/data/pipeline/mysql/ingest/MySQLIncrementalDumperTest.java index 1426037ebdd50..86e373b2f7d4e 100644 --- a/kernel/data-pipeline/dialect/mysql/src/test/java/org/apache/shardingsphere/data/pipeline/mysql/ingest/MySQLIncrementalDumperTest.java +++ b/kernel/data-pipeline/dialect/mysql/src/test/java/org/apache/shardingsphere/data/pipeline/mysql/ingest/MySQLIncrementalDumperTest.java @@ -55,11 +55,11 @@ import java.sql.SQLException; import java.sql.Statement; import java.sql.Types; +import java.util.Collection; import java.util.Collections; import java.util.LinkedList; import java.util.List; import java.util.Map; -import java.util.Set; import java.util.function.Function; import java.util.stream.Collectors; @@ -137,7 +137,7 @@ void assertWriteRowsEventWithCustomColumns() throws ReflectiveOperationException assertWriteRowsEvent0(mockTargetTableColumnsMap(), 1); } - private void assertWriteRowsEvent0(final Map> targetTableColumnsMap, final int expectedColumnCount) throws ReflectiveOperationException { + private void assertWriteRowsEvent0(final Map> targetTableColumnsMap, final int expectedColumnCount) throws ReflectiveOperationException { dumperConfig.setTargetTableColumnsMap(targetTableColumnsMap); WriteRowsEvent rowsEvent = new WriteRowsEvent(); rowsEvent.setDatabaseName(""); @@ -151,7 +151,7 @@ private void assertWriteRowsEvent0(final Map> ta assertThat(((DataRecord) actual.get(0)).getColumnCount(), is(expectedColumnCount)); } - private Map> mockTargetTableColumnsMap() { + private Map> mockTargetTableColumnsMap() { return Collections.singletonMap(new LogicTableName("t_order"), Collections.singleton(new ColumnName("order_id"))); } @@ -165,7 +165,7 @@ void assertUpdateRowsEventWithCustomColumns() throws ReflectiveOperationExceptio assertUpdateRowsEvent0(mockTargetTableColumnsMap(), 1); } - private void assertUpdateRowsEvent0(final Map> targetTableColumnsMap, final int expectedColumnCount) throws ReflectiveOperationException { + private void assertUpdateRowsEvent0(final Map> targetTableColumnsMap, final int expectedColumnCount) throws ReflectiveOperationException { dumperConfig.setTargetTableColumnsMap(targetTableColumnsMap); UpdateRowsEvent rowsEvent = new UpdateRowsEvent(); rowsEvent.setDatabaseName("test"); @@ -190,7 +190,7 @@ void assertDeleteRowsEventWithCustomColumns() throws ReflectiveOperationExceptio assertDeleteRowsEvent0(mockTargetTableColumnsMap(), 1); } - private void assertDeleteRowsEvent0(final Map> targetTableColumnsMap, final int expectedColumnCount) throws ReflectiveOperationException { + private void assertDeleteRowsEvent0(final Map> targetTableColumnsMap, final int expectedColumnCount) throws ReflectiveOperationException { dumperConfig.setTargetTableColumnsMap(targetTableColumnsMap); DeleteRowsEvent rowsEvent = new DeleteRowsEvent(); rowsEvent.setDatabaseName("");