diff --git a/app/src/test/java/io/xeres/testutils/FakeHttpServer.java b/app/src/test/java/io/xeres/testutils/FakeHttpServer.java index fbbdd33c..9bdc8152 100644 --- a/app/src/test/java/io/xeres/testutils/FakeHttpServer.java +++ b/app/src/test/java/io/xeres/testutils/FakeHttpServer.java @@ -25,15 +25,17 @@ import java.io.IOException; import java.net.BindException; import java.net.InetSocketAddress; +import java.util.concurrent.ThreadLocalRandom; public class FakeHttpServer { - private int port = 1068; + private int port; private final HttpServer httpServer; private byte[] requestBody; public FakeHttpServer(String path, int responseCode, byte[] responseBody) { + port = ThreadLocalRandom.current().nextInt(2048, 28000); httpServer = createHttpServer(); var handler = (HttpHandler) exchange -> {