flink-instrumentation/workspace/flink-1.4.1-instrumented/flink-1.4.1/flink-runtime/src/test/java/org/apache/flink/runtime/rpc/akka/AkkaRpcActorTest.java
/**
	 * Tests that we can wait for a RpcEndpoint to terminate.
	 *
	 * @throws ExecutionException
	 * @throws InterruptedException
	 */
Tests that we can wait for a RpcEndpoint to terminate.
Tests that we can wait for a RpcEndpoint to terminate .
@Test(timeout=5000)
	public void testRpcEndpointTerminationFuture() throws Exception {
		final DummyRpcEndpoint rpcEndpoint = new DummyRpcEndpoint(akkaRpcService);
		rpcEndpoint.start();
		CompletableFuture<Boolean> terminationFuture = rpcEndpoint.getTerminationFuture();
		assertFalse(terminationFuture.isDone());
		CompletableFuture.runAsync(
			() -> rpcEndpoint.shutDown(),
			actorSystem.dispatcher());
		terminationFuture.get();
	}
@ Test ( timeout = 5000 ) public void testRpcEndpointTerminationFuture ( ) throws Exception { final DummyRpcEndpoint rpcEndpoint = new DummyRpcEndpoint ( akkaRpcService ) ; rpcEndpoint . start ( ) ; CompletableFuture < Boolean > terminationFuture = rpcEndpoint . getTerminationFuture ( ) ; assertFalse ( terminationFuture . isDone ( ) ) ; CompletableFuture . runAsync ( ( ) -> rpcEndpoint . shutDown ( ) , actorSystem . dispatcher ( ) ) ; terminationFuture . get ( ) ; }
Tests that we can wait for a RpcEndpoint to terminate.
Tests that we can wait for a RpcEndpoint to terminate .
// wait until the rpc endpoint has terminated