test: pgstore test isolation — Truncate calls cause cross-test failures #243
Labels
No labels
bug
documentation
enhancement
investigation
nice-to-have
performance
production-ready
testing
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
ash/eskit#243
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Problem
Several pgstore tests call
store.Truncate(ctx)or similar table-wiping operations that affect other tests running in the same suite:benchmark_gaps_test.go:60—store.Truncate(ctx)conformance_test.go:92—store.Truncate(context.Background())When run as a full suite (
go test ./pgstore/), these wipe the events table between tests, causing unrelated tests to find 0 events and fail.All tests pass individually. ~9 fail when run together.
Solution
Options (pick one):
CREATE SCHEMA test_<uuid>) and drops it on cleanupOption 2 is simplest. Most tests already use unique IDs — just need to fix the few that Truncate.
Pre-existing
This is not caused by #240. These failures existed before the stream_type interface change.