integration: add stress and multiplexing tests#54
Open
shubhamdhama wants to merge 1 commit intoshubham/enable-stream-multiplexingfrom
Open
integration: add stress and multiplexing tests#54shubhamdhama wants to merge 1 commit intoshubham/enable-stream-multiplexingfrom
shubhamdhama wants to merge 1 commit intoshubham/enable-stream-multiplexingfrom
Conversation
Add stress tests targeting concurrency bugs in the multiplexing stack (MuxWriter, packetQueue, manager, activeStreams) and correctness tests for stream isolation under cancel, error, and connection close. Stress tests (stress_test.go): - SustainedConcurrentStreams: 50 bidi streams x 100 echo messages, validates no cross-stream data corruption. - RapidOpenCloseCycles: 500 sequential create/use/destroy cycles on one connection. - CancelStorm: 30 streams with ~50% randomly cancelled mid-traffic, verifying cancel isolation. - ShutdownDuringActivity: conn.Close() with 20 active streams, deadlock detection. - MixedRPCTypes: 30 goroutines x 10 rounds of randomly chosen RPC types (unary, client-streaming, server-streaming, bidi) on one connection. - ConcurrentCancelCloseTransportClose: triple-race shutdown (cancel + conn.Close + transport.Close) with active streams. - ConcurrentUnary: 100 goroutines x 50 unary RPCs (sustained throughput). - BurstUnary: 1000 goroutines x 1 unary RPC (burst contention). Multiplexing tests (multiplex_test.go): - CancelIsolation, ErrorIsolation, ConnCloseWithActiveStreams, TransportCloseTerminatesAllStreams. Transport selection is randomized per test (pipe or TCP loopback), with a -transport flag override for deterministic reproduction. All tests use goleak for goroutine leak detection. Moves TestConcurrentStreams and TestConcurrent from simple_test.go into the stress suite as SustainedConcurrentStreams and BurstUnary.
3eedc39 to
ad9443c
Compare
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.
Add stress tests targeting concurrency bugs in the multiplexing stack
(MuxWriter, packetQueue, manager, activeStreams) and correctness tests
for stream isolation under cancel, error, and connection close.
Stress tests (stress_test.go):
validates no cross-stream data corruption.
connection.
verifying cancel isolation.
detection.
(unary, client-streaming, server-streaming, bidi) on one connection.
conn.Close + transport.Close) with active streams.
Multiplexing tests (multiplex_test.go):
TransportCloseTerminatesAllStreams.
Transport selection is randomized per test (pipe or TCP loopback), with
a -stress.transport flag override for deterministic reproduction. All
tests use goleak for goroutine leak detection.
Moves TestConcurrentStreams and TestConcurrent from simple_test.go into
the stress suite as SustainedConcurrentStreams and BurstUnary.