You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
t.Errorf("RST stream received with streamID: %d and code: %v, want streamID: 1 and code: http2.ErrCodeFlowControl", frame.Header().StreamID, http2.ErrCode(frame.ErrCode))
227
+
}
228
+
return
229
+
case*http2.PingFrame:
230
+
mu.Lock()
231
+
framer.WritePing(true, frame.Data)
232
+
mu.Unlock()
233
+
default:
234
+
t.Logf("Server received frame: %v", frame)
235
+
}
236
+
}
237
+
}()
238
+
239
+
// The server will send a partial gRPC message before cancelling the stream.
240
+
// The client should get a gRPC status with code CANCELLED.
241
+
client:=testgrpc.NewTestServiceClient(cc)
242
+
_, err=client.EmptyCall(ctx, &testpb.Empty{})
243
+
244
+
s, ok:=status.FromError(err)
245
+
if!ok {
246
+
t.Fatalf("client.EmptyCall() returned non-status error: %v", err)
247
+
}
248
+
ifs.Code() !=codes.Canceled {
249
+
t.Fatalf("client.EmptyCall() returned status %v with code %v, want %v", s, s.Code(), codes.Canceled)
0 commit comments