----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/17805/#review33870 -----------------------------------------------------------
Looks good! 3rdparty/libprocess/include/process/gtest.hpp <https://reviews.apache.org/r/17805/#comment63545> "will expire"? 3rdparty/libprocess/include/process/gtest.hpp <https://reviews.apache.org/r/17805/#comment63546> Can you clarify for others why Future::await() may hang forever? 3rdparty/libprocess/include/process/gtest.hpp <https://reviews.apache.org/r/17805/#comment63548> Something like: "We instead ensure all expired timers are flushed"? 3rdparty/libprocess/include/process/gtest.hpp <https://reviews.apache.org/r/17805/#comment63551> You could eliminate the need for a Stopwatch by just using a: Duration elapsed; And incrementing it each time you sleep. 3rdparty/libprocess/include/process/gtest.hpp <https://reviews.apache.org/r/17805/#comment63553> Maybe a little more explicit: s/timed-out operations/expired timers/ - Ben Mahler 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 > >
