Repository navigation
fix(tests): Stop waiting forever for the test server to start - #2330
Merged
Merged
Conversation
Co-Authored-By: Martin Linzmayer <martin.linzmayer@sentry.io>
Litarnus
approved these changes
Nov 6, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
TestServer::startTestServer()startedphp -Son the fixed port 45884 and then polled/pingin awhile (true)loop. If the server couldn't bind or died on startup, the loop never ended. It only checked whether the process was alive after the loop, which it never reached. The CI job then hung until GitHub's 6h job limit, with no hint of which test was stuck. That's the likely cause of theTests (ubuntu-latest, 8.3, lowest)hang on #2329, which stopped somewhere between tests 672 and 732. Every test in that range that starts the test server is inAgentClientBuilderTestorHttpClientTest.This gives the test server the same treatment the test agent got in #2222:
php -Shas exited. The error message includes the server's stderr, e.g.Failed to listen on 127.0.0.1:39315 (reason: Address already in use).tearDown()doesn't trip over a half-started server.The server now binds to
127.0.0.1instead oflocalhost, so it listens on the same address the free port was reserved on.via Martin Linzmayer.
--
View Session [Sentry]