Title: [235274] trunk/LayoutTests
Revision
235274
Author
[email protected]
Date
2018-08-23 22:51:34 -0700 (Thu, 23 Aug 2018)

Log Message

fast/files/blob-network-process-crash.html is flaky
https://bugs.webkit.org/show_bug.cgi?id=188911

Reviewed by Saam Barati.

The flakiness appears to come from the web content process not getting notified of
the termination of the network process in time. Wait for the network process to
relaunch after terminating one by continuously fetch'ing itself with an increasing
time interval until it succeeds.

* fast/files/blob-network-process-crash.html:

Modified Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (235273 => 235274)


--- trunk/LayoutTests/ChangeLog	2018-08-24 04:55:28 UTC (rev 235273)
+++ trunk/LayoutTests/ChangeLog	2018-08-24 05:51:34 UTC (rev 235274)
@@ -1,5 +1,19 @@
 2018-08-23  Ryosuke Niwa  <[email protected]>
 
+        fast/files/blob-network-process-crash.html is flaky
+        https://bugs.webkit.org/show_bug.cgi?id=188911
+
+        Reviewed by Saam Barati.
+
+        The flakiness appears to come from the web content process not getting notified of
+        the termination of the network process in time. Wait for the network process to
+        relaunch after terminating one by continuously fetch'ing itself with an increasing
+        time interval until it succeeds.
+
+        * fast/files/blob-network-process-crash.html:
+
+2018-08-23  Ryosuke Niwa  <[email protected]>
+
         Add a flaky failing test expectation to fast/files/blob-network-process-crash.html
         while we investigate the root cause in webkit.org/b/188911.
 

Modified: trunk/LayoutTests/fast/files/blob-network-process-crash.html (235273 => 235274)


--- trunk/LayoutTests/fast/files/blob-network-process-crash.html	2018-08-24 04:55:28 UTC (rev 235273)
+++ trunk/LayoutTests/fast/files/blob-network-process-crash.html	2018-08-24 05:51:34 UTC (rev 235274)
@@ -7,7 +7,11 @@
 
 if (!window.testRunner)
     document.write('This test requires testRunner and GCController');
-else {
+else
+    runTest();
+
+async function runTest()
+{
     testRunner.dumpAsText();
     testRunner.waitUntilDone();
 
@@ -20,21 +24,30 @@
 
     testRunner.terminateNetworkProcess();
 
-    // FIXME: If we don't store the timer, timer sometimes never fires.
-    window.timer = setTimeout(() => {
-        const newBlob = new Blob(["some text"]);
-        for (let i = 0; i < 100; i++) {
-            for (let j = 0; j < 10; j++)
-                blobs[i][j] = { };
-        }
-        blobs = null;
-        GCController.collect();
-        fetch('blob-network-process-crash.html').then(() => {
-            testRunner.notifyDone();
-        });
-    }, 0);
+    await waitForNetworkProcessToRelaunch();
+    const newBlob = new Blob(["some text"]);
+    for (let i = 0; i < 100; i++) {
+        for (let j = 0; j < 10; j++)
+            blobs[i][j] = { };
+    }
+    blobs = null;
+    GCController.collect();
+
+    await fetch('blob-network-process-crash.html');
+
+    testRunner.notifyDone();
 }
 
+let waitTime = 10;
+function waitForNetworkProcessToRelaunch() {
+    return fetch('blob-network-process-crash.html').catch(() => {
+        return new Promise((resolve, reject) => {
+            waitTime *= 1.2;
+            setTimeout(() => waitForNetworkProcessToRelaunch().then(resolve), waitTime);
+        })
+    });
+}
+
 </script>
 </body>
 </html>
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to