MCPcopy Create free account
hub / github.com/docker/buildx / TestTimeout

Function TestTimeout

util/waitmap/waitmap_test.go:31–42  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

29}
30
31func TestTimeout(t *testing.T) {
32 m := New()
33
34 m.Set("foo", "bar")
35
36 ctx, cancel := context.WithTimeoutCause(context.TODO(), 100*time.Millisecond, nil)
37 defer cancel()
38
39 _, err := m.Get(ctx, "bar")
40 require.Error(t, err)
41 require.ErrorIs(t, err, context.DeadlineExceeded)
42}
43
44func TestBlocking(t *testing.T) {
45 m := New()

Callers

nothing calls this directly

Calls 4

NewFunction · 0.70
GetMethod · 0.65
SetMethod · 0.45
ErrorMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…