Skip to content

Fix Firefox test timeouts in DbWorker leader election tests#38

Merged
miccy merged 2 commits intosync/common-v8-2026-02-14-nextfrom
copilot/sub-pr-37
Feb 15, 2026
Merged

Fix Firefox test timeouts in DbWorker leader election tests#38
miccy merged 2 commits intosync/common-v8-2026-02-14-nextfrom
copilot/sub-pr-37

Conversation

Copy link
Copy Markdown

Copilot AI commented Feb 15, 2026

Firefox's WASM SQLite initialization takes >500ms, causing waitForLeader to timeout before receiving LeaderAcquired messages from DbWorker.

Changes

  • Increased waitForLeader timeout from 500ms to 2000ms in packages/web/test/DbWorker.test.ts

Affected Tests

Fixes 6 Firefox test failures:

  • same dbName can initialize from multiple ports without blocking
  • releases stale leader when no heartbeat arrives
  • keeps leader alive when heartbeats are delivered
const waitForLeader = (
  port: MessagePort<DbWorkerLeaderInput, DbWorkerLeaderOutput>,
  timeoutMs = 2_000,  // was 500
): Promise<DbWorkerLeaderOutput | null> => ...

✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Co-authored-by: miccy <9729864+miccy@users.noreply.github.com>
Copilot AI changed the title [WIP] Remove unnecessary files from web app build and documentation Fix Firefox test timeouts in DbWorker leader election tests Feb 15, 2026
Copilot AI requested a review from miccy February 15, 2026 06:55
@miccy miccy marked this pull request as ready for review February 15, 2026 07:47
@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Feb 15, 2026

Important

Review skipped

Bot user detected.

To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Comment @coderabbitai help to get the list of available commands and usage tips.

@miccy miccy merged commit d6f9e1b into sync/common-v8-2026-02-14-next Feb 15, 2026
2 checks passed
@miccy miccy deleted the copilot/sub-pr-37 branch February 15, 2026 08:01
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.

2 participants