fix(ruby-wrapper): resolve flakiness on Windows and path warning#829
Open
olavloite wants to merge 2 commits into
Open
fix(ruby-wrapper): resolve flakiness on Windows and path warning#829olavloite wants to merge 2 commits into
olavloite wants to merge 2 commits into
Conversation
Contributor
There was a problem hiding this comment.
Code Review
This pull request improves cross-platform compatibility and test reliability by using File::NULL in the gemspec, using binwrite for mock request files, and adding a TCP connection check to verify the mock server is listening. The review feedback suggests rescuing SystemCallError instead of specific connection errors to handle Windows-specific exceptions more robustly, and removing the redundant socket close call.
Collaborator
Author
|
Excellent cross-platform fixes for Ruby. Checking the mock server port with TCP, using |
d444a62 to
833836c
Compare
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.
Resolves test flakiness on Windows by: 1. Ensuring the mock server is fully listening and accepting TCP connections before returning the port from wait_for_port. 2. Using File.binwrite instead of File.write to truncate the request log file to avoid text-mode translations. 3. Using File::NULL instead of /dev/null in the gemspec to avoid path-not-found warnings on Windows.
Fixes #678