(t *testing.T)
| 7 | ) |
| 8 | |
| 9 | func 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 | |
| 28 | func TestDuckLakeCheckpointerDisabledWhenNoMetadataStore(t *testing.T) { |
| 29 | c, err := NewDuckLakeCheckpointer(Config{ |