> On June 2, 2015, 8:05 p.m., Vinod Kone wrote: > > src/tests/mesos.hpp, lines 716-723 > > <https://reviews.apache.org/r/34816/diff/8/?file=976766#file976766line716> > > > > You want to use both ON_CALL and EXPECT_CALL. See TestAllocator in > > tests/mesos.hpp for the rationale.
+1 However, i can see quite a mess here in tests/mesos.hpp, because every other Test/Mock class (except TestAllocator) uses EXPECT_CALL and WillRepeatedly ): > On June 2, 2015, 8:05 p.m., Vinod Kone wrote: > > src/tests/oversubscription_tests.cpp, lines 90-91 > > <https://reviews.apache.org/r/34816/diff/8/?file=976767#file976767line90> > > > > You don't need to explicitly do this you setup both ON_CALL and > > EXPECT_CALL above. I think there is a need - i want to call initialize only ONCE. Without this line there will be *WillRepeatedly* action when i setup ON_CALL and EXPECT_CALL above without any restriction to call count. However - i can change that to: ``` EXPECT_CALL(resourceEstimator, initialize()) .Times(1); ``` ...to be more consistent. Is that more preferable? - Bartek ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/34816/#review86271 ----------------------------------------------------------- On June 2, 2015, 7:37 p.m., Bartek Plotka wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/34816/ > ----------------------------------------------------------- > > (Updated June 2, 2015, 7:37 p.m.) > > > Review request for mesos, Jie Yu, Niklas Nielsen, Szymon Konefal, and Vinod > Kone. > > > Repository: mesos > > > Description > ------- > > TestResourceEstimator changed to be a MockResourceEstimator with mocked > methods - to inject resources and test plumbing between RE and Slave. > > > Diffs > ----- > > src/tests/mesos.hpp ac986a0687a576a0bd5693c82b3c7d543aaa956b > src/tests/oversubscription_tests.cpp > ea5857cb579aa904fd05530684bdde51a0b3f27f > > Diff: https://reviews.apache.org/r/34816/diff/ > > > Testing > ------- > > make check > > > Thanks, > > Bartek Plotka > >
