MCPcopy Index your code
hub / github.com/coder/coder / TestWaitBuffer_WaitFor_ContextExpired

Function TestWaitBuffer_WaitFor_ContextExpired

testutil/wait_buffer_test.go:49–58  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

47}
48
49func TestWaitBuffer_WaitFor_ContextExpired(t *testing.T) {
50 t.Parallel()
51
52 ctx, cancel := context.WithCancel(context.Background())
53 cancel() // Already expired.
54
55 wb := testutil.NewWaitBuffer()
56 err := wb.WaitFor(ctx, "never")
57 require.ErrorIs(t, err, context.Canceled)
58}
59
60func TestWaitBuffer_WaitFor_MultipleWrites(t *testing.T) {
61 t.Parallel()

Callers

nothing calls this directly

Calls 2

WaitForMethod · 0.95
NewWaitBufferFunction · 0.92

Tested by

no test coverage detected