mesos-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Benjamin Bannier <benjamin.bann...@mesosphere.io>
Subject Re: Review Request 69994: Added a test `ROOT_EmptyCheckpointFileSlaveRecovery`.
Date Mon, 18 Feb 2019 14:25:24 GMT


> On Feb. 15, 2019, 2:39 p.m., Andrei Budnik wrote:
> > src/tests/containerizer/docker_volume_isolator_tests.cpp
> > Lines 851 (patched)
> > <https://reviews.apache.org/r/69994/diff/1/?file=2125491#file2125491line851>
> >
> >     Consider `Owned<MockDockerVolumeDriverClient> mockClient`?
> 
> Qian Zhang wrote:
>     What is the benefit of using `Owned`? I see we use raw pointer for `mockClient` in
this whole file, if you think `Owned` is better, we could post a separate patch to update
it in this file.
> 
> Andrei Budnik wrote:
>     In this, test we are leaking the object of type `MockDockerVolumeDriverClient` assigned
to `mockClient` variable.
>     `Owned` automatically deletes previous objects. You can use `delete mockClient` instead
of `Owned` though.

Note that a manual `delete` would not be triggered if e.g., any `ASSERT` triggered. That's
why using any smart pointer is strictly preferable to raw pointers in tests (this is analogue
to why one needs RAII in the face of exceptions).


- Benjamin


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


On Feb. 18, 2019, 9:20 a.m., Qian Zhang wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/69994/
> -----------------------------------------------------------
> 
> (Updated Feb. 18, 2019, 9:20 a.m.)
> 
> 
> Review request for mesos, Andrei Budnik and Gilbert Song.
> 
> 
> Bugs: MESOS-9507
>     https://issues.apache.org/jira/browse/MESOS-9507
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> Added a test `ROOT_EmptyCheckpointFileSlaveRecovery`.
> 
> 
> Diffs
> -----
> 
>   src/tests/containerizer/docker_volume_isolator_tests.cpp 1503290bf62d5718df0a530a660b519649e76789

> 
> 
> Diff: https://reviews.apache.org/r/69994/diff/2/
> 
> 
> Testing
> -------
> 
> sudo make check
> 
> This test will fail without the patch https://reviews.apache.org/r/69972
> 
> 
> Thanks,
> 
> Qian Zhang
> 
>


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message