use of org.apache.flink.runtime.instance.DummyActorGateway in project flink by apache.
the class HandlerRedirectUtilsTest method testGetRedirectAddressWithLocalAkkaPath.
@Test
public void testGetRedirectAddressWithLocalAkkaPath() throws Exception {
ActorGateway leaderGateway = new DummyActorGateway("akka://flink/user/foobar");
Tuple2<ActorGateway, Integer> leader = new Tuple2<>(leaderGateway, 1235);
String redirectingAddress = HandlerRedirectUtils.getRedirectAddress(localJobManagerAddress, leader);
Assert.assertNull(redirectingAddress);
}
use of org.apache.flink.runtime.instance.DummyActorGateway in project flink by apache.
the class HandlerRedirectUtilsTest method testGetRedirectAddressWithRemoteAkkaPath.
@Test
public void testGetRedirectAddressWithRemoteAkkaPath() throws Exception {
ActorGateway leaderGateway = new DummyActorGateway(remotePath);
Tuple2<ActorGateway, Integer> leader = new Tuple2<>(leaderGateway, 1235);
String redirectingAddress = HandlerRedirectUtils.getRedirectAddress(localJobManagerAddress, leader);
Assert.assertEquals(remoteURL, redirectingAddress);
}
Aggregations