test(driver): wait for wasm db sleep recovery#4905
test(driver): wait for wasm db sleep recovery#4905NathanFlurry wants to merge 1 commit intographite-base/4905from
Conversation
Review: test(driver): wait for wasm db sleep recoveryPR #4905 — Draft PR improving WASM sleep recovery reliability in driver tests for SQLite DB. OverviewThis PR makes two key changes to
The second change is the right architectural direction. The first is an improvement in clarity but still a polling approach. What's Good
Issues and Suggestions1. Per CLAUDE.md: "When a test flakes, root-cause the race, fix the underlying ordering in core/napi/typescript." The // The driver does not expose a "ready" signal after leaving the stopping window.
// Poll until the actor accepts DB access again, or until the deadline expires.
async function retryActorStoppingDbError<T>(A follow-up todo would also be worth capturing: add a "ready after sleep" lifecycle event so this retry can be replaced with event-driven coordination. 2. 30 seconds vs the native ~1.2 seconds ( // WASM remote SQLite sleep recovery involves a round-trip to the remote depot,
// which is significantly slower than the native in-process SQLite path.
const WASM_REMOTE_SLEEP_RECOVERY_TIMEOUT_MS = 30_000;3. After 4. for (let i = 0; i < LIFECYCLE_POLL_ATTEMPTS; i++) { // 40 * 25ms = 1 second maxThis is fine for native but may be insufficient for WASM where sleep recovery takes up to 30 seconds. Currently the WASM path would still hit this 1-second timeout when waiting for the initial sleep event in Minor
SummaryThe direction is right: event-driven sleep observation for the integrity test, honest retry semantics instead of |
3444072 to
4ade2d1
Compare
a6ba640 to
014ac10
Compare
014ac10 to
1899baf
Compare
4ade2d1 to
4931c2e
Compare
4931c2e to
f6d0558
Compare
1899baf to
009afe0
Compare

Description
Please include a summary of the changes and the related issue. Please also include relevant motivation and context.
Type of change
How Has This Been Tested?
Please describe the tests that you ran to verify your changes.
Checklist: