----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/65995/#review201624 -----------------------------------------------------------
src/tests/storage_local_resource_provider_tests.cpp Lines 2573-2574 (patched) <https://reviews.apache.org/r/65995/#comment283013> I feel this leads to slightly involved state transitions below (e.g., requiring explicit clock manipulations to restore sane state). How about introducing a auto isNotRaw = [isRaw](const Resource& r) { return !isRaw(r); }; and then making dedicated declines, EXPECT_CALL(sched, resourceOffers(&driver, OffersHaveAnyResource( std::bind(isNotRaw, lambda::_1)))) .WillRepeatedly(DeclineOffers()); We should be able to remove the new clock manipulations then. src/tests/storage_local_resource_provider_tests.cpp Lines 2737-2738 (patched) <https://reviews.apache.org/r/65995/#comment283014> Ditto. - Benjamin Bannier On April 12, 2018, 5:31 a.m., Chun-Hung Hsiao wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/65995/ > ----------------------------------------------------------- > > (Updated April 12, 2018, 5:31 a.m.) > > > Review request for mesos, Gaston Kleiman, Greg Mann, and Jie Yu. > > > Bugs: MESOS-8492 > https://issues.apache.org/jira/browse/MESOS-8492 > > > Repository: mesos > > > Description > ------- > > The two SLRP tests assume that SLRP will send out a RAW resource in its > first `UPDATE_STATE` message, and expect that the test framework would > receive an offer containing the RAW resource in its first offer. However > this behavior is not guaranteed and should not be relied on. This patch > makes the tests decline unwanted offers by default so they no longer > rely on SLRP's internal behavior. > > > Diffs > ----- > > src/tests/storage_local_resource_provider_tests.cpp > 2872f1aec1a7b94fc302a533f5ae9e1be9658087 > > > Diff: https://reviews.apache.org/r/65995/diff/5/ > > > Testing > ------- > > sudo make check > Ran the two tests in repitition. > > > Thanks, > > Chun-Hung Hsiao > >