From f64a6a3977673a14e3d1a5ab84fd82b827c2e79f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ricardo=20Fern=C3=A1ndez?= <80234551+printchard@users.noreply.github.com> Date: Tue, 9 Jul 2024 13:09:21 -0700 Subject: [PATCH] test/channelz: change channelz_test to use write data (#7396) --- test/channelz_test.go | 2 +- test/rawConnWrapper.go | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/test/channelz_test.go b/test/channelz_test.go index 7d8ea1367519..5bfa0f570083 100644 --- a/test/channelz_test.go +++ b/test/channelz_test.go @@ -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 { diff --git a/test/rawConnWrapper.go b/test/rawConnWrapper.go index 8814810a88dc..4928056ebe53 100644 --- a/test/rawConnWrapper.go +++ b/test/rawConnWrapper.go @@ -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