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

Function TestDuckLakeCheckpointerStopIsIdempotent

server/checkpoint_test.go:9–26  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

7)
8
9func TestDuckLakeCheckpointerStopIsIdempotent(t *testing.T) {
10 db, err := sql.Open("duckdb", ":memory:")
11 if err != nil {
12 t.Fatalf("open duckdb: %v", err)
13 }
14
15 c := &DuckLakeCheckpointer{
16 db: db,
17 interval: time.Hour,
18 done: make(chan struct{}),
19 loopDone: make(chan struct{}),
20 }
21
22 go c.loop()
23
24 c.Stop()
25 c.Stop() // must not panic or deadlock
26}
27
28func TestDuckLakeCheckpointerDisabledWhenNoMetadataStore(t *testing.T) {
29 c, err := NewDuckLakeCheckpointer(Config{

Callers

nothing calls this directly

Calls 3

loopMethod · 0.95
StopMethod · 0.95
OpenMethod · 0.45

Tested by

no test coverage detected