Skip to content

fix(ruby-wrapper): resolve flakiness on Windows and path warning#829

Open
olavloite wants to merge 2 commits into
mainfrom
fix/678-ruby-wrapper-windows-flakiness
Open

fix(ruby-wrapper): resolve flakiness on Windows and path warning#829
olavloite wants to merge 2 commits into
mainfrom
fix/678-ruby-wrapper-windows-flakiness

Conversation

@olavloite

@olavloite olavloite commented Jun 11, 2026

Copy link
Copy Markdown
Collaborator

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

@olavloite olavloite requested a review from a team as a code owner June 11, 2026 14:43

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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.

Comment thread spannerlib/wrappers/spannerlib-ruby/spec/spannerlib_ruby_spec.rb
@olavloite

Copy link
Copy Markdown
Collaborator Author

Excellent cross-platform fixes for Ruby. Checking the mock server port with TCP, using File::NULL instead of /dev/null in gemspec, and utilizing File.binwrite to avoid text-mode conversions on Windows resolve flakiness and warnings.

@olavloite olavloite force-pushed the fix/678-ruby-wrapper-windows-flakiness branch from d444a62 to 833836c Compare June 12, 2026 16:27
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.

Ruby wrapper tests are flaky (on Windows)

1 participant