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

Function TestCheckpoint_CompleteTwice

agent/checkpoint_internal_test.go:24–34  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

22}
23
24func TestCheckpoint_CompleteTwice(t *testing.T) {
25 t.Parallel()
26 logger := slogtest.Make(t, &slogtest.Options{IgnoreErrors: true})
27 ctx := testutil.Context(t, testutil.WaitShort)
28 uut := newCheckpoint(logger)
29 err := xerrors.New("test")
30 uut.complete(err)
31 uut.complete(nil) // drops CRITICAL log
32 got := uut.wait(ctx)
33 require.Equal(t, err, got)
34}
35
36func TestCheckpoint_WaitComplete(t *testing.T) {
37 t.Parallel()

Callers

nothing calls this directly

Calls 6

ContextFunction · 0.92
newCheckpointFunction · 0.85
completeMethod · 0.80
NewMethod · 0.65
waitMethod · 0.45
EqualMethod · 0.45

Tested by

no test coverage detected