Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Jan 20, 2026

Addresses review feedback to prevent test failures from port conflicts. The test was using hardcoded port 8899, which could fail if already in use.

Changes

  • Replaced listen(8899) with listen(0) to let the OS assign available ports
  • Retrieved actual assigned ports using server.actualPort() after server startup
  • Applied to all three server instances: token server, application server, and test HTTP server
// Before
private int port = 8899;
vertx.createHttpServer()
    .requestHandler(tokenServer)
    .listen(port, context.asyncAssertSuccess(server -> {
      log.info("Token server started on port {}", port);
      // ...
    }));

// After
vertx.createHttpServer()
    .requestHandler(tokenServer)
    .listen(0, context.asyncAssertSuccess(server -> {
      int port = server.actualPort();
      log.info("Token server started on port {}", port);
      // ...
    }));

This follows the pattern already used in SampleMain.java, EmailLoginSample.java, and PasswordOnlySample.java.


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI and others added 2 commits January 20, 2026 04:12
…torHttpClientTest

Co-authored-by: jpallas <4623910+jpallas@users.noreply.github.com>
Co-authored-by: jpallas <4623910+jpallas@users.noreply.github.com>
Copilot AI changed the title [WIP] Address feedback from review on jp-fake-auth-fix PR Use dynamic port assignment in FakeAuthenticatorHttpClientTest Jan 20, 2026
Copilot AI requested a review from jpallas January 20, 2026 04:14
@jpallas jpallas marked this pull request as ready for review January 20, 2026 16:55
@jpallas jpallas merged commit fc00c37 into jp-fake-auth-fix Jan 20, 2026
4 checks passed
@jpallas jpallas deleted the copilot/sub-pr-115 branch January 20, 2026 16:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants