Title: [221307] trunk/Tools
Revision
221307
Author
pvol...@apple.com
Date
2017-08-29 11:34:38 -0700 (Tue, 29 Aug 2017)

Log Message

[Win] A WTF test is timing out in run-api-tests.
https://bugs.webkit.org/show_bug.cgi?id=176056

Reviewed by Brent Fulgham.

The test SynchronizedFixedQueue.ProduceOnly relies on that putting a thread to sleep for
1ms will wake it up before another thread which is put to sleep for 10ms. I believe this
is not neccessarily true on Windows where the thread scheduling does not have millisecond
accuracy. Fix the test timeout by adjusting the sleep time slightly.
 
* TestWebKitAPI/Tests/WTF/SynchronizedFixedQueue.cpp:
(TestWebKitAPI::ToUpperConverter::startProducing):

Modified Paths

Diff

Modified: trunk/Tools/ChangeLog (221306 => 221307)


--- trunk/Tools/ChangeLog	2017-08-29 18:08:54 UTC (rev 221306)
+++ trunk/Tools/ChangeLog	2017-08-29 18:34:38 UTC (rev 221307)
@@ -1,3 +1,18 @@
+2017-08-29  Per Arne Vollan  <pvol...@apple.com>
+
+        [Win] A WTF test is timing out in run-api-tests.
+        https://bugs.webkit.org/show_bug.cgi?id=176056
+
+        Reviewed by Brent Fulgham.
+
+        The test SynchronizedFixedQueue.ProduceOnly relies on that putting a thread to sleep for
+        1ms will wake it up before another thread which is put to sleep for 10ms. I believe this
+        is not neccessarily true on Windows where the thread scheduling does not have millisecond
+        accuracy. Fix the test timeout by adjusting the sleep time slightly.
+ 
+        * TestWebKitAPI/Tests/WTF/SynchronizedFixedQueue.cpp:
+        (TestWebKitAPI::ToUpperConverter::startProducing):
+
 2017-08-29  Eric Carlson  <eric.carl...@apple.com>
 
         Unreviewed, update my watchlist filters.

Modified: trunk/Tools/TestWebKitAPI/Tests/WTF/SynchronizedFixedQueue.cpp (221306 => 221307)


--- trunk/Tools/TestWebKitAPI/Tests/WTF/SynchronizedFixedQueue.cpp	2017-08-29 18:08:54 UTC (rev 221306)
+++ trunk/Tools/TestWebKitAPI/Tests/WTF/SynchronizedFixedQueue.cpp	2017-08-29 18:34:38 UTC (rev 221307)
@@ -83,7 +83,12 @@
             while (m_lowerQueue.dequeue(lower)) {
                 m_upperQueue.enqueue(toUpper(lower));
                 EXPECT_TRUE(lower == textItem(m_produceCount++));
-                std::this_thread::sleep_for(std::chrono::milliseconds(10));
+#if PLATFORM(WIN)
+                auto sleepAmount = std::chrono::milliseconds(20);
+#else
+                auto sleepAmount = std::chrono::milliseconds(10);
+#endif
+                std::this_thread::sleep_for(sleepAmount);
             }
             m_produceCloseSemaphore.signal();
         });
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to