> On Nov. 6, 2015, 2:31 p.m., Jie Yu wrote:
> > 3rdparty/libprocess/3rdparty/stout/include/stout/tests/utils.hpp, line 35
> > <https://reviews.apache.org/r/40035/diff/1/?file=1118504#file1118504line35>
> >
> >     There's a subtle difference here. This one uses os::mkdtemp() while the 
> > other one uses environment->mkdtemp().
> >     
> >     The latter will include the test name in the temporary directory. 
> > That's quite useful when debugging. Not sure if there's anyway to restore 
> > this behavior.
> 
> Jie Yu wrote:
>     One solution I can think of is to introduce a virtual method in 
> TemporaryDirectoryTest so that we can override the behavior of creating the 
> temp directory. In MesosTest, we can override this method.

I think having the test name everywhere would help a lot.

How about this?

We can move the body of `Environment::mkdtemp` into a helper function (in 
<stout/tests/utils.hpp>).
There are only 3 spots in the code base that use `environment->mkdtemp`, so we 
can just point those at the helper.


- Joseph


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


On Nov. 6, 2015, 2:10 p.m., Joseph Wu wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/40035/
> -----------------------------------------------------------
> 
> (Updated Nov. 6, 2015, 2:10 p.m.)
> 
> 
> Review request for mesos, Artem Harutyunyan, Jie Yu, and Joris Van Remoortere.
> 
> 
> Bugs: MESOS-3847
>     https://issues.apache.org/jira/browse/MESOS-3847
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> Some tests, such as those in `provisioner_backend_tests.cpp`, need to refer 
> to the `sandbox` variable during their tear down.
> 
> 
> Diffs
> -----
> 
>   3rdparty/libprocess/3rdparty/stout/include/stout/tests/utils.hpp 
> 8934ba79685685d5f5eae5991057c6ad3c8eea8e 
> 
> Diff: https://reviews.apache.org/r/40035/diff/
> 
> 
> Testing
> -------
> 
> `make check`
> 
> 
> Thanks,
> 
> Joseph Wu
> 
>

Reply via email to