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

Function waitForSignal

coderd/x/chatd/configcache_internal_test.go:699–707  ·  view source on GitHub ↗
(t *testing.T, ch <-chan struct{})

Source from the content-addressed store, hash-verified

697}
698
699func waitForSignal(t *testing.T, ch <-chan struct{}) {
700 t.Helper()
701
702 select {
703 case <-ch:
704 case <-time.After(testutil.WaitShort):
705 t.Fatal("timed out waiting for signal")
706 }
707}
708
709// TestConfigCache_CallerCancellation verifies the DoChan-based
710// cancellation semantics across all four cache methods:

Calls 2

FatalMethod · 0.80
HelperMethod · 0.65

Tested by

no test coverage detected