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

Method TestBlockingPickTimeout

picker_wrapper_test.go:69–76  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

67}
68
69func (s) TestBlockingPickTimeout(t *testing.T) {
70 bp := newPickerWrapper()
71 ctx, cancel := context.WithTimeout(context.Background(), time.Millisecond)
72 defer cancel()
73 if _, err := bp.pick(ctx, true, balancer.PickInfo{}); status.Code(err) != codes.DeadlineExceeded {
74 t.Errorf("bp.pick returned error %v, want DeadlineExceeded", err)
75 }
76}
77
78func (s) TestBlockingPick(t *testing.T) {
79 bp := newPickerWrapper()

Callers

nothing calls this directly

Calls 4

CodeFunction · 0.92
newPickerWrapperFunction · 0.85
ErrorfMethod · 0.65
pickMethod · 0.45

Tested by

no test coverage detected