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


##########
seatunnel-connectors-v2/connector-kafka/src/test/java/org/apache/kafka/clients/admin/KafkaSourceSplitEnumeratorTest.java:
##########
@@ -145,12 +166,50 @@ void addplits() throws ExecutionException, 
InterruptedException {
                 new HashMap<TopicPartition, KafkaSourceSplit>();
         Map<TopicPartition, KafkaSourceSplit> pendingSplit = new HashMap<>();
         List<KafkaSourceSplit> splits =
-                Collections.singletonList(new KafkaSourceSplit(null, 
partition));
+                Arrays.asList(
+                        new KafkaSourceSplit(null, partition0),
+                        new KafkaSourceSplit(null, partition2));
+
         KafkaSourceSplitEnumerator enumerator =
                 new KafkaSourceSplitEnumerator(adminClient, pendingSplit, 
assignedSplit, false);
         enumerator.fetchPendingPartitionSplit();
         Assertions.assertEquals(pendingSplit.size(), splits.size());
-        Assertions.assertNotNull(pendingSplit.get(partition));
-        Assertions.assertTrue(pendingSplit.get(partition).getEndOffset() == 0);
+        Assertions.assertNotNull(pendingSplit.get(partition0));
+        Assertions.assertTrue(pendingSplit.get(partition0).getEndOffset() == 
0);
+    }
+
+    @Test
+    void testIgnoreNoLeaderPartition() throws ExecutionException, 
InterruptedException {

Review Comment:
   The test case need check for `After the partitions are restored, the dynamic 
partition discovery mechanism will automatically detect and include these 
restored partitions, making them available for use.`



-- 
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: commits-unsubscr...@seatunnel.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to