Bug 168091 - [macOS debug] LayoutTest inspector/worker/resources-in-worker.html is a flaky timeout
Summary: [macOS debug] LayoutTest inspector/worker/resources-in-worker.html is a flaky...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Inspector (show other bugs)
Version: Other
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Joseph Pecoraro
URL:
Keywords: InRadar
: 175661 (view as bug list)
Depends on:
Blocks:
 
Reported: 2017-02-09 16:45 PST by Ryan Haddad
Modified: 2018-08-13 15:32 PDT (History)
8 users (show)

See Also:


Attachments
[PATCH] Proposed Fix (6.05 KB, patch)
2018-08-10 17:38 PDT, Joseph Pecoraro
ews-watchlist: commit-queue-
Details | Formatted Diff | Diff
Archive of layout-test-results from ews101 for mac-sierra (2.35 MB, application/zip)
2018-08-10 18:44 PDT, EWS Watchlist
no flags Details
Archive of layout-test-results from ews104 for mac-sierra-wk2 (2.86 MB, application/zip)
2018-08-10 18:55 PDT, EWS Watchlist
no flags Details
[PATCH] Proposed Fix (9.98 KB, patch)
2018-08-10 19:00 PDT, Joseph Pecoraro
drousso: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Comment 1 Ryan Haddad 2017-02-09 16:47:58 PST
Marked test as flaky in http://trac.webkit.org/projects/webkit/changeset/212006
Comment 2 Matt Lewis 2017-12-06 16:49:29 PST
The test appears to no longer be timing out but rather the test is now a flaky failure on macOS Release

https://build.webkit.org/results/Apple%20High%20Sierra%20Release%20WK2%20(Tests)/r225599%20(1589)/results.html

diff:
--- /Volumes/Data/slave/highsierra-release-tests-wk2/build/layout-test-results/inspector/worker/resources-in-worker-expected.txt
+++ /Volumes/Data/slave/highsierra-release-tests-wk2/build/layout-test-results/inspector/worker/resources-in-worker-actual.txt
@@ -1,64 +1,13 @@
-CONSOLE MESSAGE: line 1: Unhandled Promise Rejection: TypeError: The requested URL was not found on this server.
 Test for Resources in a Worker.
 
 
 == Running test suite: Worker.Resources
 -- Running test case: Worker.Resource.Start
-PASS: Added Target should have Worker type.
+-- Running test case: Worker.Resource.XHR
+!! EXCEPTION: null is not an object (evaluating 'workerTarget.resourceCollection')
+Stack Trace: #0: (anonymous) (test)
+#1: initializePromise [native code]
+#2: Promise [native code]
+#3: (anonymous) (TestCombined.js:1454:35)
+#4: promiseReactionJob [native code]
 
--- Running test case: Worker.Resource.XHR
-PASS: Worker Target should have 1 resource.
-PASS: Worker Target should dispatch ResourceAdded event.
-PASS: Resource should be XHR.
-PASS: Resource should be tied to the Worker Target.
-PASS: Resource has no parent frame.
-PASS: Worker Target should have 2 resources.
-RESOURCES:
-inspector/worker/resources/resource-utilities.js
-inspector/worker/resources/dataXHR.json
-
--- Running test case: Main.Resource.XHR
-PASS: Worker Target should still have 2 resources.
-PASS: Frame should dispatch ResourceWasAdded event.
-PASS: Resource should be XHR.
-PASS: Resource should be tied to the Main Target.
-PASS: Resource parentFrame is the main frame.
-PASS: Worker Target should still have 2 resources.
-RESOURCES:
-inspector/worker/resources/resource-utilities.js
-inspector/worker/resources/dataXHR.json
-
--- Running test case: Worker.Resource.Fetch
-PASS: Worker Target should have 2 resources.
-PASS: Worker Target should dispatch ResourceAdded event.
-PASS: Resource should be tied to the Worker Target.
-PASS: Resource has no parent frame.
-PASS: Worker Target should have 3 resources.
-RESOURCES:
-inspector/worker/resources/resource-utilities.js
-inspector/worker/resources/dataXHR.json
-inspector/worker/resources/dataFetch.json
-
--- Running test case: Main.Resource.Fetch
-PASS: Worker Target should still have 3 resources.
-PASS: Frame should dispatch ResourceWasAdded event.
-PASS: Resource should be tied to the Main Target.
-PASS: Resource parentFrame is the main frame.
-PASS: Worker Target should still have 3 resources.
-RESOURCES:
-inspector/worker/resources/resource-utilities.js
-inspector/worker/resources/dataXHR.json
-inspector/worker/resources/dataFetch.json
-
--- Running test case: Worker.Resource.ImportScript
-PASS: Worker Target should still have 3 resources.
-PASS: Worker Target should dispatch ResourceAdded event.
-PASS: Resource should be tied to the Worker Target.
-PASS: Resource has no parent frame.
-PASS: Worker Target should have 4 resources.
-RESOURCES:
-inspector/worker/resources/resource-utilities.js
-inspector/worker/resources/dataXHR.json
-inspector/worker/resources/dataFetch.json
-inspector/worker/resources/worker-import-1.js
-

Adjusted Expectations in:
https://trac.webkit.org/changeset/225612/webkit
Comment 3 Joseph Pecoraro 2018-08-10 17:35:59 PDT
*** Bug 175661 has been marked as a duplicate of this bug. ***
Comment 4 Joseph Pecoraro 2018-08-10 17:38:57 PDT
Created attachment 346945 [details]
[PATCH] Proposed Fix
Comment 5 EWS Watchlist 2018-08-10 18:44:36 PDT Comment hidden (obsolete)
Comment 6 EWS Watchlist 2018-08-10 18:44:38 PDT Comment hidden (obsolete)
Comment 7 EWS Watchlist 2018-08-10 18:55:34 PDT Comment hidden (obsolete)
Comment 8 EWS Watchlist 2018-08-10 18:55:36 PDT Comment hidden (obsolete)
Comment 9 Joseph Pecoraro 2018-08-10 19:00:39 PDT
Created attachment 346950 [details]
[PATCH] Proposed Fix
Comment 10 Devin Rousso 2018-08-11 10:35:34 PDT
Comment on attachment 346950 [details]
[PATCH] Proposed Fix

View in context: https://bugs.webkit.org/attachment.cgi?id=346950&action=review

r=me

> LayoutTests/ChangeLog:8
> +        * inspector/worker/resources-in-worker-expected.txt:

Missing ChangeLog entries:
 * inspector/dom-debugger/resources/dataXHR.json: Added.
 * inspector/dom-debugger/xhr-breakpoints.html:

> LayoutTests/inspector/worker/resources-in-worker.html:61
> +                if (workerIsReady && workerTargetIsSet)

Just as a thought, you could use two `WI.WrappedPromise` here and have the test finish using `Promise.all([...]).then(resolve, reject);` or even make it async and use await.
Comment 11 Joseph Pecoraro 2018-08-13 15:26:03 PDT
> > LayoutTests/ChangeLog:8
> > +        * inspector/worker/resources-in-worker-expected.txt:
> 
> Missing ChangeLog entries:
>  * inspector/dom-debugger/resources/dataXHR.json: Added.
>  * inspector/dom-debugger/xhr-breakpoints.html:

Oops, I added these after the fact and forgot to git add~


> > LayoutTests/inspector/worker/resources-in-worker.html:61
> > +                if (workerIsReady && workerTargetIsSet)
> 
> Just as a thought, you could use two `WI.WrappedPromise` here and have the
> test finish using `Promise.all([...]).then(resolve, reject);` or even make
> it async and use await.

I considered it but this was nice and simple =)
Comment 12 Joseph Pecoraro 2018-08-13 15:30:22 PDT
https://trac.webkit.org/changeset/234821/webkit
Comment 13 Radar WebKit Bug Importer 2018-08-13 15:32:01 PDT
<rdar://problem/43256072>