Skip to content

Commit 6e90781

Browse files
committed
[grid] Using PortProber.findFreePort() for DistributorTest
1 parent 1bf3317 commit 6e90781

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

java/server/test/org/openqa/selenium/grid/distributor/DistributorTest.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919

2020
import com.google.common.collect.ImmutableMap;
2121
import com.google.common.collect.ImmutableSet;
22+
2223
import org.junit.Assert;
2324
import org.junit.Before;
2425
import org.junit.Ignore;
@@ -118,7 +119,7 @@ private static <A, B> EitherAssert<A, B> assertThatEither(Either<A, B> either) {
118119
@Before
119120
public void setUp() throws URISyntaxException {
120121
nodeUri = new URI("http://example:5678");
121-
routableUri = new URI("http://localhost:1234");
122+
routableUri = new URI(String.format("http://localhost:%s", PortProber.findFreePort()));
122123
tracer = DefaultTestTracer.createTracer();
123124
bus = new GuavaEventBus();
124125
LocalSessionMap sessions = new LocalSessionMap(tracer, bus);

0 commit comments

Comments
 (0)