test(umbp): use kernel-assigned ports in distributed tests to fix CI flakiness#417
Merged
Merged
Conversation
…red-CI flakiness The distributed integration tests (cross_node_smoke, pool_client_batch_put, peer_service) hard-coded their peer-service / server ports from fixed bases (52000 / 53000 / 50200). PoolClient and PeerServiceServer bind that port directly and register it verbatim as the peer_address, so on a shared self-hosted CI runner the fixed ports collide with concurrent jobs or leftover servers: the bind fails, remote AllocateSlot/CommitSlot RPCs become unavailable, and the cross-node Put/Get cases fail (ctest exit code 8). This is non-deterministic, which is why a PR can pass CI yet the same commit fail once merged to main. The umbp production code is unaffected; this is purely a test port-allocation issue. Ask the kernel for a currently-free ephemeral port (bind :0 -> getsockname -> close) instead, falling back to a PID-offset random base only if the probe is unavailable. Mirrors the existing AllocPort() helper in test_umbp_tags.cpp. Verified in-container with the CI ctest filter: 22/22 pass, including runs with the old 52000+ range fully occupied and three concurrent test processes.
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
cross_node_smoke,pool_client_batch_put,peer_service) hard-coded their peer-service / server ports from fixed bases (52000 / 53000 / 50200).PoolClient/PeerServiceServerbind that port directly and register it verbatim as thepeer_address, so on the shared self-hosted CI runner the fixed ports collide with concurrent jobs or leftover servers -> bind fails -> remote AllocateSlot/CommitSlot RPCs unavailable -> cross-node Put/Get fail (ctest exit code 8). Non-deterministic, so a PR can pass CI yet the same commit fail once merged to main.:0->getsockname-> close), falling back to a PID-offset random base only if the probe is unavailable. Mirrors the existingAllocPort()intest_umbp_tags.cpp.Test plan
-R '^(umbp_|test_dummy_ssd_tier|test_prefix_aware_eviction|test_ssd_tier)': 22/22 pass