> On Jan. 6, 2016, 7:32 p.m., Jojy Varghese wrote:
> > src/tests/container_logger_tests.cpp, line 158
> > <https://reviews.apache.org/r/41962/diff/1/?file=1183514#file1183514line158>
> >
> >     Can we have this as :
> >     
> >     ``` 
> >     Shared<Docker> docker(new MockDocker(...)); 
> >     
> >     ```
> 
> Joseph Wu wrote:
>     The trade-off (style-wise) is that later in the test, we'd need to do:
>     ```
>     EXPECT_CALL((MockDocker *) docker.get(), ps(_, _))
>       .WillOnce(Return(containers));
>     ```
>     
>     And I'm not really thrilled about that cast.

Ah i see. usually c++ style guides frown upon this style as its considered 
exception unsafe. using `make_shared` or `shared_ptr(new ...) ` is considered 
better as they guarantee exception safety. I guess for Mesos it doesnt matter.


- Jojy


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


On Jan. 9, 2016, 12:24 a.m., Joseph Wu wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/41962/
> -----------------------------------------------------------
> 
> (Updated Jan. 9, 2016, 12:24 a.m.)
> 
> 
> Review request for mesos, Benjamin Hindman, Gilbert Song, Artem Harutyunyan, 
> Jie Yu, and Timothy Chen.
> 
> 
> Bugs: MESOS-4150
>     https://issues.apache.org/jira/browse/MESOS-4150
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> Adds two heavily-mocked tests for the Mesos containerizer and Docker 
> containerizer.  Each checks that `ContainerLogger::recover` is called during 
> `Containerizer::recover`.
> 
> 
> Diffs
> -----
> 
>   src/tests/container_logger_tests.cpp 
> c6b2e597517c74a55649287dc5ae5a3115f9a640 
>   src/tests/mesos.hpp 3d9ebc6c9dc3cd1be02dc3771fbd847386907fac 
>   src/tests/mesos.cpp 365ebe8335c37bfdb983a5424d4c995fa9b76a22 
> 
> Diff: https://reviews.apache.org/r/41962/diff/
> 
> 
> Testing
> -------
> 
> make (OSX & Centos7)
> 
> Tests are run in the next review.
> 
> 
> Thanks,
> 
> Joseph Wu
> 
>

Reply via email to