akalash commented on a change in pull request #15496:
URL: https://github.com/apache/flink/pull/15496#discussion_r613835090
##########
File path:
flink-streaming-java/src/test/java/org/apache/flink/streaming/runtime/tasks/StreamTaskTest.java
##########
@@ -2419,4 +2462,48 @@ public void notifyCheckpointComplete(long checkpointId) {
throw new ExpectedTestException();
}
}
+
+ public static class FailedSource extends RichParallelSourceFunction<String>
+ implements CheckpointedFunction {
+
+ private static CountDownLatch runningLatch = null;
+
+ private volatile boolean running;
+
+ public FailedSource() {
+ runningLatch = new CountDownLatch(1);
+ }
+
+ @Override
+ public void open(Configuration parameters) throws Exception {
+ running = true;
+ }
+
+ @Override
+ public void run(SourceContext<String> ctx) throws Exception {
+ runningLatch.countDown();
+ while (running) {
+ LockSupport.parkNanos(1_000);
Review comment:
Ok, I will replace 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.
For queries about this service, please contact Infrastructure at:
[email protected]