Skip to content

Commit 24816f2

Browse files
committed
add test with invalid client id
1 parent 4f03f3f commit 24816f2

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

test/end2end_test.go

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3901,6 +3901,28 @@ func (s) TestClientRequestBodyErrorCloseAfterLength(t *testing.T) {
39013901
}
39023902
}
39033903

3904+
func testClientInvalidStreamID(t *testing.T, e env) {
3905+
te := newTest(t, e)
3906+
ts := &funcServer{streamingInputCall: func(stream testgrpc.TestService_StreamingInputCallServer) error {
3907+
_, err := stream.Recv()
3908+
return err
3909+
}}
3910+
te.startServer(ts)
3911+
defer te.tearDown()
3912+
te.withServerTester(func(st *serverTester) {
3913+
st.writeHeadersGRPC(2, "/grpc.testing.TestService/StreamingInputCall", true)
3914+
st.writeData(2, true, []byte{0, 0, 0, 0, 5})
3915+
// Reads the frame?
3916+
st.wantAnyFrame()
3917+
})
3918+
}
3919+
3920+
func (s) TestClientInvalidStreamID(t *testing.T) {
3921+
for _, e := range listTestEnv() {
3922+
testClientInvalidStreamID(t, e)
3923+
}
3924+
}
3925+
39043926
func testClientRequestBodyErrorCloseAfterLength(t *testing.T, e env) {
39053927
te := newTest(t, e)
39063928
te.declareLogNoise("Server.processUnaryRPC failed to write status")

0 commit comments

Comments
 (0)