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

Function TestControlPlaneBasic

tests/controlplane/controlplane_test.go:326–337  ·  view source on GitHub ↗

--------------------------------------------------------------------------- Tests ---------------------------------------------------------------------------

(t *testing.T)

Source from the content-addressed store, hash-verified

324 if err := db.QueryRow("SELECT 1").Scan(&result); err != nil {
325 t.Fatalf("SELECT 1 failed: %v", err)
326 }
327 if result != 1 {
328 t.Fatalf("Expected 1, got %d", result)
329 }
330}
331
332func TestControlPlaneConnectionWaitsForDelayedStartup(t *testing.T) {
333 h := startControlPlane(t, defaultOpts())
334 if err := h.sendSignal(syscall.SIGSTOP); err != nil {
335 t.Fatalf("Pause control plane: %v", err)
336 }
337 dialer := &delayedStartupDialer{connected: make(chan struct{})}
338 stopDelay := make(chan struct{})
339 resumeErr := make(chan error, 1)
340 go func() {

Callers

nothing calls this directly

Calls 4

startControlPlaneFunction · 0.85
defaultOptsFunction · 0.85
openConnMethod · 0.80
ScanMethod · 0.65

Tested by

no test coverage detected