Repository: mesos Updated Branches: refs/heads/master 0519403ec -> 9047fdccc
Enabled `TimeTest.Now` on Windows. While the timer resolution on Windows does not support 10 microseconds, it does support 1000 microseconds, which is still fast enough for a unit test. Review: https://reviews.apache.org/r/67983 Project: http://git-wip-us.apache.org/repos/asf/mesos/repo Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/9047fdcc Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/9047fdcc Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/9047fdcc Branch: refs/heads/master Commit: 9047fdccc8bc10fdf42b9b2c5c0f47c760e1bb5b Parents: 179c7ec Author: Andrew Schwartzmeyer <and...@schwartzmeyer.com> Authored: Thu Jul 19 16:18:23 2018 -0700 Committer: Andrew Schwartzmeyer <and...@schwartzmeyer.com> Committed: Tue Jul 24 10:58:52 2018 -0700 ---------------------------------------------------------------------- 3rdparty/libprocess/src/tests/time_tests.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/mesos/blob/9047fdcc/3rdparty/libprocess/src/tests/time_tests.cpp ---------------------------------------------------------------------- diff --git a/3rdparty/libprocess/src/tests/time_tests.cpp b/3rdparty/libprocess/src/tests/time_tests.cpp index 08ddb56..0ab4fb3 100644 --- a/3rdparty/libprocess/src/tests/time_tests.cpp +++ b/3rdparty/libprocess/src/tests/time_tests.cpp @@ -43,12 +43,11 @@ TEST(TimeTest, Arithmetic) } -// Windows OS timers aren't high enough resolution to support this. -TEST_TEMP_DISABLED_ON_WINDOWS(TimeTest, Now) +TEST(TimeTest, Now) { Time t1 = Clock::now(); - os::sleep(Microseconds(10)); - ASSERT_LT(Microseconds(10), Clock::now() - t1); + os::sleep(Microseconds(1000)); + ASSERT_LT(Microseconds(1000), Clock::now() - t1); }