Github user zentol commented on a diff in the pull request: https://github.com/apache/flink/pull/3019#discussion_r92803960 --- Diff: flink-runtime-web/src/test/java/org/apache/flink/runtime/webmonitor/WebRuntimeMonitorITCase.java --- @@ -491,6 +445,37 @@ public void testNoCopyFromJar() throws Exception { } } + private WebRuntimeMonitor startWebRuntimeMonitor( + TestingCluster flink) throws Exception { + + ActorSystem jmActorSystem = flink.jobManagerActorSystems().get().head(); + ActorRef jmActor = flink.jobManagerActors().get().head(); + + // Needs to match the leader address from the leader retrieval service + String jobManagerAddress = AkkaUtils.getAkkaURL(jmActorSystem, jmActor); + + File logDir = temporaryFolder.newFolder("log"); + Path logFile = Files.createFile(new File(logDir, "jobmanager.log").toPath()); + Files.createFile(new File(logDir, "jobmanager.out").toPath()); + + // Web frontend on random port + Configuration config = new Configuration(); + config.setInteger(ConfigConstants.JOB_MANAGER_WEB_PORT_KEY, 0); + config.setString(ConfigConstants.JOB_MANAGER_WEB_LOG_PATH_KEY, logFile.toString()); + + WebRuntimeMonitor webMonitor = new WebRuntimeMonitor( + config, + flink.createLeaderRetrievalService(), + jmActorSystem); + + webMonitor.start(jobManagerAddress); + JobManagerRetriever retriever = Whitebox + .getInternalState(webMonitor, "retriever"); + + retriever.awaitJobManagerGatewayAndWebPort(); --- End diff -- instead you can call `flink.waitForActorsToBeAlive()`
--- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---