-
Notifications
You must be signed in to change notification settings - Fork 4.5k
Cardinality violations in Client streaming and Unary RPC. #8330
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
base: master
Are you sure you want to change the base?
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #8330 +/- ##
==========================================
- Coverage 82.25% 82.15% -0.11%
==========================================
Files 417 419 +2
Lines 41356 42025 +669
==========================================
+ Hits 34017 34524 +507
- Misses 5923 6031 +108
- Partials 1416 1470 +54
🚀 New features to boost your workflow:
|
@Pranjali-2501 please use the |
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.
Looks great, just a couple really small things. Thanks!
@@ -3739,6 +3739,39 @@ func (s) TestClientStreaming_ReturnErrorAfterSendAndClose(t *testing.T) { | |||
} | |||
} | |||
|
|||
// Tests that a client receives a cardinality violation error for client-streaming | |||
// RPCs if the server call SendAndClose after calling SendAndClose. |
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.
// RPCs if the server call SendAndClose after calling SendAndClose. | |
// RPCs if the server calls SendAndClose multiple times. |
t.Fatalf("stream.Send(_) = %v, want <nil>", err) | ||
} | ||
if _, err := stream.CloseAndRecv(); status.Code(err) != codes.Internal { | ||
t.Fatalf("stream.CloseAndRecv() = %v, want error %s", err, codes.Internal) |
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.
t.Fatalf("stream.CloseAndRecv() = %v, want error %s", err, codes.Internal) | |
t.Fatalf("stream.CloseAndRecv() = %v, want error with status code %s", err, codes.Internal) |
Client should ensure an
INTERNAL
error is returned for non-server streaming RPCs if the server attempts to send more than one response.Currently it is returning
UNKNOWN
, which should not be the case for cardinality violations.Filed in #7286
RELEASE NOTES: N/A