Skip to content

Database state not cleaned between integration test runs — tests are order-dependent #972

Description

@hman38705

Labels: testing, database

Priority: High

Description

Integration tests in tests/ do not clean up database state after each test. Tests that insert rows leave data that can affect subsequent tests, causing intermittent failures depending on test execution order.

Acceptance Criteria

  • Add a test fixture that wraps each test in a database transaction and rolls back after the test
  • Alternatively, truncate relevant tables in a setup/teardown hook
  • Add a CI assertion that runs tests in random order twice and verifies results are identical
  • Document the fixture pattern in CONTRIBUTING.md

Metadata

Metadata

Assignees

Labels

Stellar WaveIssues in the Stellar wave programdatabaseDatabase schema, migrations, and queriestestingTest coverage, fixtures, and test infra

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions