> On March 1, 2018, 7:19 p.m., Greg Mann wrote: > > src/tests/slave_tests.cpp > > Lines 5455 (patched) > > <https://reviews.apache.org/r/65679/diff/2/?file=1968520#file1968520line5456> > > > > Is this necessary? Perhaps we could eliminate the `Future<Nothing> > > failure;`? > > Meng Zhu wrote: > We either need to wait explicitly or set up the expectation as > `atMost(1)`. I would prefer the explicit wait as it is unambiguous.
I think I prefer `AtMost(1)`, for two reasons: 1) It makes it clear to the reader that satisfaction of that expectation is not essential to the test. 2) It's a pattern that we use elsewhere in similar situations. I don't think I've seen other situations where we AWAIT on a future just to make sure the expectation is satisfied, rather than using `AtMost(1)`, but perhaps I'm wrong? - Greg ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/65679/#review198462 ----------------------------------------------------------- On Feb. 16, 2018, 1:22 a.m., Meng Zhu wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/65679/ > ----------------------------------------------------------- > > (Updated Feb. 16, 2018, 1:22 a.m.) > > > Review request for mesos, Chun-Hung Hsiao and Greg Mann. > > > Bugs: MESOS-8611 > https://issues.apache.org/jira/browse/MESOS-8611 > > > Repository: mesos > > > Description > ------- > > Directly invoking unmock calls in the test process can potentially > cause races with the real mock slave process. It is more robust to > dispatch the unmock calls to the real mock slave process. > > Also added several mock expectations to avoid "uninteresting mock > call" test warnings. > > > Diffs > ----- > > src/tests/slave_tests.cpp e253317a67019302f18afe11e2a314e716cec226 > > > Diff: https://reviews.apache.org/r/65679/diff/3/ > > > Testing > ------- > > `./bin/mesos-tests.sh --gtest_filter=*SlaveTest* --gtest_repeat=-1 > --gtest_break_on_failure` runs forever :) > > > Thanks, > > Meng Zhu > >
