Title: [234107] trunk/LayoutTests
Revision
234107
Author
[email protected]
Date
2018-07-23 12:33:13 -0700 (Mon, 23 Jul 2018)

Log Message

REGRESSION(PSON?): [ WK2 ] http/tests/workers/service/client-*-page-cache.html LayoutTests are flaky
https://bugs.webkit.org/show_bug.cgi?id=183705
<rdar://problem/42440606>

Unreviewed, attempting a better fix for http/tests/workers/service/serviceworkerclients-matchAll.https.html.
If it fixes the flakiness I'll do the same for the 2 page cache tests.

* http/tests/workers/service/serviceworkerclients-matchAll-worker.js:
(waitFor):
(matchAllPromise2):
(async.doTestAfterMessage):
(matchAllPromise1): Deleted.
(then): Deleted.
* platform/ios-wk2/TestExpectations:
* platform/mac-wk2/TestExpectations:

Modified Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (234106 => 234107)


--- trunk/LayoutTests/ChangeLog	2018-07-23 19:32:42 UTC (rev 234106)
+++ trunk/LayoutTests/ChangeLog	2018-07-23 19:33:13 UTC (rev 234107)
@@ -1,3 +1,21 @@
+2018-07-23  Chris Dumez  <[email protected]>
+
+        REGRESSION(PSON?): [ WK2 ] http/tests/workers/service/client-*-page-cache.html LayoutTests are flaky
+        https://bugs.webkit.org/show_bug.cgi?id=183705
+        <rdar://problem/42440606>
+
+        Unreviewed, attempting a better fix for http/tests/workers/service/serviceworkerclients-matchAll.https.html.
+        If it fixes the flakiness I'll do the same for the 2 page cache tests.
+
+        * http/tests/workers/service/serviceworkerclients-matchAll-worker.js:
+        (waitFor):
+        (matchAllPromise2):
+        (async.doTestAfterMessage):
+        (matchAllPromise1): Deleted.
+        (then): Deleted.
+        * platform/ios-wk2/TestExpectations:
+        * platform/mac-wk2/TestExpectations:
+
 2018-07-23  Per Arne Vollan  <[email protected]>
 
         Layout test webanimations/empty-keyframes-crash.html is failing on Windows.

Modified: trunk/LayoutTests/http/tests/workers/service/serviceworkerclients-matchAll-worker.js (234106 => 234107)


--- trunk/LayoutTests/http/tests/workers/service/serviceworkerclients-matchAll-worker.js	2018-07-23 19:32:42 UTC (rev 234106)
+++ trunk/LayoutTests/http/tests/workers/service/serviceworkerclients-matchAll-worker.js	2018-07-23 19:33:13 UTC (rev 234107)
@@ -1,3 +1,8 @@
+function waitFor(duration)
+{
+    return new Promise((resolve) => setTimeout(resolve, duration));
+}
+
 function matchAllPromise1()
 {
     return self.clients.matchAll().then((clients) => {
@@ -8,12 +13,15 @@
 }
 
 var matchedClients;
-matchAllPromise2 = self.clients.matchAll({ includeUncontrolled : true }).then((c) => {
-    matchedClients = c;
-    return matchedClients.length === 1 ? "PASS" : "FAIL: expected one matched client, got " + matchedClients.length;
-}, (e) => {
-    return "FAIL: matchAll 2 rejected with " + e;
-});
+function matchAllPromise2()
+{
+    return self.clients.matchAll({ includeUncontrolled : true }).then((c) => {
+        matchedClients = c;
+        return matchedClients.length === 1 ? "PASS" : "FAIL: expected one matched client, got " + matchedClients.length;
+    }, (e) => {
+        return "FAIL: matchAll 2 rejected with " + e;
+    });
+}
 
 async function doTestAfterMessage(event)
 {
@@ -28,7 +36,7 @@
             if (tries)
                 await waitFor(50);
             result = await matchAllPromise1();
-        } while (result !== "PASS" && ++tries <= 20);
+        } while (result !== "PASS" && ++tries <= 200);
 
         if (result !== "PASS") {
             event.source.postMessage(result);
@@ -35,7 +43,13 @@
             return;
         }
 
-        var result = await matchAllPromise2;
+        tries = 0;
+        do {
+            if (tries)
+                await waitFor(50);
+            result = await matchAllPromise2();
+        } while (result !== "PASS" && ++tries <= 200);
+
         if (result !== "PASS") {
             event.source.postMessage(result);
             return;

Modified: trunk/LayoutTests/platform/ios-wk2/TestExpectations (234106 => 234107)


--- trunk/LayoutTests/platform/ios-wk2/TestExpectations	2018-07-23 19:32:42 UTC (rev 234106)
+++ trunk/LayoutTests/platform/ios-wk2/TestExpectations	2018-07-23 19:33:13 UTC (rev 234107)
@@ -1358,4 +1358,3 @@
 
 webkit.org/b/183705 http/tests/workers/service/client-added-to-clients-when-restored-from-page-cache.html [ Pass Failure ]
 webkit.org/b/183705 http/tests/workers/service/client-removed-from-clients-while-in-page-cache.html [ Pass Failure ]
-webkit.org/b/183705 http/tests/workers/service/serviceworkerclients-matchAll.https.html [ Pass Failure ]

Modified: trunk/LayoutTests/platform/mac-wk2/TestExpectations (234106 => 234107)


--- trunk/LayoutTests/platform/mac-wk2/TestExpectations	2018-07-23 19:32:42 UTC (rev 234106)
+++ trunk/LayoutTests/platform/mac-wk2/TestExpectations	2018-07-23 19:33:13 UTC (rev 234107)
@@ -886,6 +886,5 @@
 
 webkit.org/b/183705 http/tests/workers/service/client-added-to-clients-when-restored-from-page-cache.html [ Pass Failure ]
 webkit.org/b/183705 http/tests/workers/service/client-removed-from-clients-while-in-page-cache.html [ Pass Failure ]
-webkit.org/b/183705 http/tests/workers/service/serviceworkerclients-matchAll.https.html [ Pass Failure ]
 
 webkit.org/b/187658 http/tests/security/bypassing-cors-checks-for-extension-urls.html [ Pass Failure ]
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to