Title: [261765] trunk/Tools
Revision
261765
Author
[email protected]
Date
2020-05-15 15:32:55 -0700 (Fri, 15 May 2020)

Log Message

TestWebKitAPI.WKHTTPCookieStore.Basic is a flaky failure
https://bugs.webkit.org/show_bug.cgi?id=211752

Patch by Alex Christensen <[email protected]> on 2020-05-15
Reviewed by Geoffrey Garen.

The ordering of cookiesDidChangeInCookieStore callbacks with regard to other callbacks isn't quite deterministic.
No problem.  If the number of callbacks isn't what it is expected, wait until it is.
When I reproduce this test failure, I need to spin the run loop at max once to have it succeed, but the bots may take a few more run loop spins.
Spin until the number of callbacks is the expected value.

* TestWebKitAPI/Tests/WebKitCocoa/WKHTTPCookieStore.mm:
(runTestWithWebsiteDataStore):

Modified Paths

Diff

Modified: trunk/Tools/ChangeLog (261764 => 261765)


--- trunk/Tools/ChangeLog	2020-05-15 21:55:30 UTC (rev 261764)
+++ trunk/Tools/ChangeLog	2020-05-15 22:32:55 UTC (rev 261765)
@@ -1,5 +1,20 @@
 2020-05-15  Alex Christensen  <[email protected]>
 
+        TestWebKitAPI.WKHTTPCookieStore.Basic is a flaky failure
+        https://bugs.webkit.org/show_bug.cgi?id=211752
+
+        Reviewed by Geoffrey Garen.
+
+        The ordering of cookiesDidChangeInCookieStore callbacks with regard to other callbacks isn't quite deterministic.
+        No problem.  If the number of callbacks isn't what it is expected, wait until it is.
+        When I reproduce this test failure, I need to spin the run loop at max once to have it succeed, but the bots may take a few more run loop spins.
+        Spin until the number of callbacks is the expected value.
+
+        * TestWebKitAPI/Tests/WebKitCocoa/WKHTTPCookieStore.mm:
+        (runTestWithWebsiteDataStore):
+
+2020-05-15  Alex Christensen  <[email protected]>
+
         [iOS Simulator] TestWebKitAPI._WKDownload.Resume is a flaky crash
         https://bugs.webkit.org/show_bug.cgi?id=211786
 

Modified: trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/WKHTTPCookieStore.mm (261764 => 261765)


--- trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/WKHTTPCookieStore.mm	2020-05-15 21:55:30 UTC (rev 261764)
+++ trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/WKHTTPCookieStore.mm	2020-05-15 22:32:55 UTC (rev 261765)
@@ -139,7 +139,8 @@
     gotFlag = false;
 
     ASSERT_EQ(cookies.count, 2u);
-    ASSERT_EQ(observerCallbacks, 4u);
+    while (observerCallbacks != 4u)
+        TestWebKitAPI::Util::spinRunLoop();
 
     for (NSHTTPCookie *cookie : cookies) {
         if ([cookie.name isEqual:@"CookieName"]) {
@@ -175,7 +176,8 @@
     gotFlag = false;
 
     ASSERT_EQ(cookies.count, 1u);
-    ASSERT_EQ(observerCallbacks, 6u);
+    while (observerCallbacks != 6u)
+        TestWebKitAPI::Util::spinRunLoop();
 
     for (NSHTTPCookie *cookie : cookies) {
         ASSERT_TRUE([cookie1.get().path isEqualToString:cookie.path]);
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to