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

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

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

    https://github.com/apache/flink/pull/2193#discussion_r69421710
  
    --- Diff: 
flink-core/src/test/java/org/apache/flink/metrics/reporter/JMXReporterTest.java 
---
    @@ -285,4 +289,23 @@ public long getMin() {
                        };
                }
        }
    +
    +   /**
    +    * Sets the JMX port range config key based on the fork number.
    +    * @param config Configuration instance to configure
    +    * @return Passed configuration instance
    +    */
    +   private static Configuration setJmxPortRange(Configuration config) {
    +           int forkNumber = 0;
    +           try {
    +                   forkNumber = 
Integer.parseInt(System.getProperty("forkNumber"));
    +           } catch (NumberFormatException ignored) {
    +           }
    +
    +           int minPort = 9000 + forkNumber * 100;
    --- End diff --
    
    I think the fort number thing was non sensical as it is only set for 
integration tests.


> JmxReporterTest fails due to port conflicts
> -------------------------------------------
>
>                 Key: FLINK-4145
>                 URL: https://issues.apache.org/jira/browse/FLINK-4145
>             Project: Flink
>          Issue Type: Bug
>          Components: Local Runtime
>            Reporter: Ufuk Celebi
>            Assignee: Ufuk Celebi
>              Labels: test-stability
>             Fix For: 1.1.0
>
>
> I saw multiple failures of the {{JmxReporterTest}} most likely due to a port 
> conflicts. The test relies on the default JMX reporter port range, which 
> spans 5 ports. Running on Travis with multiple concurrent builds and bad 
> timings, this can lead to port conflicts.
> Some example failed runs:
> https://s3.amazonaws.com/archive.travis-ci.org/jobs/141999066/log.txt (one 
> out of 5 jobs failed)
> https://travis-ci.org/uce/flink/builds/141917901 (all 5 jobs failed)
> I propose to take the fork number into account (like the forkable Flink 
> testing cluster) and configure a larger port range.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to