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

Function openAttachTestDB

server/attach_timeout_test.go:11–19  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

9)
10
11func openAttachTestDB(t *testing.T) *sql.DB {
12 t.Helper()
13 db, err := sql.Open("duckdb", ":memory:")
14 if err != nil {
15 t.Fatalf("open duckdb: %v", err)
16 }
17 t.Cleanup(func() { _ = db.Close() })
18 return db
19}
20
21// TestAttachStepExecerFastStatement verifies the happy path: statements that
22// finish within the deadline behave exactly like plain Exec/QueryRow.

Calls 2

CloseMethod · 0.65
OpenMethod · 0.45

Tested by

no test coverage detected