> On Feb. 7, 2014, 12:12 a.m., Ben Mahler wrote: > > 3rdparty/libprocess/include/process/gtest.hpp, lines 58-59 > > <https://reviews.apache.org/r/17805/diff/1/?file=471018#file471018line58> > > > > You could eliminate the need for a Stopwatch by just using a: > > > > Duration elapsed; > > > > And incrementing it each time you sleep.
Hm.. feel free to drop, Stopwatch is clean too and is more precise :) - Ben ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/17805/#review33870 ----------------------------------------------------------- On Feb. 6, 2014, 8:05 p.m., Jiang Yan Xu wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/17805/ > ----------------------------------------------------------- > > (Updated Feb. 6, 2014, 8:05 p.m.) > > > Review request for mesos, Benjamin Hindman, Ben Mahler, and Vinod Kone. > > > Bugs: MESOS-837 > https://issues.apache.org/jira/browse/MESOS-837 > > > Repository: mesos-git > > > Description > ------- > > - Note that this fix acts as a safeguard to prevent AWAIT_* in tests running > forever. It does not eliminate the need to advance the clock in loops in some > tests. > - I found putting Clock::advance() (optionally with os::sleep) in AWAIT_* too > implicit and takes control over the clock from developers who write tests. > (See related ticket https://issues.apache.org/jira/browse/MESOS-827, will > explain elsewhere.) > > > Diffs > ----- > > 3rdparty/libprocess/include/process/gtest.hpp > 753ef74f422f95add9fadd96951ffdeeceddb7c5 > > Diff: https://reviews.apache.org/r/17805/diff/ > > > Testing > ------- > > - make check > - some modified tests in https://reviews.apache.org/r/17806 > - something like below (not added to review) > > Clock::pause(); > Future<Nothing> f; > // Fail after 10 seconds. > AWAIT_READY(f); > Clock::resume(); > > > Thanks, > > Jiang Yan Xu > >
