Repository navigation
test: wait on the clock in sync service tests - #64
Merged
Merged
Conversation
until() gave up silently after 20,000 event-loop turns. On the Windows release runner sign-in and sync runs had not finished by then, so tests went on early: the pairing test chose a repository before sign-in ended and was reset to choosingRepository, and others saw sync still running. Wait up to 10 seconds of wall-clock time and throw when that passes, so a slow wait fails where it happens.
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.
The v1.1.0 release build failed twice on Windows in
electron/sync-service.test.ts, in different tests each time: the pairing test sawchoosingRepositoryinstead ofpairing, then a rerun sawsyncinginstead ofidleand a missing reconnect prompt.Cause
The test helper
until()gave up silently after 20,000setImmediateturns. On the Windows release runner sign-in and sync runs had not finished by then, so tests went on early. In the pairing test the sign-in finishing afterwards set the phase back tochoosingRepository. Test-only: in the app a repository cannot be chosen before sign-in has listed them.Fix
until()waits against a 10 second wall-clock deadline and throws when it passes, so a wait that is too slow fails at the wait rather than in a later assertion.Testing