Bug 171739 - LayoutTest js/Promise-types.html is a flaky failure (Unhandled Promise Rejection messages)
Summary: LayoutTest js/Promise-types.html is a flaky failure (Unhandled Promise Reject...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Ryan Haddad
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-05-05 11:16 PDT by Ryan Haddad
Modified: 2017-05-19 15:26 PDT (History)
5 users (show)

See Also:


Attachments
Patch (1.29 KB, patch)
2017-05-18 20:18 PDT, Ryan Haddad
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Ryan Haddad 2017-05-05 11:16:20 PDT
LayoutTest js/Promise-types.html is a flaky failure

https://build.webkit.org/results/Apple%20Sierra%20Debug%20WK2%20(Tests)/r216244%20(831)/results.html

https://webkit-test-results.webkit.org/dashboards/flakiness_dashboard.html#showAllRuns=true&tests=js%2FPromise-types.html

--- /Volumes/Data/slave/sierra-debug-tests-wk2/build/layout-test-results/js/Promise-types-expected.txt
+++ /Volumes/Data/slave/sierra-debug-tests-wk2/build/layout-test-results/js/Promise-types-actual.txt
@@ -1,3 +1,5 @@
+CONSOLE MESSAGE: Unhandled Promise Rejection: 1
+CONSOLE MESSAGE: Unhandled Promise Rejection: 1
 Promises - Test basic types / exceptions.
 
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
Comment 1 Ryan Haddad 2017-05-05 11:17:01 PDT
I'm guessing this test needs the same treatment applied to the tests in https://bugs.webkit.org/show_bug.cgi?id=171445
Comment 2 Matt Lewis 2017-05-17 15:02:40 PDT
reproduced locally on Sierra debug with:

run-webkit-tests js/Promise-types.html -f --iterations=500 --no-retry-failure -g --debug
Comment 3 Joseph Pecoraro 2017-05-17 17:00:27 PDT
(In reply to Ryan Haddad from comment #1)
> I'm guessing this test needs the same treatment applied to the tests in
> https://bugs.webkit.org/show_bug.cgi?id=171445

Correct that would be sufficient.
Comment 4 Ryan Haddad 2017-05-18 20:18:16 PDT
Created attachment 310600 [details]
Patch
Comment 5 Joseph Pecoraro 2017-05-19 11:40:32 PDT
Comment on attachment 310600 [details]
Patch

r=me
Comment 6 WebKit Commit Bot 2017-05-19 12:09:38 PDT
Comment on attachment 310600 [details]
Patch

Clearing flags on attachment: 310600

Committed r217140: <http://trac.webkit.org/changeset/217140>
Comment 7 WebKit Commit Bot 2017-05-19 12:09:39 PDT
All reviewed patches have been landed.  Closing bug.
Comment 8 Ryan Haddad 2017-05-19 13:48:34 PDT
My change managed to break the test when it is run as part of the JSC tests:

jsc-layout-tests.yaml/js/script-tests/Promise-types.js.layout-no-cjit: Exception: ReferenceError: Can't find variable: window


https://build.webkit.org/builders/Apple%20Sierra%20Release%20JSC%20%28Tests%29/builds/1434
Comment 9 Joseph Pecoraro 2017-05-19 13:58:34 PDT
(In reply to Ryan Haddad from comment #8)
> My change managed to break the test when it is run as part of the JSC tests:
> 
> jsc-layout-tests.yaml/js/script-tests/Promise-types.js.layout-no-cjit:
> Exception: ReferenceError: Can't find variable: window
> 
> 
> https://build.webkit.org/builders/
> Apple%20Sierra%20Release%20JSC%20%28Tests%29/builds/1434

Ahh yes, I should have realized.

You could actually just do:

    onunhandledrejection = () => false;

Without the `window.` portion.
Comment 10 Filip Pizlo 2017-05-19 14:08:01 PDT
Comment on attachment 310600 [details]
Patch

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

> LayoutTests/js/script-tests/Promise-types.js:10
> +// Silence unhandled rejection messages.
> +window.onunhandledrejection = () => false;
> +

This caused the test to always fail in jsc tests.
Comment 11 Ryan Haddad 2017-05-19 15:18:29 PDT
(In reply to Joseph Pecoraro from comment #9)
> (In reply to Ryan Haddad from comment #8)
> > My change managed to break the test when it is run as part of the JSC tests:
> > 
> > jsc-layout-tests.yaml/js/script-tests/Promise-types.js.layout-no-cjit:
> > Exception: ReferenceError: Can't find variable: window
> > 
> > 
> > https://build.webkit.org/builders/
> > Apple%20Sierra%20Release%20JSC%20%28Tests%29/builds/1434
> 
> Ahh yes, I should have realized.
> 
> You could actually just do:
> 
>     onunhandledrejection = () => false;
> 
> Without the `window.` portion.

I verified that making this change fixes the test failure when run locally. I will land a follow up fix to correct my error.
Comment 12 Ryan Haddad 2017-05-19 15:26:31 PDT
Fixed in https://trac.webkit.org/r217155