REGRESSION(291435@main...291445@main): [iOS Debug] TestWebKitAPI.IndexedDB.IndexedDBSuspendImminently is a failure/timeout (flaky in EWS)#42962
Conversation
Collaborator
|
EWS run on current version of this PR (hash 2c313a3) Details |
szewai
reviewed
Mar 24, 2025
Comment on lines
-51
to
-53
Contributor
There was a problem hiding this comment.
Can we just do here:
receivedScriptMessage = true;
scriptMessages.append(message);
And use [getNextMessage() body] below?
(There is a getNextMessage in DeprecatedGlobalValues.h)
Contributor
Author
There was a problem hiding this comment.
We could, but this is a non-global replacement for DeprecatedGlobalValues. I think it would be better to replace all use of getNextMessage() with TestScriptMessageHandler
szewai
approved these changes
Mar 25, 2025
2c313a3 to
10793fb
Compare
…xedDB.IndexedDBSuspendImminently is a failure/timeout (flaky in EWS) https://bugs.webkit.org/show_bug.cgi?id=290203 rdar://147599411 Reviewed by Sihui Liu. TestWebKitAPI::Util::run doesn't necessarily stop everything when the condition becomes true. There is a chance that more work can be done before it returns. When multiple messages are awaited, sometimes we'll wait for the first one and the first and second one are received before TestWebKitAPI::Util::run returns, then when we try to wait for the second one, no more messages come. I introduce TestScriptMessageHandler with a Deque to make it more robust. If it has already received a message, it just returns it immediately. If it receives too many messages, it'll hang on to them until later. A similar techinque is already used in TestWKWebView.waitForMessages * Tools/TestWebKitAPI/SourcesCocoa.txt: * Tools/TestWebKitAPI/TestScriptMessageHandler.mm: Added. (-[TestScriptMessageHandler waitForMessage]): (-[TestScriptMessageHandler userContentController:didReceiveScriptMessage:]): * Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj: * Tools/TestWebKitAPI/Tests/WebKitCocoa/IndexedDBSuspendImminently.mm: (TEST(IndexedDB, IndexedDBSuspendImminently)): (TEST(IndexedDB, SuspendImminentlyForThirdPartyDatabases)): (-[IndexedDBSuspendImminentlyMessageHandler userContentController:didReceiveScriptMessage:]): Deleted. (runUntilMessageReceived): Deleted. (keepNetworkProcessActive): Deleted. (TEST(IndexedDB, DISABLED_IndexedDBSuspendImminently)): Deleted. * Tools/TestWebKitAPI/cocoa/TestScriptMessageHandler.h: Added. * Tools/TestWebKitAPI/cocoa/TestScriptMessageHandler.mm: Added. (-[TestScriptMessageHandler waitForMessage]): (-[TestScriptMessageHandler userContentController:didReceiveScriptMessage:]): Canonical link: https://commits.webkit.org/292658@main
10793fb to
a899e6f
Compare
Collaborator
|
Committed 292658@main (a899e6f): https://commits.webkit.org/292658@main Reviewed commits have been landed. Closing PR #42962 and removing active labels. |
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.
🧪 api-ios
a899e6f
2c313a3