Skip to content

Commit 5ee15e3

Browse files
committed
[FLINK-39388][tests] Fix flaky DataGeneratorSourceITCase#testGatedRateLimiter
- Add !firstCheckpointCompleted guard in notifyCheckpointComplete to prevent redundant state updates after the first checkpoint has already been marked complete
1 parent fe8d828 commit 5ee15e3

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

flink-connectors/flink-connector-datagen-test/src/test/java/org/apache/flink/connector/datagen/source/DataGeneratorSourceITCase.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -288,7 +288,9 @@ public void snapshotState(FunctionSnapshotContext context) throws Exception {
288288
@Override
289289
public void notifyCheckpointComplete(long checkpointId) throws Exception {
290290
// Stop collecting elements once the first checkpoint has completed.
291-
if (checkpointId >= firstCheckpointId && firstCheckpointId != Long.MIN_VALUE) {
291+
if (!firstCheckpointCompleted
292+
&& checkpointId >= firstCheckpointId
293+
&& firstCheckpointId != Long.MIN_VALUE) {
292294
firstCheckpointCompleted = true;
293295
}
294296
}

0 commit comments

Comments
 (0)