ruanhang1993 commented on a change in pull request #17601:
URL: https://github.com/apache/flink/pull/17601#discussion_r779320247
##########
File path:
flink-connectors/flink-connector-kafka/src/test/java/org/apache/flink/streaming/connectors/kafka/table/KafkaDynamicTableFactoryTest.java
##########
@@ -380,6 +381,44 @@ public void testTableSourceCommitOnCheckpointDisabled() {
.noDefaultValue()));
}
+ @Test
+ public void testTableSourceSetOffsetReset() {
+ testSetOffsetResetForStartFromGroupOffsets(null);
+ testSetOffsetResetForStartFromGroupOffsets("none");
+ testSetOffsetResetForStartFromGroupOffsets("earliest");
+ testSetOffsetResetForStartFromGroupOffsets("latest");
+ }
+
+ private void testSetOffsetResetForStartFromGroupOffsets(String value) {
+ final Map<String, String> modifiedOptions =
+ getModifiedOptions(
+ getBasicSourceOptions(),
+ options -> {
+ options.remove("scan.startup.mode");
+ if (value != null) {
Review comment:
I do not think we should ignore the null value here. The null value
should be tested as it could be provided by users.
--
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]