Skip to content

Conversation

@IdrissRio
Copy link
Contributor

@IdrissRio IdrissRio commented Oct 8, 2025

This PR fixes test failures on macOS 26 where Maven would timeout connecting to test HTTP servers that weren't ready yet.

The main change is the addition of the wait_for_port() function that verifies if servers are accepting connections before running the tests.

@github-actions github-actions bot added the Java label Oct 8, 2025
@IdrissRio IdrissRio force-pushed the idrissrio/java-localhost branch 3 times, most recently from 6027153 to 1b52b49 Compare October 8, 2025 13:45
@smowton smowton changed the title Fix Java integration test: wait for test servers to come up before running test Oct 8, 2025
@IdrissRio IdrissRio marked this pull request as ready for review October 9, 2025 06:45
@IdrissRio IdrissRio requested a review from a team as a code owner October 9, 2025 06:45
Copilot AI review requested due to automatic review settings October 9, 2025 06:45
@IdrissRio IdrissRio force-pushed the idrissrio/java-localhost branch from 1b52b49 to 546d59f Compare October 9, 2025 06:46
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR fixes flaky Java integration tests on macOS by ensuring test HTTP servers are ready before running the tests. The main issue was that Maven would timeout when trying to connect to servers that hadn't fully started yet.

  • Added a wait_for_port() function to verify server connectivity before proceeding with tests
  • Modified subprocess creation to capture stderr/stdout to prevent output interference
  • Added proper server readiness checks with timeout handling

Copy link
Contributor

@smowton smowton left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@IdrissRio IdrissRio merged commit f52e3dc into main Oct 9, 2025
13 checks passed
@IdrissRio IdrissRio deleted the idrissrio/java-localhost branch October 9, 2025 08:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants