Hisoka-X commented on code in PR #4772:
URL: https://github.com/apache/seatunnel/pull/4772#discussion_r1640607412


##########
seatunnel-connectors-v2/connector-clickhouse/src/test/java/org/apache/seatunnel/connectors/seatunnel/clickhouse/ClickhouseFactoryTest.java:
##########
@@ -24,12 +24,56 @@
 import org.junit.jupiter.api.Assertions;
 import org.junit.jupiter.api.Test;
 
+import net.jpountz.xxhash.XXHash64;
+import net.jpountz.xxhash.XXHashFactory;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.UUID;
+
 public class ClickhouseFactoryTest {
+    private static final XXHash64 HASH_INSTANCE = 
XXHashFactory.fastestInstance().hash64();
 
     @Test
     public void testOptionRule() {
         Assertions.assertNotNull((new ClickhouseSourceFactory()).optionRule());
         Assertions.assertNotNull((new ClickhouseSinkFactory()).optionRule());
         Assertions.assertNotNull((new 
ClickhouseFileSinkFactory()).optionRule());
     }
+
+    @Test
+    public void testShared() {

Review Comment:
   The test case look weird, it only prove the logic of `(hashValue & 
Long.MAX_VALUE) % modulo` are right. But can not make sure the `getShard` 
method return right result. I think the test case should test `getShard` method.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to