Skip to content

Commit

Permalink
[FLINK-17636][network][tests] Fix the unstable unit tests in SingleIn…
Browse files Browse the repository at this point in the history
…putGateTest
  • Loading branch information
zhijiangW committed May 14, 2020
1 parent 1d9d0bf commit c781d17
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@
import org.apache.flink.runtime.clusterframework.types.ResourceID;
import org.apache.flink.runtime.deployment.InputGateDeploymentDescriptor;
import org.apache.flink.runtime.event.TaskEvent;
import org.apache.flink.runtime.execution.CancelTaskException;
import org.apache.flink.runtime.executiongraph.ExecutionAttemptID;
import org.apache.flink.runtime.io.network.NettyShuffleEnvironment;
import org.apache.flink.runtime.io.network.NettyShuffleEnvironmentBuilder;
Expand Down Expand Up @@ -226,7 +225,10 @@ public void testConcurrentReadStateAndProcessAndClose() throws Exception {
if (!getNextBufferAndVerify(inputGate, states)) {
Thread.sleep(1);
}
} catch (CancelTaskException expected) {
} catch (Throwable t) {
if (!inputGate.getCloseFuture().isDone()) {
throw new AssertionError("Exceptions are expected here only if the gate was closed", t);
}
return null;
}
}
Expand Down

0 comments on commit c781d17

Please sign in to comment.