Changeset 241917 in webkit


Ignore:
Timestamp:
Feb 21, 2019 3:53:11 PM (5 years ago)
Author:
Chris Dumez
Message:

Flaky API Test: TestWebKitAPI.ProcessSwap.SuspendedPageLimit
https://bugs.webkit.org/show_bug.cgi?id=194481

Reviewed by Alex Christensen.

Give the processes a chance to shutdown and wait until we reached the expected number
of processes.

  • TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm:
Location:
trunk/Tools
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Tools/ChangeLog

    r241916 r241917  
     12019-02-21  Chris Dumez  <cdumez@apple.com>
     2
     3        Flaky API Test: TestWebKitAPI.ProcessSwap.SuspendedPageLimit
     4        https://bugs.webkit.org/show_bug.cgi?id=194481
     5
     6        Reviewed by Alex Christensen.
     7
     8        Give the processes a chance to shutdown and wait until we reached the expected number
     9        of processes.
     10
     11        * TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm:
     12
    1132019-02-21  Tim Horton  <timothy_horton@apple.com>
    214
  • trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm

    r241916 r241917  
    29472947
    29482948    // But not all of those processes should still be alive (1 visible, maximumSuspendedPageCount suspended).
    2949     EXPECT_EQ([processPool _webProcessCountIgnoringPrewarmedAndCached], (1U + maximumSuspendedPageCount));
     2949    auto expectedProcessCount = 1 + maximumSuspendedPageCount;
     2950    int timeout = 20;
     2951    while ([processPool _webProcessCountIgnoringPrewarmedAndCached] != expectedProcessCount && timeout >= 0) {
     2952        TestWebKitAPI::Util::sleep(0.1);
     2953        --timeout;
     2954    }
     2955
     2956    EXPECT_EQ(expectedProcessCount, [processPool _webProcessCountIgnoringPrewarmedAndCached]);
    29502957}
    29512958
Note: See TracChangeset for help on using the changeset viewer.