Github user aljoscha commented on a diff in the pull request:

    https://github.com/apache/flink/pull/5665#discussion_r181755757
  
    --- Diff: 
flink-runtime-web/src/test/java/org/apache/flink/runtime/webmonitor/WebFrontendITCase.java
 ---
    @@ -242,32 +256,44 @@ public void testStop() throws Exception {
                final JobGraph jobGraph = new JobGraph("Stoppable streaming 
test job", sender);
                final JobID jid = jobGraph.getJobID();
     
    -           cluster.submitJobDetached(jobGraph);
    +           ClusterClient<?> clusterClient = CLUSTER.getClusterClient();
    +           clusterClient.setDetached(true);
    +           clusterClient.submitJob(jobGraph, 
WebFrontendITCase.class.getClassLoader());
     
                // wait for job to show up
    -           while (cluster.getCurrentlyRunningJobsJava().isEmpty()) {
    +           while (getRunningJobs(CLUSTER.getClusterClient()).isEmpty()) {
                        Thread.sleep(10);
                }
     
                final FiniteDuration testTimeout = new FiniteDuration(2, 
TimeUnit.MINUTES);
                final Deadline deadline = testTimeout.fromNow();
     
    -           while (!cluster.getCurrentlyRunningJobsJava().isEmpty()) {
    -                   try (HttpTestClient client = new 
HttpTestClient("localhost", port)) {
    -                           // Request the file from the web server
    -                           client.sendDeleteRequest("/jobs/" + jid + 
"/stop", deadline.timeLeft());
    -                           HttpTestClient.SimpleHttpResponse response = 
client.getNextResponse(deadline.timeLeft());
    -
    -                           assertEquals(HttpResponseStatus.OK, 
response.getStatus());
    -                           assertEquals("application/json; charset=UTF-8", 
response.getType());
    -                           assertEquals("{}", response.getContent());
    +           while (!getRunningJobs(CLUSTER.getClusterClient()).isEmpty()) {
    +                   try (HttpTestClient client = new 
HttpTestClient("localhost", CLUSTER.getWebUIPort())) {
    +                           if 
(Objects.equals(MiniClusterResource.FLIP6_CODEBASE, 
System.getProperty(MiniClusterResource.CODEBASE_KEY))) {
    +                                   // Request the file from the web server
    --- End diff --
    
    This comment is/was outdated, it seems.


---

Reply via email to