Skip to content

Improve test isolation with improved schema reset#190

Merged
teoljungberg merged 5 commits intomasterfrom
de-brittle-test-suite
Dec 15, 2025
Merged

Improve test isolation with improved schema reset#190
teoljungberg merged 5 commits intomasterfrom
de-brittle-test-suite

Conversation

@teoljungberg
Copy link
Owner

@teoljungberg teoljungberg commented Dec 15, 2025

Replace database_cleaner with a custom DatabaseReset module that
drops all non-system schemas between tests, ensuring complete isolation.

Changes:

  • Add DatabaseReset module that drops all user schemas (not just public)
  • Remove no unused database_cleaner gem
  • Add ensure block for search_path reset in multi-schema test
  • Update load_defaults to 7.2 (minimum supported Rails version)
  • Fix acceptance helper to use DatabaseReset

This tries to fix the intermittent test failures caused by leftover
schemas like test_schema and other persisting between test runs.

@teoljungberg teoljungberg changed the title Improve test isolation with comprehensive schema reset Improve test isolation with improved schema reset Dec 15, 2025
@teoljungberg teoljungberg marked this pull request as ready for review December 15, 2025 13:44
@teoljungberg teoljungberg merged commit e8bff38 into master Dec 15, 2025
9 checks passed
@teoljungberg teoljungberg deleted the de-brittle-test-suite branch December 15, 2025 13:44
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