flink-instrumentation/workspace/flink-1.4.1-instrumented/flink-1.4.1/flink-runtime/src/test/java/org/apache/flink/runtime/rpc/RpcEndpointTest.java
/**
	 * Tests that we can obtain the self gateway from a RpcEndpoint and can interact with
	 * it via the self gateway.
	 */
Tests that we can obtain the self gateway from a RpcEndpoint and can interact with
it via the self gateway.
Tests that we can obtain the self gateway from a RpcEndpoint and can interact with it via the self gateway .
@Test
	public void testSelfGateway() throws Exception {
		int expectedValue = 1337;
		BaseEndpoint baseEndpoint = new BaseEndpoint(rpcService, expectedValue);
		try {
			baseEndpoint.start();
			BaseGateway baseGateway = baseEndpoint.getSelfGateway(BaseGateway.class);
			CompletableFuture<Integer> foobar = baseGateway.foobar();
			assertEquals(Integer.valueOf(expectedValue), foobar.get());
		} finally {
			baseEndpoint.shutDown();
		}
	}
@ Test public void testSelfGateway ( ) throws Exception { int expectedValue = 1337 ; BaseEndpoint baseEndpoint = new BaseEndpoint ( rpcService , expectedValue ) ; try { baseEndpoint . start ( ) ; BaseGateway baseGateway = baseEndpoint . getSelfGateway ( BaseGateway . class ) ; CompletableFuture < Integer > foobar = baseGateway . foobar ( ) ; assertEquals ( Integer . valueOf ( expectedValue ) , foobar . get ( ) ) ; } finally { baseEndpoint . shutDown ( ) ; } }
Tests that we can obtain the self gateway from a RpcEndpoint and can interact with
 it via the self gateway.
Tests that we can obtain the self gateway from a RpcEndpoint and can interact with it via the self gateway .