You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flink.apache.org by zh...@apache.org on 2020/03/21 14:11:28 UTC
[flink] 02/03: [hotfix][tests] Remove dead codes from
SynchronousCheckpointTest
This is an automated email from the ASF dual-hosted git repository.
zhijiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/flink.git
commit 6937fd82e9811847321a7d341de486a428afd1bd
Author: Zhijiang <wa...@aliyun.com>
AuthorDate: Thu Mar 19 16:15:56 2020 +0800
[hotfix][tests] Remove dead codes from SynchronousCheckpointTest
This closes #11459
---
.../tasks/StreamTaskCancellationBarrierTest.java | 35 ----------------------
1 file changed, 35 deletions(-)
diff --git a/flink-streaming-java/src/test/java/org/apache/flink/streaming/runtime/tasks/StreamTaskCancellationBarrierTest.java b/flink-streaming-java/src/test/java/org/apache/flink/streaming/runtime/tasks/StreamTaskCancellationBarrierTest.java
index 6d55866..52433d7 100644
--- a/flink-streaming-java/src/test/java/org/apache/flink/streaming/runtime/tasks/StreamTaskCancellationBarrierTest.java
+++ b/flink-streaming-java/src/test/java/org/apache/flink/streaming/runtime/tasks/StreamTaskCancellationBarrierTest.java
@@ -21,17 +21,14 @@ package org.apache.flink.streaming.runtime.tasks;
import org.apache.flink.api.common.functions.MapFunction;
import org.apache.flink.api.common.typeinfo.BasicTypeInfo;
import org.apache.flink.runtime.checkpoint.CheckpointFailureReason;
-import org.apache.flink.runtime.execution.Environment;
import org.apache.flink.runtime.io.network.api.CancelCheckpointMarker;
import org.apache.flink.runtime.jobgraph.OperatorID;
import org.apache.flink.streaming.api.functions.co.CoMapFunction;
import org.apache.flink.streaming.api.graph.StreamConfig;
-import org.apache.flink.streaming.api.operators.AbstractStreamOperator;
import org.apache.flink.streaming.api.operators.StreamMap;
import org.apache.flink.streaming.api.operators.co.CoStreamMap;
import org.apache.flink.streaming.runtime.io.CheckpointBarrierAlignerTestBase;
import org.apache.flink.streaming.runtime.io.CheckpointBarrierAlignerTestBase.CheckpointExceptionMatcher;
-import org.apache.flink.streaming.runtime.tasks.StreamTaskTest.NoOpStreamTask;
import org.junit.Rule;
import org.junit.Test;
@@ -145,38 +142,6 @@ public class StreamTaskCancellationBarrierTest {
testHarness.waitForTaskCompletion();
}
- // ------------------------------------------------------------------------
- // test tasks / functions
- // ------------------------------------------------------------------------
-
- private static class InitBlockingTask extends NoOpStreamTask<String, AbstractStreamOperator<String>> {
-
- private final Object lock = new Object();
- private volatile boolean running = true;
-
- protected InitBlockingTask(Environment env) {
- super(env);
- }
-
- @Override
- protected void init() throws Exception {
- super.init();
- synchronized (lock) {
- while (running) {
- lock.wait();
- }
- }
- }
-
- @Override
- protected void cancelTask() throws Exception {
- running = false;
- synchronized (lock) {
- lock.notifyAll();
- }
- }
- }
-
private static class IdentityMap implements MapFunction<String, String> {
private static final long serialVersionUID = 1L;