MCPcopy
hub / github.com/grpc/grpc-go / wantGoAway

Method wantGoAway

test/servertester.go:152–165  ·  view source on GitHub ↗
(errCode http2.ErrCode)

Source from the content-addressed store, hash-verified

150}
151
152func (st *serverTester) wantGoAway(errCode http2.ErrCode) *http2.GoAwayFrame {
153 f, err := st.readFrame()
154 if err != nil {
155 st.t.Fatalf("Error while expecting an RST frame: %v", err)
156 }
157 gaf, ok := f.(*http2.GoAwayFrame)
158 if !ok {
159 st.t.Fatalf("got a %T; want *http2.GoAwayFrame", f)
160 }
161 if gaf.ErrCode != errCode {
162 st.t.Fatalf("expected GOAWAY error code '%v', got '%v'", errCode.String(), gaf.ErrCode.String())
163 }
164 return gaf
165}
166
167func (st *serverTester) wantPing() *http2.PingFrame {
168 f, err := st.readFrame()

Calls 3

readFrameMethod · 0.95
FatalfMethod · 0.65
StringMethod · 0.65