> On Jan. 14, 2016, 10:55 p.m., Vinod Kone wrote: > > src/tests/hierarchical_allocator_tests.cpp, line 1914 > > <https://reviews.apache.org/r/39628/diff/3/?file=1196600#file1196600line1914> > > > > I'm not sure why you needed to have framework2 and slave2 in this test > > at all? > > > > can't you just do > > > > // framework1 suppresses offers > > > > // ensure no offers are received. i.e., 'allocaiton' is pending. > > > > // framework1 is deactivated and reactivated. > > > > // ensure offer for slave1 is received. > > Guangya Liu wrote: > @Vinod, does there are any helper functions which can help if there are > pending allocations? I have some problem in checking `ensure no offers are > received. i.e., 'allocaiton' is pending.` > > Did not find any helper functions so just using a complex to varify the > test cases.
If you do Clock::settle(), any pending events should be acted upon. So, if we ensure `allocation` future is still pending, that should be good enough. - Vinod ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/39628/#review114596 ----------------------------------------------------------- On Jan. 14, 2016, 9:53 a.m., Guangya Liu wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/39628/ > ----------------------------------------------------------- > > (Updated Jan. 14, 2016, 9:53 a.m.) > > > Review request for mesos, Ben Mahler and Vinod Kone. > > > Bugs: MESOS-3802 > https://issues.apache.org/jira/browse/MESOS-3802 > > > Repository: mesos > > > Description > ------- > > Cleared the suppressed flag when deactive a framework. > > > Diffs > ----- > > src/master/allocator/mesos/hierarchical.cpp > d541bfa3f4190865c65d35c9d1ffdb8a3f194056 > src/tests/hierarchical_allocator_tests.cpp > e044f832c2c16e53e663c6ced5452649bb0dcb59 > > Diff: https://reviews.apache.org/r/39628/diff/ > > > Testing > ------- > > Ubuntu 14.04 > make > make check > GLOG_v=2 ./bin/mesos-tests.sh > --gtest_filter="HierarchicalAllocatorTest.DeactivateActivateFramework" > --verbose > > > Thanks, > > Guangya Liu > >
