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

zhonghongsheng 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 f4769d100e2 Refactor ClassBasedShardingAlgorithmFactoryTest (#19498)
f4769d100e2 is described below

commit f4769d100e2b7eb75dead3ff899b8cc668b3b252
Author: Liang Zhang <[email protected]>
AuthorDate: Sun Jul 24 11:16:58 2022 +0800

    Refactor ClassBasedShardingAlgorithmFactoryTest (#19498)
---
 .../sharding/classbased/ClassBasedShardingAlgorithmFactoryTest.java | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git 
a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/test/java/org/apache/shardingsphere/sharding/algorithm/sharding/classbased/ClassBasedShardingAlgorithmFactoryTest.java
 
b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/test/java/org/apache/shardingsphere/sharding/algorithm/sharding/classbased/ClassBasedShardingAlgorithmFactoryTest.java
index 570cad289a2..e109fa23d76 100644
--- 
a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/test/java/org/apache/shardingsphere/sharding/algorithm/sharding/classbased/ClassBasedShardingAlgorithmFactoryTest.java
+++ 
b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/test/java/org/apache/shardingsphere/sharding/algorithm/sharding/classbased/ClassBasedShardingAlgorithmFactoryTest.java
@@ -35,11 +35,9 @@ public final class ClassBasedShardingAlgorithmFactoryTest {
         
ClassBasedShardingAlgorithmFactory.newInstance(ClassBasedHintShardingAlgorithmFixture.class.getName(),
 StandardShardingAlgorithm.class, new Properties());
     }
     
-    @SuppressWarnings("rawtypes")
     @Test
     public void assertNewInstance() {
-        StandardShardingAlgorithm algorithm =
-                
ClassBasedShardingAlgorithmFactory.newInstance(ClassBasedStandardShardingAlgorithmFixture.class.getName(),
 StandardShardingAlgorithm.class, new Properties());
-        assertThat(algorithm, 
instanceOf(ClassBasedStandardShardingAlgorithmFixture.class));
+        
assertThat(ClassBasedShardingAlgorithmFactory.newInstance(ClassBasedStandardShardingAlgorithmFixture.class.getName(),
 StandardShardingAlgorithm.class, new Properties()),
+                instanceOf(ClassBasedStandardShardingAlgorithmFixture.class));
     }
 }

Reply via email to