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

Method ExecContext

server/server_test.go:69–86  ·  view source on GitHub ↗
(_ context.Context, query string, _ ...any)

Source from the content-addressed store, hash-verified

67 "DefaultControlPlaneIdleTimeout = %v: too long to hold a pinned worker by default",
68 DefaultControlPlaneIdleTimeout,
69 )
70 }
71}
72
73func TestNormalizeIdleTimeout(t *testing.T) {
74 const def = 60 * time.Second
75 cases := []struct {
76 name string
77 configured time.Duration
78 want time.Duration
79 }{
80 {"unset uses default", 0, def},
81 {"negative disables", -1, 0},
82 {"explicit positive passes through", 90 * time.Second, 90 * time.Second},
83 {"any negative disables", -5 * time.Minute, 0},
84 }
85 for _, tc := range cases {
86 if got := NormalizeIdleTimeout(tc.configured, def); got != tc.want {
87 t.Errorf("%s: NormalizeIdleTimeout(%v, %v) = %v, want %v", tc.name, tc.configured, def, got, tc.want)
88 }
89 }

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected