Repository navigation
test: capture loader logs, stop test port clashes - #251
Merged
Merged
Conversation
The integration tests run the orchestrator in the test process, but nothing installed a tracing subscriber, so a failing test printed only the ClickHouse container's stderr. TestInfrastructure::new now installs one that writes through the harness's capture. The loader logs at debug, scalo at info and everything else at warn, and RUST_LOG replaces that filter. Passing tests print nothing. grpc_outage also logs the error when a loader exits, which start() used to discard, and free_port() claims each port it hands out with a marker socket held until the process exits. Probing alone left a port free for a test process started beside this one, and consecutive pids search from consecutive ports. Two loaders could be given one address. The second died on the bind with nothing logged, and its client pushed into the first loader's table.
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.
A failing integration test printed only the ClickHouse container's stderr. The orchestrator runs inside the test process and nothing installed a tracing subscriber.
The last two go together. Test processes started together have consecutive pids, so free_port() searched from consecutive ports and probed the same listener port free for two of them. The second loader failed to bind, nothing logged it, and its client pushed into the first loader's table. That fits two grpc_outage failures that showed together in one run: "rows landed twice: {0}" in a_dlq_refusing_past_the_hold_holds_only_the_rows_it_must_take and "the first record never landed" in a_push_is_answered_only_once_its_row_is_in_clickhouse. a_port_is_handed_out_once fails on the old allocator and passes on the new one.
Done when a failing integration test shows the loader's own log lines and no two test processes are handed the same port.