feat(grpc): Support span streaming #6204
1 issue
find-bugs: Found 1 issue (1 medium)
Medium
Test asserts span ordering without sorting captured items - `tests/integrations/grpc/test_grpc_aio.py:141-146`
In test_grpc_server_starts_transaction (streaming branch), the test indexes spans[0] and spans[1] and asserts that spans[1] is the GRPC_SERVER span and spans[0] is the 'test' op span. However, the order in which streamed spans are flushed/captured is not guaranteed to follow this exact sequence (parent vs child completion order can vary). If the order changes, the test will fail or pass incorrectly. The user-visible consequence is flaky tests or false confidence in span content.
Also found at:
tests/integrations/grpc/test_grpc.py:80-82
Duration: 48.3s · Tokens: 420.7k in / 5.6k out · Cost: $2.48 (+merge: $0.00)
Annotations
Check warning on line 146 in tests/integrations/grpc/test_grpc_aio.py
sentry-warden / warden: find-bugs
Test asserts span ordering without sorting captured items
In test_grpc_server_starts_transaction (streaming branch), the test indexes `spans[0]` and `spans[1]` and asserts that `spans[1]` is the GRPC_SERVER span and `spans[0]` is the 'test' op span. However, the order in which streamed spans are flushed/captured is not guaranteed to follow this exact sequence (parent vs child completion order can vary). If the order changes, the test will fail or pass incorrectly. The user-visible consequence is flaky tests or false confidence in span content.
Check warning on line 82 in tests/integrations/grpc/test_grpc.py
sentry-warden / warden: find-bugs
[3YQ-ADJ] Test asserts span ordering without sorting captured items (additional location)
In test_grpc_server_starts_transaction (streaming branch), the test indexes `spans[0]` and `spans[1]` and asserts that `spans[1]` is the GRPC_SERVER span and `spans[0]` is the 'test' op span. However, the order in which streamed spans are flushed/captured is not guaranteed to follow this exact sequence (parent vs child completion order can vary). If the order changes, the test will fail or pass incorrectly. The user-visible consequence is flaky tests or false confidence in span content.