Skip to content

Wait for bidi RPC to finish in TestStreamPassthroughInterceptor

Sami Hiltunen requested to merge smh-fix-tracing-flake into master

TestStreamPassthroughInterceptor issuing an RPC and asserting the recorded tracing spans afterwards. The test is currently flaky as it doesn't wait for the RPC to finish before asserting the spans.

The test service set up in the test is sending a response and then closing the stream. However, the test body is just receiving the message but it doesn't wait for the stream to end. This then leads to a race between the server finishing the tracing span on RPC completion and the test body running the assertion.

Fix the flake by waiting for the RPC to finish before asserting the spans.

Closes #4840 (closed)

Merge request reports