Description
through we have set the port to 0 in
protected Server createJettyServer() { try { InetAddress localhost = InetAddress.getLocalHost(); ServerSocket ss = new ServerSocket(0, 50, localhost); int port = ss.getLocalPort(); ss.close(); jetty = new Server(0); jetty.getConnectors()[0].setHost("localhost"); jetty.getConnectors()[0].setPort(port);
but in a QA robot env, it still could see the new random port be grab by other testing case or third party applicatons just between "ss.close" and "jetty.start()" call. so we still need a BindException retry here probably.
Attachments
Issue Links
- duplicates
-
HADOOP-12417 TestWebDelegationToken failing with port in use
- Resolved
- relates to
-
HADOOP-11486 org.apache.hadoop.security.token.delegation.web.TestWebDelegationToken.testHttpUGI fails.
- Open