flink-instrumentation/workspace/flink-1.4.1-instrumented/flink-1.4.1/flink-runtime/src/test/java/org/apache/flink/runtime/resourcemanager/ResourceManagerTaskExecutorTest.java
/**
	 * Test receive registration with invalid address from task executor
	 */
Test receive registration with invalid address from task executor
Test receive registration with invalid address from task executor
@Test
	public void testRegisterTaskExecutorFromInvalidAddress() throws Exception {
		try {
			String invalidAddress = "/taskExecutor2";
			CompletableFuture<RegistrationResponse> invalidAddressFuture =
				rmGateway.registerTaskExecutor(invalidAddress, taskExecutorResourceID, slotReport, timeout);
			assertTrue(invalidAddressFuture.get(timeout.toMilliseconds(), TimeUnit.MILLISECONDS) instanceof RegistrationResponse.Decline);
		} finally {
			if (testingFatalErrorHandler.hasExceptionOccurred()) {
				testingFatalErrorHandler.rethrowError();
			}
		}
	}
@ Test public void testRegisterTaskExecutorFromInvalidAddress ( ) throws Exception { try { String invalidAddress = "/taskExecutor2" ; CompletableFuture < RegistrationResponse > invalidAddressFuture = rmGateway . registerTaskExecutor ( invalidAddress , taskExecutorResourceID , slotReport , timeout ) ; assertTrue ( invalidAddressFuture . get ( timeout . toMilliseconds ( ) , TimeUnit . MILLISECONDS ) instanceof RegistrationResponse . Decline ) ; } finally { if ( testingFatalErrorHandler . hasExceptionOccurred ( ) ) { testingFatalErrorHandler . rethrowError ( ) ; } } }
Test receive registration with invalid address from task executor
Test receive registration with invalid address from task executor
// test throw exception when receive a registration from taskExecutor which takes invalid address