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

Method waitForLog

tests/controlplane/controlplane_test.go:237–246  ·  view source on GitHub ↗
(substr string, timeout time.Duration)

Source from the content-addressed store, hash-verified

235
236func (h *cpHarness) waitForLog(substr string, timeout time.Duration) error {
237 deadline := time.Now().Add(timeout)
238 for time.Now().Before(deadline) {
239 if strings.Contains(h.logBuf.String(), substr) {
240 return nil
241 }
242 time.Sleep(100 * time.Millisecond)
243 }
244 return fmt.Errorf("log %q not found after %v", substr, timeout)
245}
246
247func (h *cpHarness) cleanup(t *testing.T) {
248 t.Helper()
249 defer func() {

Callers 7

startControlPlaneFunction · 0.95
doHandoverMethod · 0.95
TestDoubleUSR1IgnoredFunction · 0.80

Calls 3

AddMethod · 0.80
NowMethod · 0.80
StringMethod · 0.45

Tested by

no test coverage detected