Repository navigation
fix: resolve flaky tests and stale migration docs - #98
Merged
Merged
Conversation
Three known issues fixed: 1. TestStreamOutputPersistBeforePushOrder race flake — the unbuffered channel send unblocks before the receiver goroutine appends to the order slice, making the assertion nondeterministic. Fixed by adding a buffered done channel that the receiver signals after each append, and draining it before asserting order. 2. TestGetAuditEventsFiltered cross-package DB race — config_handlers_test used devteam_test_db (same as internal/db tests), causing truncateAllTables to wipe audit_events while internal/db tests read them. Fixed by switching config handler tests to devteam_test_config. 3. Stale migration 018 docs — ci-config.md and quality-gates.md referenced migration 018 (settings_and_admin_ui) which was renumbered to 019 during the rebase. All file refs, test names, and migration numbers updated to 019.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Three known issues fixed in one PR:
1. Flaky race test: TestStreamOutputPersistBeforePushOrder
The unbuffered channel send unblocks before the receiver goroutine appends to the order slice, making the assertion nondeterministic. The race detector intermittently caught .
Fix: Added a buffered done channel that the receiver signals after each append. The test drains the done channel before asserting order, ensuring all receiver appends have landed.
2. Flaky cross-package test: TestGetAuditEventsFiltered
used (same DB as tests). When CI runs packages in parallel, wiped while tests were reading them.
Fix: Switched config handler tests to (same DB the package uses).
3. Stale migration 018 docs
and referenced migration 018 () which was renumbered to 019 during the PR rebase. All file refs, test names, and migration numbers updated.
Verification