-
Notifications
You must be signed in to change notification settings - Fork 4.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
test: Add a test for decompression exceeding max receive message size #7938
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #7938 +/- ##
==========================================
- Coverage 82.08% 82.01% -0.07%
==========================================
Files 379 379
Lines 38261 38261
==========================================
- Hits 31406 31381 -25
- Misses 5551 5569 +18
- Partials 1304 1311 +7 |
// Use the name of an existing compressor to avoid interactions with other | ||
// tests since compressors can't be un-registered. | ||
return "gzip" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we use t.Name
as the name for the compressor and thereby avoid interactions with other tests?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tried this earlier, but the clients in the following test pick up the registered compressor and start failing.
grpc-go/test/compressor_test.go
Line 617 in e8055ea
func (s) TestClientSupportedCompressors(t *testing.T) { |
There's no way to unregister a compressor presently. There is a deprecated WithCompressor
that allows using a compressor without registration that I can use.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you mind filing an issue for us to think about how we can handle this. It is not ideal for one test to influence every test that comes after it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Opened #7960.
This reverts commit 63320aa.
During the review of #7918, it was seen that even if the sender/receiver returns a
status.Internal
error code instead ofstatus.ResourceExhausted
when decompression results in a message exceeding the configured max receive message size, no tests fail. This PR adds a test to catch such regressions in the future.RELEASE NOTES: N/A