Skip to content

Commit

Permalink
Minor improvement to random port
Browse files Browse the repository at this point in the history
  • Loading branch information
harishkannarao committed Feb 18, 2024
1 parent b0a56a4 commit 5fdc4aa
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,9 @@
)
abstract class AbstractBaseIntegrationTest {

private static final int RANDOM_SERVER_PORT = TestSocketUtils.findAvailableTcpPort();

@DynamicPropertySource
static void registerTestProperties(DynamicPropertyRegistry registry) {
final int RANDOM_SERVER_PORT = TestSocketUtils.findAvailableTcpPort();
registry.add("server.port", () -> String.valueOf(RANDOM_SERVER_PORT));
}

Expand Down

0 comments on commit 5fdc4aa

Please sign in to comment.