Github user zentol commented on a diff in the pull request:
https://github.com/apache/flink/pull/4598#discussion_r139621841
--- Diff:
flink-runtime-web/src/test/java/org/apache/flink/runtime/webmonitor/handlers/HandlerRedirectUtilsTest.java
---
@@ -39,40 +39,36 @@
*/
public class HandlerRedirectUtilsTest extends TestLogger {
- private static final String localJobManagerAddress =
"akka.tcp://[email protected]:1234/user/foobar";
- private static final String remoteHostname = "127.0.0.2";
- private static final int webPort = 1235;
- private static final String remoteURL = remoteHostname + ':' + webPort;
- private static final String remotePath = "akka.tcp://flink@" +
remoteURL + "/user/jobmanager";
+ private static final String localRestAddress = "http://127.0.0.1:1234";
+ private static final String remoteRestAddress = "http://127.0.0.2:1234";
@Test
- public void testGetRedirectAddressWithLocalAkkaPath() throws Exception {
+ public void testGetRedirectAddressWithLocalEqualsRemoteRESTAddress()
throws Exception {
JobManagerGateway jobManagerGateway =
mock(JobManagerGateway.class);
-
when(jobManagerGateway.getAddress()).thenReturn("akka://flink/user/foobar");
+
when(jobManagerGateway.requestRestAddress(any(Time.class))).thenReturn(CompletableFuture.completedFuture(localRestAddress));
- Optional<CompletableFuture<String>> redirectingAddress =
HandlerRedirectUtils.getRedirectAddress(
- localJobManagerAddress,
+ CompletableFuture<Optional<String>> redirectingAddressFuture =
HandlerRedirectUtils.getRedirectAddress(
--- End diff --
does this actually belong in this commit?
---