Skip to content

Commit

Permalink
test/channelz: change channelz_test to use write data (#7396)
Browse files Browse the repository at this point in the history
  • Loading branch information
printchard authored Jul 9, 2024
1 parent daab563 commit f64a6a3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion test/channelz_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1086,7 +1086,7 @@ func (s) TestCZClientAndServerSocketMetricsStreamsCountFlowControlRSTStream(t *t
go func() {
payload := make([]byte, 16384)
for i := 0; i < 6; i++ {
dw.getRawConnWrapper().writeRawFrame(http2.FrameData, 0, tc.getCurrentStreamID(), payload)
dw.getRawConnWrapper().writeDataFrame(tc.getCurrentStreamID(), payload)
}
}()
if _, err := stream.Recv(); status.Code(err) != codes.ResourceExhausted {
Expand Down
4 changes: 2 additions & 2 deletions test/rawConnWrapper.go
Original file line number Diff line number Diff line change
Expand Up @@ -239,8 +239,8 @@ func (rcw *rawConnWrapper) writeGoAway(maxStreamID uint32, code http2.ErrCode, d
return nil
}

func (rcw *rawConnWrapper) writeRawFrame(t http2.FrameType, flags http2.Flags, streamID uint32, payload []byte) error {
if err := rcw.fr.WriteRawFrame(t, flags, streamID, payload); err != nil {
func (rcw *rawConnWrapper) writeDataFrame(streamID uint32, payload []byte) error {
if err := rcw.fr.WriteData(streamID, false, payload); err != nil {
return fmt.Errorf("error writing Raw Frame: %v", err)
}
return nil
Expand Down

0 comments on commit f64a6a3

Please sign in to comment.