You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by pa...@apache.org on 2022/05/16 07:38:34 UTC

[shardingsphere] branch master updated: Revise #17695 (#17700)

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

panjuan 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 7d861f99161 Revise #17695 (#17700)
7d861f99161 is described below

commit 7d861f99161f903ecf2ae1376396d31cf8e916df
Author: Liang Zhang <zh...@apache.org>
AuthorDate: Mon May 16 15:38:28 2022 +0800

    Revise #17695 (#17700)
---
 .../infra/datanode/DataNodeBuilderFactoryTest.java            | 11 +++++------
 1 file changed, 5 insertions(+), 6 deletions(-)

diff --git a/shardingsphere-infra/shardingsphere-infra-common/src/test/java/org/apache/shardingsphere/infra/datanode/DataNodeBuilderFactoryTest.java b/shardingsphere-infra/shardingsphere-infra-common/src/test/java/org/apache/shardingsphere/infra/datanode/DataNodeBuilderFactoryTest.java
index 21192270a84..055783481ec 100644
--- a/shardingsphere-infra/shardingsphere-infra-common/src/test/java/org/apache/shardingsphere/infra/datanode/DataNodeBuilderFactoryTest.java
+++ b/shardingsphere-infra/shardingsphere-infra-common/src/test/java/org/apache/shardingsphere/infra/datanode/DataNodeBuilderFactoryTest.java
@@ -17,11 +17,11 @@
 
 package org.apache.shardingsphere.infra.datanode;
 
+import org.apache.shardingsphere.infra.fixture.TestDataSourceContainedDataNodeBuilder;
 import org.apache.shardingsphere.infra.fixture.TestShardingSphereRule;
 import org.apache.shardingsphere.infra.rule.ShardingSphereRule;
 import org.junit.Test;
 
-import java.util.Collection;
 import java.util.Collections;
 import java.util.Map;
 
@@ -32,13 +32,12 @@ import static org.mockito.Mockito.mock;
 
 public final class DataNodeBuilderFactoryTest {
     
+    @SuppressWarnings("rawtypes")
     @Test
     public void assertGetInstances() {
-        TestShardingSphereRule key = mock(TestShardingSphereRule.class);
-        Collection<ShardingSphereRule> rules = Collections.singletonList(key);
-        Map<ShardingSphereRule, DataNodeBuilder> actual = DataNodeBuilderFactory.getInstances(rules);
+        TestShardingSphereRule rule = mock(TestShardingSphereRule.class);
+        Map<ShardingSphereRule, DataNodeBuilder> actual = DataNodeBuilderFactory.getInstances(Collections.singleton(rule));
         assertThat(actual.size(), is(1));
-        assertThat(actual.get(key), instanceOf(DataNodeBuilder.class));
+        assertThat(actual.get(rule), instanceOf(TestDataSourceContainedDataNodeBuilder.class));
     }
-    
 }