This is an automated email from the ASF dual-hosted git repository.

yx9o pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/shardingsphere.git


The following commit(s) were added to refs/heads/master by this push:
     new 0085f623e1f Fix DataSourceCheckEngineTest (#29480)
0085f623e1f is described below

commit 0085f623e1fafc2925036906fa5846c3ad384a64
Author: Liang Zhang <[email protected]>
AuthorDate: Thu Dec 21 00:53:33 2023 +0800

    Fix DataSourceCheckEngineTest (#29480)
---
 .../core/preparer/datasource/DataSourceCheckEngineTest.java    | 10 ++++------
 1 file changed, 4 insertions(+), 6 deletions(-)

diff --git 
a/kernel/data-pipeline/core/src/test/java/org/apache/shardingsphere/data/pipeline/core/preparer/datasource/DataSourceCheckEngineTest.java
 
b/kernel/data-pipeline/core/src/test/java/org/apache/shardingsphere/data/pipeline/core/preparer/datasource/DataSourceCheckEngineTest.java
index 16bf462303f..ff5a4b1dd4e 100644
--- 
a/kernel/data-pipeline/core/src/test/java/org/apache/shardingsphere/data/pipeline/core/preparer/datasource/DataSourceCheckEngineTest.java
+++ 
b/kernel/data-pipeline/core/src/test/java/org/apache/shardingsphere/data/pipeline/core/preparer/datasource/DataSourceCheckEngineTest.java
@@ -18,10 +18,10 @@
 package org.apache.shardingsphere.data.pipeline.core.preparer.datasource;
 
 import 
org.apache.shardingsphere.data.pipeline.core.checker.DataSourceCheckEngine;
-import 
org.apache.shardingsphere.data.pipeline.core.importer.ImporterConfiguration;
-import 
org.apache.shardingsphere.data.pipeline.core.ingest.dumper.context.mapper.TableAndSchemaNameMapper;
 import 
org.apache.shardingsphere.data.pipeline.core.exception.job.PrepareJobWithInvalidConnectionException;
 import 
org.apache.shardingsphere.data.pipeline.core.exception.job.PrepareJobWithTargetTableNotEmptyException;
+import 
org.apache.shardingsphere.data.pipeline.core.importer.ImporterConfiguration;
+import 
org.apache.shardingsphere.data.pipeline.core.metadata.CaseInsensitiveQualifiedTable;
 import org.apache.shardingsphere.infra.database.core.type.DatabaseType;
 import org.apache.shardingsphere.infra.spi.type.typed.TypedSPILoader;
 import org.junit.jupiter.api.BeforeEach;
@@ -89,8 +89,7 @@ class DataSourceCheckEngineTest {
         when(connection.prepareStatement("SELECT * FROM t_order LIMIT 
1")).thenReturn(preparedStatement);
         when(preparedStatement.executeQuery()).thenReturn(resultSet);
         ImporterConfiguration importerConfig = 
mock(ImporterConfiguration.class);
-        when(importerConfig.getTableAndSchemaNameMapper()).thenReturn(new 
TableAndSchemaNameMapper(Collections.emptyMap()));
-        
when(importerConfig.getLogicTableNames()).thenReturn(Collections.singleton("t_order"));
+        
when(importerConfig.getQualifiedTables()).thenReturn(Collections.singleton(new 
CaseInsensitiveQualifiedTable(null, "t_order")));
         dataSourceCheckEngine.checkTargetDataSources(dataSources, 
importerConfig);
     }
     
@@ -101,8 +100,7 @@ class DataSourceCheckEngineTest {
         when(preparedStatement.executeQuery()).thenReturn(resultSet);
         when(resultSet.next()).thenReturn(true);
         ImporterConfiguration importerConfig = 
mock(ImporterConfiguration.class);
-        when(importerConfig.getTableAndSchemaNameMapper()).thenReturn(new 
TableAndSchemaNameMapper(Collections.emptyMap()));
-        
when(importerConfig.getLogicTableNames()).thenReturn(Collections.singleton("t_order"));
+        
when(importerConfig.getQualifiedTables()).thenReturn(Collections.singleton(new 
CaseInsensitiveQualifiedTable(null, "t_order")));
         assertThrows(PrepareJobWithTargetTableNotEmptyException.class, () -> 
dataSourceCheckEngine.checkTargetDataSources(dataSources, importerConfig));
     }
 }

Reply via email to