Skip to content

Commit

Permalink
Try to fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
zapek committed Nov 30, 2024
1 parent 142f149 commit d9082c5
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion app/src/test/java/io/xeres/testutils/FakeHttpServer.java
Original file line number Diff line number Diff line change
Expand Up @@ -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 -> {
Expand Down

0 comments on commit d9082c5

Please sign in to comment.