Repository navigation
Fix flaky CI tests (test_identity_delegate timing out after 10 seconds) - #81
Merged
Merged
Conversation
Since the Swift 6 port, every EdgeAPI created without customUserAgent queues a main-actor task that builds a hidden WKWebView. The unit tests create ~70 such instances without yielding the main thread, so the tasks pile up and drain at the start of the integration tests, delaying the @mainactor setUp and the delegate callbacks past the 10s wait in test_identify_delegate. Share one lookup across all instances; an empty result is not kept so a later instance can retry. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
juanli16
approved these changes
Oct 29, 2026
mosherBT
approved these changes
Oct 29, 2026
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.
Why
test_identify_delegatehas been failing intermittently on CI since 1.3.0 (Exceeded timeout of 10 seconds), and passes on rerun.This isn't caused by the live API being slow.
Since #72 (Swift 6 port), every
EdgeAPIcreated withoutcustomUserAgentqueues aTask { @MainActor in … }that builds a hidden full-screenWKWebViewto readnavigator.userAgent. The unit tests create about 70 such instances (the URL-generation test alone builds 64) and never free the main thread, so the tasks pile up. They all run at the start of the integration tests:@MainActorsetUpwaits behind them;