Bug 168091

Summary: [macOS debug] LayoutTest inspector/worker/resources-in-worker.html is a flaky timeout
Product: WebKit Reporter: Ryan Haddad <ryanhaddad>
Component: Web InspectorAssignee: Joseph Pecoraro <joepeck>
Status: RESOLVED FIXED    
Severity: Normal CC: ews-watchlist, hi, inspector-bugzilla-changes, jlewis3, joepeck, Ms2ger, rniwa, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: Other   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
[PATCH] Proposed Fix
ews-watchlist: commit-queue-
Archive of layout-test-results from ews101 for mac-sierra
none
Archive of layout-test-results from ews104 for mac-sierra-wk2
none
[PATCH] Proposed Fix hi: review+

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>