> On Feb. 17, 2016, 8:32 a.m., Bernd Mathiske wrote:
> > src/tests/cluster.hpp, line 91
> > <https://reviews.apache.org/r/43613/diff/1/?file=1251881#file1251881line91>
> >
> >     What do you mean by "some" of its state?

In both of these objects, we don't do everything possible to cleanup.  Some 
things might be left behind (i.e. files in the sandbox, docker stuff, etc).  

I'll expand the comment to include exactly what we clean up:

* We call the destructors of each owned individual injection.
* For master, we unset an authenticator.
* For agent, we destroy containers and undo some cgroups.


> On Feb. 17, 2016, 8:32 a.m., Bernd Mathiske wrote:
> > src/tests/cluster.cpp, line 106
> > <https://reviews.apache.org/r/43613/diff/1/?file=1251882#file1251882line106>
> >
> >     How about using an inline closure with return type void here? Then you 
> > don't have to declare populate in the header and you don't have to pass all 
> > these parameters, you can capture them.
> >     
> >     AFAIK we are merely solving a syntactical problem here: macro ASSERT_* 
> > contains "return ..." with a return type that does not match start(). Right?

Yeah, that seems neater.  Changing...


- Joseph


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/43613/#review119464
-----------------------------------------------------------


On Feb. 16, 2016, 2:15 p.m., Joseph Wu wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/43613/
> -----------------------------------------------------------
> 
> (Updated Feb. 16, 2016, 2:15 p.m.)
> 
> 
> Review request for mesos, Benjamin Hindman, Bernd Mathiske, and Artem 
> Harutyunyan.
> 
> 
> Bugs: MESOS-4633 and MESOS-4634
>     https://issues.apache.org/jira/browse/MESOS-4633
>     https://issues.apache.org/jira/browse/MESOS-4634
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> Major rewrite of the `tests/cluster` helpers.  This strongly ties the scope 
> of test objects to the test body.
> 
> Changes the `Cluster` class into two RAII objects (`Master` and `Slave`).  
> The `Slave` object performs cleanup originally found in 
> `cluster::Slave::stop`.  `cluster::Master::start` and `cluster::Slave::start` 
> were changed to factory methods.
> 
> 
> Diffs
> -----
> 
>   src/tests/cluster.hpp 99a785ab0d4ee1a1e745202d2551de58a7631a85 
>   src/tests/cluster.cpp 084fb1ce37a315c561c4587c4761c870f54c8625 
> 
> Diff: https://reviews.apache.org/r/43613/diff/
> 
> 
> Testing
> -------
> 
> Tests are run at the end of this review chain.
> 
> 
> Thanks,
> 
> Joseph Wu
> 
>

Reply via email to