MCPcopy Index your code
hub / github.com/foxcpp/maddy / TestFuture_WaitCtx

Function TestFuture_WaitCtx

framework/future/future_test.go:67–75  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

65}
66
67func TestFuture_WaitCtx(t *testing.T) {
68 f := New()
69 ctx, cancel := context.WithTimeout(context.Background(), 500*time.Millisecond)
70 defer cancel()
71 _, err := f.GetContext(ctx)
72 if !errors.Is(err, context.DeadlineExceeded) {
73 t.Fatal("context is not cancelled")
74 }
75}

Callers

nothing calls this directly

Calls 2

GetContextMethod · 0.80
NewFunction · 0.70

Tested by

no test coverage detected