[ 
https://issues.apache.org/jira/browse/FLINK-8703?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16439516#comment-16439516
 ] 

ASF GitHub Bot commented on FLINK-8703:
---------------------------------------

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.


> Migrate tests from LocalFlinkMiniCluster to MiniClusterResource
> ---------------------------------------------------------------
>
>                 Key: FLINK-8703
>                 URL: https://issues.apache.org/jira/browse/FLINK-8703
>             Project: Flink
>          Issue Type: Sub-task
>          Components: Tests
>            Reporter: Aljoscha Krettek
>            Assignee: Chesnay Schepler
>            Priority: Blocker
>             Fix For: 1.5.0
>
>




--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to