[libcxx-commits] [PATCH] D75148: [libc++] Try to fix timing-sensitive future test
Louis Dionne via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Tue Feb 25 15:26:36 PST 2020
ldionne created this revision.
ldionne added a reviewer: __simt__.
Herald added a reviewer: EricWF.
Herald added subscribers: libcxx-commits, dexonsmith, jkorous.
Herald added a project: libc++.
This test has been failing spuriously in our CI for a long time. This
commit changes the timings used in the test in an attempt to make it
more resilient.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D75148
Files:
libcxx/test/std/thread/futures/futures.unique_future/wait_for.pass.cpp
Index: libcxx/test/std/thread/futures/futures.unique_future/wait_for.pass.cpp
===================================================================
--- libcxx/test/std/thread/futures/futures.unique_future/wait_for.pass.cpp
+++ libcxx/test/std/thread/futures/futures.unique_future/wait_for.pass.cpp
@@ -52,9 +52,9 @@
std::future<T> f = p.get_future();
std::thread(func, std::move(p)).detach();
assert(f.valid());
- assert(f.wait_for(ms(300)) == std::future_status::timeout);
+ assert(f.wait_for(ms(50)) == std::future_status::timeout);
assert(f.valid());
- assert(f.wait_for(ms(300)) == std::future_status::ready);
+ assert(f.wait_for(ms(600)) == std::future_status::ready);
assert(f.valid());
Clock::time_point t0 = Clock::now();
f.wait();
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D75148.246589.patch
Type: text/x-patch
Size: 785 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20200225/dfbccec2/attachment.bin>
More information about the libcxx-commits
mailing list