Add error handling to test mock servers#555
Open
lalitcap23 wants to merge 2 commits intostoracha:mainfrom
Open
Add error handling to test mock servers#555lalitcap23 wants to merge 2 commits intostoracha:mainfrom
lalitcap23 wants to merge 2 commits intostoracha:mainfrom
Conversation
Author
|
@travis , could you please review this PR? |
travis
approved these changes
Dec 1, 2025
Author
|
@travis , do i need to change anything else . |
Member
|
it looks like you have some linting issues - please take a look at the failing CI check below |
Author
|
@travis can u review it . |
Author
|
@travis , can u review it and suggest the changes . |
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.
Problem
Test helper HTTP servers were crashing with confusing 15+ line stack traces when they failed to start (e.g., port already in use). This made debugging test failures unnecessarily difficult.
Changes
Added error event handlers to
server.listen()in all 5 test helper servers:packages/w3up-client/test/helpers/bucket-server.jspackages/w3up-client/test/helpers/receipts-server.jspackages/w3up-client/test/helpers/gateway-server.jspackages/upload-client/test/helpers/bucket-server.jspackages/upload-client/test/helpers/receipts-server.jsBefore & After
Before:
After:
Failed to start server on port 9999: listen EADDRINUSE: address already in use :::9999Testing
Manually tested by starting duplicate servers on the same ports. All 5 servers now display clear error messages and exit with proper error codes.
Benefits
Fixes #554