ruanhang1993 commented on a change in pull request #17601:
URL: https://github.com/apache/flink/pull/17601#discussion_r786445498



##########
File path: 
flink-connectors/flink-connector-kafka/src/test/java/org/apache/flink/streaming/connectors/kafka/table/KafkaTableITCase.java
##########
@@ -821,6 +826,175 @@ public void testPerPartitionWatermarkWithIdleSource() 
throws Exception {
         deleteTestTopic(topic);
     }
 
+    @Test
+    public void testStartFromGroupOffsetsLatest() throws Exception {
+        testStartFromGroupOffsets("latest", Collections.emptyList());
+    }
+
+    @Test
+    public void testStartFromGroupOffsetsEarliest() throws Exception {
+        final List<String> expected =
+                Arrays.asList(
+                        "+I[0, 0]", "+I[0, 1]", "+I[0, 2]", "+I[1, 3]", "+I[1, 
4]", "+I[1, 5]");
+        testStartFromGroupOffsets("earliest", expected);
+    }
+
+    @Test
+    public void testStartFromGroupOffsetsNone() {
+        try {
+            testStartFromGroupOffsetsWithException("none", 
Collections.emptyList());
+            fail("None offset reset error.");
+        } catch (Exception e) {
+            Throwable rootCause = ExceptionUtils.getRootCause(e);
+            assertTrue(rootCause instanceof NoOffsetForPartitionException);
+        }
+    }
+
+    private void testStartFromGroupOffsets(String reset, List<String> expected)

Review comment:
       I have fixed it.




-- 
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