MCPcopy Create free account
hub / github.com/PostHog/duckgres / waitForRecorder

Function waitForRecorder

cmd/cache-proxy/proxy_test.go:65–74  ·  view source on GitHub ↗
(t *testing.T, ch <-chan *httptest.ResponseRecorder, msg string)

Source from the content-addressed store, hash-verified

63}
64
65func waitForRecorder(t *testing.T, ch <-chan *httptest.ResponseRecorder, msg string) *httptest.ResponseRecorder {
66 t.Helper()
67 select {
68 case rec := <-ch:
69 return rec
70 case <-time.After(2 * time.Second):
71 t.Fatal(msg)
72 return nil
73 }
74}
75
76// captureSlog redirects slog.Default to a buffer for the duration of a test
77// and returns the buffer + a restore function. Used by the forward-uncached

Calls

no outgoing calls

Tested by

no test coverage detected