Skip to content

Commit

Permalink
feat(objectionary#3251): random
Browse files Browse the repository at this point in the history
  • Loading branch information
maxonfjvipon committed Sep 30, 2024
1 parent e160a4e commit 4bb9645
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,11 @@ final class EOsocketTest {
*/
private static final String LOCALHOST = "127.0.0.1";

/**
* Random.
*/
private static final Random RANDOM = new Random();

@Test
void connectsToLocalServerViaSocketObject() throws IOException {
final RandomServer server = new RandomServer().started();
Expand Down Expand Up @@ -151,7 +156,7 @@ private static short htons(final int port) {
private static int randomPort() {
final int min = 10000;
final int max = 20000;
return new Random().nextInt((max - min) + 1) + min;
return EOsocketTest.RANDOM.nextInt((max - min) + 1) + min;
}

/**
Expand Down

0 comments on commit 4bb9645

Please sign in to comment.