[ https://issues.apache.org/jira/browse/YARN-2912?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14228882#comment-14228882 ]
Varun Saxena commented on YARN-2912: ------------------------------------ If we change around the ports by increasing port number in system property by a certain number, before every test case, there is no guarantee that even that port wont be occupied. We can probably try to establish a Socket Connection with the port given in system property and if that succeeds, get another port. Probably repeat it a fixed n number of times. But this may slow down the execution of test case. > Jersey Tests failing with port in use > ------------------------------------- > > Key: YARN-2912 > URL: https://issues.apache.org/jira/browse/YARN-2912 > Project: Hadoop YARN > Issue Type: Bug > Components: test > Affects Versions: 3.0.0 > Environment: jenkins on java 8 > Reporter: Steve Loughran > Assignee: Varun Saxena > > Jersey tests like TestNMWebServices apps are failing with port in use. > The jersey test runner appears to always use the same port unless a system > property is set to point to a different one. Every test should really be > changing that sysprop in a @Before method -- This message was sent by Atlassian JIRA (v6.3.4#6332)