> On June 17, 2014, 12:28 a.m., Vinod Kone wrote: > > src/tests/slave_tests.cpp, lines 803-804 > > <https://reviews.apache.org/r/22313/diff/7/?file=607038#file607038line803> > > > > I don't see where this test is ensuring that resources are isolated > > before launching tasks? > > > > I would recommend splitting this into 2 tests > > > > 1) ensure resources are updated before task is launched > > > > 2) containerizer failed causes task lost to be sent. > > > > i would also recommend writing a test that ensures that framework and > > executor are not removed between _runTask and __runTask(). > > Yifan Gu wrote: > Doing!
Update: In test one, I tried to catch the update(_, task.resources()) before launching, and wait for a while to make sure that the task won't get launched if the future is not satisfied. And will return TASK_LOST if the future is failed. In test two, I tried to shutdown the framework between _runTask and __runTask, and make sure that the when the update(_, task.resources()) returns, it will figure out that the framework is terminated and will return directly without sending TASK_LOST. - Yifan ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/22313/#review45858 ----------------------------------------------------------- On June 19, 2014, 12:38 a.m., Yifan Gu wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/22313/ > ----------------------------------------------------------- > > (Updated June 19, 2014, 12:38 a.m.) > > > Review request for mesos, Ian Downes and Vinod Kone. > > > Bugs: MESOS-886 > https://issues.apache.org/jira/browse/MESOS-886 > > > Repository: mesos-git > > > Description > ------- > > Added __runTask() to wait for the completion of containerizer->update() and > check the result before sending RunTaskMessage. > > > Diffs > ----- > > src/slave/slave.hpp 34687e5 > src/slave/slave.cpp 643c088 > src/tests/slave_tests.cpp 2c8f183 > > Diff: https://reviews.apache.org/r/22313/diff/ > > > Testing > ------- > > SlaveTest, CancelTaskIfContainerizerFails > > Which tests that if the containerizer->update() return a Failure, the task > won't be launched and the scheduler will get TASK_LOST. > > make check > > > File Attachments > ---------------- > > framework will exit > > https://reviews.apache.org/media/uploaded/files/2014/06/18/fbe73273-7aa9-4faa-b1c5-003ab03042a9__issue-886.diff > log > > https://reviews.apache.org/media/uploaded/files/2014/06/18/84d801a0-5c2a-4bb9-901b-e1962031461c__log > > > Thanks, > > Yifan Gu > >