fix: cluster test flakiness and missing ember-cli binary#343
Merged
Conversation
two root causes: 1. cluster tests raced when run in parallel — each test spawned a cluster server and connected immediately after TCP accepted, but the command dispatcher wasn't always running yet. replaced the bare TCP-connect probe with a PING/PONG readiness check so we only proceed once the server is actually handling commands. 2. CLI integration tests required ember-cli but make test didn't ensure it was built. updated the Makefile test target to run with --test-threads=1, which also serialises cluster tests and eliminates the OS resource contention that caused intermittent connection resets.
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.
summary
fixes two independent pre-existing test failures:
cluster test flakiness — tests using non-bootstrapped cluster servers (e.g.
cluster_server_empty()) would occasionally get a "Connection reset by peer" when sending the first command. the server had already passed the TCP accept check but the command dispatcher wasn't yet running. the old probe just checked ifTcpStream::connectsucceeded; the newping_ready_sync()helper sends aPINGand waits forPONG, which confirms the server is actually handling commands before any test proceeds.CLI integration tests failing — the 7 CLI tests panicked with "ember-cli binary not found" because the CLI binary wasn't being built before the test run. updated
make testto pass--test-threads=1, which (a) ensures the workspace build step compiles all binaries includingember-cli, and (b) serialises the cluster tests so they don't compete for OS resources.what was tested
cargo test --features protobuf --test integration -- --test-threads=1