Skip to content
Permalink
Browse files
HBASE-24197 TestHttpServer.testBindAddress failure with latest jetty (#…
…1524)

use the findPort logic even if the BindException is wrapped in an IOException

Signed-off-by: Viraj Jasani <vjasani@apache.org>
Signed-off-by: Jan Hentschel <jan.hentschel@ultratendency.com>
Signed-off-by: Peter Somogyi <psomogyi@apache.org>
  • Loading branch information
stoty committed Apr 16, 2020
1 parent 411c083 commit 94b410184115f8ffddb70bd0e0b040a0b9df0c2d
Showing 1 changed file with 4 additions and 1 deletion.
@@ -1120,7 +1120,10 @@ void openListeners() throws Exception {
listener.open();
LOG.info("Jetty bound to port " + listener.getLocalPort());
break;
} catch (BindException ex) {
} catch (IOException ex) {
if(!(ex instanceof BindException) && !(ex.getCause() instanceof BindException)) {
throw ex;
}
if (port == 0 || !findPort) {
BindException be = new BindException("Port in use: "
+ listener.getHost() + ":" + listener.getPort());

0 comments on commit 94b4101

Please sign in to comment.