Skip to content

Make lifecycle tests meaningful and isolate test storage - #34

Open
jeregrine wants to merge 2 commits into
mainfrom
test/reliable-isolated-suite
Open

Make lifecycle tests meaningful and isolate test storage#34
jeregrine wants to merge 2 commits into
mainfrom
test/reliable-isolated-suite

Conversation

@jeregrine

Copy link
Copy Markdown
Member

Problem

Several lifecycle scenarios can pass without actually recovering a server: they inspect unchanged metadata, use non-restartable fixtures, or make assertions against unrelated objects. The discovery waiter consumes a timeout rather than observing completion.

Every invocation also contacts LocalStack and clears a shared bucket, even when the selected tests need no storage. Concurrent runs can erase each other's state or collide on EKV directories and node names.

Fix

  • Assert recovered process identity, stored state and ownership, and exact restart outcomes. Coordinate concurrent claims at the conditional-write boundary so the losing claim is exercised deliberately.
  • Wait for the started discovery task's successful result to be processed, distinguishing idle, failed, and completed cycles. Use a scoped GenServer debug hook rather than adding a production test API; manually driven fixtures disable automatic startup sweeps.
  • Make LocalStack and local EKV separate opt-in categories. Lazily create a suite-owned bucket and delete only that bucket after test supervisors stop; remove shared startup wiping and unused IAM setup.
  • Allocate worktree-local EKV directories and unique peer names, clean up directories on exit, and restore placement environment variables even after failed assertions.
  • Separate scripted retry outcomes from wall-clock deadlines, retain explicit deadline coverage, and wait for reported capacity to be released rather than treating child death as a capacity barrier. Share the bounded eventual-assertion helper.
  • Document suite selection, resource isolation, and a pinned LocalStack version.

Supporting information

Only tests, support code, and documentation change; production behavior is unchanged.

The default selection excludes LocalStack, EKV, credentialed integration, and stress cases. Service-backed CI, including #28, must explicitly opt into the storage categories to retain that coverage.

Discovery synchronization overlaps #30, and storage isolation overlaps #33. These are alternative implementations, not independent changes to merge blindly. Unlike #33, this branch also makes local EKV opt-in. #31 adds complementary recovery assertions in the same files; #32 separately strengthens EKV teardown and dirty-state persistence coverage.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant