Changeset 235274 in webkit


Ignore:
Timestamp:
Aug 23, 2018 10:51:34 PM (6 years ago)
Author:
rniwa@webkit.org
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:
Location:
trunk/LayoutTests
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r235269 r235274  
     12018-08-23  Ryosuke Niwa  <rniwa@webkit.org>
     2
     3        fast/files/blob-network-process-crash.html is flaky
     4        https://bugs.webkit.org/show_bug.cgi?id=188911
     5
     6        Reviewed by Saam Barati.
     7
     8        The flakiness appears to come from the web content process not getting notified of
     9        the termination of the network process in time. Wait for the network process to
     10        relaunch after terminating one by continuously fetch'ing itself with an increasing
     11        time interval until it succeeds.
     12
     13        * fast/files/blob-network-process-crash.html:
     14
    1152018-08-23  Ryosuke Niwa  <rniwa@webkit.org>
    216
  • trunk/LayoutTests/fast/files/blob-network-process-crash.html

    r235264 r235274  
    88if (!window.testRunner)
    99    document.write('This test requires testRunner and GCController');
    10 else {
     10else
     11    runTest();
     12
     13async function runTest()
     14{
    1115    testRunner.dumpAsText();
    1216    testRunner.waitUntilDone();
     
    2125    testRunner.terminateNetworkProcess();
    2226
    23     // FIXME: If we don't store the timer, timer sometimes never fires.
    24     window.timer = setTimeout(() => {
    25         const newBlob = new Blob(["some text"]);
    26         for (let i = 0; i < 100; i++) {
    27             for (let j = 0; j < 10; j++)
    28                 blobs[i][j] = { };
    29         }
    30         blobs = null;
    31         GCController.collect();
    32         fetch('blob-network-process-crash.html').then(() => {
    33             testRunner.notifyDone();
    34         });
    35     }, 0);
     27    await waitForNetworkProcessToRelaunch();
     28    const newBlob = new Blob(["some text"]);
     29    for (let i = 0; i < 100; i++) {
     30        for (let j = 0; j < 10; j++)
     31            blobs[i][j] = { };
     32    }
     33    blobs = null;
     34    GCController.collect();
     35
     36    await fetch('blob-network-process-crash.html');
     37
     38    testRunner.notifyDone();
     39}
     40
     41let waitTime = 10;
     42function waitForNetworkProcessToRelaunch() {
     43    return fetch('blob-network-process-crash.html').catch(() => {
     44        return new Promise((resolve, reject) => {
     45            waitTime *= 1.2;
     46            setTimeout(() => waitForNetworkProcessToRelaunch().then(resolve), waitTime);
     47        })
     48    });
    3649}
    3750
Note: See TracChangeset for help on using the changeset viewer.