You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by GitBox <gi...@apache.org> on 2021/10/22 09:25:31 UTC

[GitHub] [flink] AHeise commented on a change in pull request #17516: [FLINK-23391][connector/kafka] Fix flaky Kafka source metric test by retrying notifyCheckpointComplete until success or timeout

AHeise commented on a change in pull request #17516:
URL: https://github.com/apache/flink/pull/17516#discussion_r734379410



##########
File path: flink-connectors/flink-connector-kafka/src/test/java/org/apache/flink/connector/kafka/source/reader/KafkaSourceReaderTest.java
##########
@@ -330,27 +330,38 @@ public void testKafkaSourceMetrics() throws Exception {
 
             // Trigger offset commit
             reader.snapshotState(15213L);
-            reader.notifyCheckpointComplete(15213L);
             waitUtil(
-                    () -> reader.getOffsetsToCommit().isEmpty(),
+                    () -> {
+                        try {
+                            reader.notifyCheckpointComplete(15213L);

Review comment:
       Can you please extract this magic number? Variable would be fine.




-- 
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: issues-unsubscribe@flink.apache.org

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