flink-instrumentation/workspace/flink-1.4.1-instrumented/flink-1.4.1/flink-runtime/src/test/java/org/apache/flink/runtime/rpc/akka/AkkaRpcServiceTest.java
/**
	 * Tests a simple scheduled runnable being executed by the RPC services scheduled executor
	 * service.
	 */
Tests a simple scheduled runnable being executed by the RPC services scheduled executor
service.
Tests a simple scheduled runnable being executed by the RPC services scheduled executor service .
@Test(timeout = 60000)
	public void testScheduledExecutorServiceSimpleSchedule() throws ExecutionException, InterruptedException {
		ScheduledExecutor scheduledExecutor = akkaRpcService.getScheduledExecutor();
		final OneShotLatch latch = new OneShotLatch();
		ScheduledFuture<?> future = scheduledExecutor.schedule(
			new Runnable() {
				@Override
				public void run() {
					latch.trigger();
				}
			},
			10L,
			TimeUnit.MILLISECONDS);
		future.get();
		assertTrue(latch.isTriggered());
	}
@ Test ( timeout = 60000 ) public void testScheduledExecutorServiceSimpleSchedule ( ) throws ExecutionException , InterruptedException { ScheduledExecutor scheduledExecutor = akkaRpcService . getScheduledExecutor ( ) ; final OneShotLatch latch = new OneShotLatch ( ) ; ScheduledFuture < ? > future = scheduledExecutor . schedule ( new Runnable ( ) { @ Override public void run ( ) { latch . trigger ( ) ; } } , 10L , TimeUnit . MILLISECONDS ) ; future . get ( ) ; assertTrue ( latch . isTriggered ( ) ) ; }
Tests a simple scheduled runnable being executed by the RPC services scheduled executor
 service.
Tests a simple scheduled runnable being executed by the RPC services scheduled executor service .
// once the future is completed, then the latch should have been triggered