Skip to content

fix: resolve flaky tests and stale migration docs - #98

Merged
MichielDean merged 1 commit into
mainfrom
fix/flaky-tests-and-stale-docs
Jul 26, 2026
Merged

MichielDean merged 1 commit into
mainfrom
fix/flaky-tests-and-stale-docs

Conversation

@MichielDean

Copy link
Copy Markdown
Owner

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

  • Race test passes 5/5 under
  • Full suite: 557 passed in 19 packages
  • clean

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.
@MichielDean
MichielDean merged commit 5115381 into main Jul 26, 2026
2 of 3 checks passed
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