Skip to content

Commit

Permalink
respect maximum frame size of 16KB in channelz test
Browse files Browse the repository at this point in the history
  • Loading branch information
dfawley committed Sep 10, 2019
1 parent 420962c commit b2eaf33
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion test/channelz_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -854,7 +854,11 @@ func doServerSideInitiatedFailedStreamWithClientBreakFlowControl(tc testpb.TestS
}
// sleep here to make sure header frame being sent before the data frame we write directly below.
time.Sleep(10 * time.Millisecond)
payload := make([]byte, 65537)
payload := make([]byte, 16384)
dw.getRawConnWrapper().writeRawFrame(http2.FrameData, 0, tc.(*testServiceClientWrapper).getCurrentStreamID(), payload)
dw.getRawConnWrapper().writeRawFrame(http2.FrameData, 0, tc.(*testServiceClientWrapper).getCurrentStreamID(), payload)
dw.getRawConnWrapper().writeRawFrame(http2.FrameData, 0, tc.(*testServiceClientWrapper).getCurrentStreamID(), payload)
dw.getRawConnWrapper().writeRawFrame(http2.FrameData, 0, tc.(*testServiceClientWrapper).getCurrentStreamID(), payload)
dw.getRawConnWrapper().writeRawFrame(http2.FrameData, 0, tc.(*testServiceClientWrapper).getCurrentStreamID(), payload)
if _, err := stream.Recv(); err == nil || status.Code(err) != codes.ResourceExhausted {
t.Fatalf("%v.Recv() = %v, want error code: %v", stream, err, codes.ResourceExhausted)
Expand Down

0 comments on commit b2eaf33

Please sign in to comment.