diff --git a/java/test/org/openqa/selenium/grid/router/SessionQueueGridTest.java b/java/test/org/openqa/selenium/grid/router/SessionQueueGridTest.java index 8e110a6d9cb32..3ad222c002b03 100644 --- a/java/test/org/openqa/selenium/grid/router/SessionQueueGridTest.java +++ b/java/test/org/openqa/selenium/grid/router/SessionQueueGridTest.java @@ -96,7 +96,8 @@ private static Server createServer(HttpHandler handler) { public void setup() throws URISyntaxException, MalformedURLException { Tracer tracer = DefaultTestTracer.createTracer(); EventBus bus = new GuavaEventBus(); - URI nodeUri = new URI("http://localhost:4444"); + int nodePort = PortProber.findFreePort(); + URI nodeUri = new URI("http://localhost:" + nodePort); CombinedHandler handler = new CombinedHandler(); clientFactory = new RoutableHttpClientFactory( nodeUri.toURL(), handler,