Skip to content

Commit f64a6a3

Browse files
authored
test/channelz: change channelz_test to use write data (#7396)
1 parent daab563 commit f64a6a3

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

Diff for: test/channelz_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -1086,7 +1086,7 @@ func (s) TestCZClientAndServerSocketMetricsStreamsCountFlowControlRSTStream(t *t
10861086
go func() {
10871087
payload := make([]byte, 16384)
10881088
for i := 0; i < 6; i++ {
1089-
dw.getRawConnWrapper().writeRawFrame(http2.FrameData, 0, tc.getCurrentStreamID(), payload)
1089+
dw.getRawConnWrapper().writeDataFrame(tc.getCurrentStreamID(), payload)
10901090
}
10911091
}()
10921092
if _, err := stream.Recv(); status.Code(err) != codes.ResourceExhausted {

Diff for: test/rawConnWrapper.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -239,8 +239,8 @@ func (rcw *rawConnWrapper) writeGoAway(maxStreamID uint32, code http2.ErrCode, d
239239
return nil
240240
}
241241

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

0 commit comments

Comments
 (0)