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

Function TestWaitBuffer_WaitForNth_AlreadySatisfied

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

Source from the content-addressed store, hash-verified

192}
193
194func TestWaitBuffer_WaitForNth_AlreadySatisfied(t *testing.T) {
195 t.Parallel()
196 ctx := testutil.Context(t, testutil.WaitShort)
197
198 wb := testutil.NewWaitBuffer()
199 _, err := wb.Write([]byte("Foo Foo Foo"))
200 require.NoError(t, err)
201
202 // All three occurrences already present.
203 require.NoError(t, wb.WaitForNth(ctx, "Foo", 3))
204}
205
206func TestWaitBuffer_RequireWaitFor_Timeout(t *testing.T) {
207 t.Parallel()

Callers

nothing calls this directly

Calls 4

WriteMethod · 0.95
WaitForNthMethod · 0.95
ContextFunction · 0.92
NewWaitBufferFunction · 0.92

Tested by

no test coverage detected