Skip to content

test: remove maintenance lock race from Windows suite - #223

Merged
khaira777 merged 1 commit into
mainfrom
fix/maintenance-test-stability
Aug 9, 2026
Merged

khaira777 merged 1 commit into
mainfrom
fix/maintenance-test-stability

Conversation

@khaira777

Copy link
Copy Markdown
Contributor

The post-merge Windows matrix exposed a race in tests/database-maintenance-lock.test.ts: it relied on a 1ms delay to assume the concurrent maintenance lock had started. On Windows the request sometimes arrived before the lock set its active flag, producing a false 200 instead of the expected 503.

This test-only follow-up waits for the existing maintenance-start listener signal, then issues the concurrent request and unregisters the listener in cleanup. Production code is unchanged.

Local verification:

  • npm run build
  • maintenance-lock test passed
  • 20 repeated maintenance-lock runs passed

This addresses the failed Windows matrix run on merged main commit e341d449.

Wait for the maintenance-start signal before issuing the concurrent request instead of relying on a platform-dependent one-millisecond delay. This prevents the Windows full-suite test from racing the lock startup while preserving production behavior.
@khaira777
khaira777 requested a review from itsbkm as a code owner August 9, 2026 03:17
@khaira777

Copy link
Copy Markdown
Contributor Author

Validation

This is a deterministic test-only follow-up to the Windows matrix failure on e341d449. The test now waits for the maintenance-start signal instead of a platform-dependent 1ms delay.

Local checks passed:

  • npm run build
  • maintenance-lock regression test
  • 20 repeated maintenance-lock runs

All PR checks passed. No production code changes are included.

@khaira777
khaira777 merged commit 5daf0ba into main Aug 9, 2026
5 checks passed
@khaira777
khaira777 deleted the fix/maintenance-test-stability branch August 9, 2026 03:22
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