You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@mesos.apache.org by Joseph Wu <jo...@mesosphere.io> on 2016/02/16 23:15:14 UTC

Review Request 43614: Refactor MesosTest and remove cleanup logic.

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

Review request for mesos, 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
-------

Updates `StartMaster` and `StartSlave` test helpers to use the reworked `cluster` helpers.  Removes all `MesosTest` cleanup logic and as well as the helpers that accept a `MockExecutor` pointer.


Diffs
-----

  src/tests/mesos.hpp 242a11658c0a9ba4caced9b2b2bdbcb921f7fdd0 
  src/tests/mesos.cpp e0f641c6828833de13a0a233e39ff6dc3f343d5c 

Diff: https://reviews.apache.org/r/43614/diff/


Testing
-------

Tests are run at the end of this review chain.


Thanks,

Joseph Wu


Re: Review Request 43614: Refactor MesosTest and remove cleanup logic.

Posted by Bernd Mathiske <be...@mesosphere.io>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/43614/#review122067
-----------------------------------------------------------


Fix it, then Ship it!





src/tests/mesos.hpp (line 190)
<https://reviews.apache.org/r/43614/#comment183936>

    If we were pedantic, we could make the order of the params the same in the comment and the signature.



src/tests/mesos.hpp (line 204)
<https://reviews.apache.org/r/43614/#comment183937>

    Param order in comments vs. signature.


- Bernd Mathiske


On March 2, 2016, 1:45 p.m., Joseph Wu wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/43614/
> -----------------------------------------------------------
> 
> (Updated March 2, 2016, 1:45 p.m.)
> 
> 
> Review request for mesos, 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
> -------
> 
> Updates `StartMaster` and `StartSlave` test helpers to use the reworked `cluster` helpers.  Removes all `MesosTest` cleanup logic and as well as the helpers that accept a `MockExecutor` pointer.
> 
> 
> Diffs
> -----
> 
>   src/tests/mesos.hpp 1d4f075e470a60040e17b9f011aea6202310c437 
>   src/tests/mesos.cpp e0f641c6828833de13a0a233e39ff6dc3f343d5c 
> 
> Diff: https://reviews.apache.org/r/43614/diff/
> 
> 
> Testing
> -------
> 
> Tests are run at the end of this review chain.
> 
> 
> Thanks,
> 
> Joseph Wu
> 
>


Re: Review Request 43614: Refactor MesosTest and remove cleanup logic.

Posted by Bernd Mathiske <be...@mesosphere.io>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/43614/#review121855
-----------------------------------------------------------



LGTM, pending dependencies.

- Bernd Mathiske


On March 2, 2016, 1:45 p.m., Joseph Wu wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/43614/
> -----------------------------------------------------------
> 
> (Updated March 2, 2016, 1:45 p.m.)
> 
> 
> Review request for mesos, 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
> -------
> 
> Updates `StartMaster` and `StartSlave` test helpers to use the reworked `cluster` helpers.  Removes all `MesosTest` cleanup logic and as well as the helpers that accept a `MockExecutor` pointer.
> 
> 
> Diffs
> -----
> 
>   src/tests/mesos.hpp 1d4f075e470a60040e17b9f011aea6202310c437 
>   src/tests/mesos.cpp e0f641c6828833de13a0a233e39ff6dc3f343d5c 
> 
> Diff: https://reviews.apache.org/r/43614/diff/
> 
> 
> Testing
> -------
> 
> Tests are run at the end of this review chain.
> 
> 
> Thanks,
> 
> Joseph Wu
> 
>


Re: Review Request 43614: Refactor MesosTest and remove cleanup logic.

Posted by Michael Park <mp...@apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/43614/#review123728
-----------------------------------------------------------


Ship it!




Ship It!

- Michael Park


On March 4, 2016, 11:43 p.m., Joseph Wu wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/43614/
> -----------------------------------------------------------
> 
> (Updated March 4, 2016, 11:43 p.m.)
> 
> 
> Review request for mesos, 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
> -------
> 
> Updates `StartMaster` and `StartSlave` test helpers to use the reworked `cluster` helpers.  Removes all `MesosTest` cleanup logic and as well as the helpers that accept a `MockExecutor` pointer.
> 
> 
> Diffs
> -----
> 
>   src/tests/mesos.hpp d36840f6e23e5823332de53061bf6852330bdf0b 
>   src/tests/mesos.cpp e0f641c6828833de13a0a233e39ff6dc3f343d5c 
> 
> Diff: https://reviews.apache.org/r/43614/diff/
> 
> 
> Testing
> -------
> 
> Tests are run at the end of this review chain.
> 
> 
> Thanks,
> 
> Joseph Wu
> 
>


Re: Review Request 43614: Refactor MesosTest and remove cleanup logic.

Posted by Michael Park <mp...@apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/43614/#review123857
-----------------------------------------------------------



Committed with the following formatting fixes.


src/tests/mesos.cpp (line 182)
<https://reviews.apache.org/r/43614/#comment186142>

    ```
    -return flags;
    +  return flags;
    ```


- Michael Park


On March 4, 2016, 11:43 p.m., Joseph Wu wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/43614/
> -----------------------------------------------------------
> 
> (Updated March 4, 2016, 11:43 p.m.)
> 
> 
> Review request for mesos, 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
> -------
> 
> Updates `StartMaster` and `StartSlave` test helpers to use the reworked `cluster` helpers.  Removes all `MesosTest` cleanup logic and as well as the helpers that accept a `MockExecutor` pointer.
> 
> 
> Diffs
> -----
> 
>   src/tests/mesos.hpp d36840f6e23e5823332de53061bf6852330bdf0b 
>   src/tests/mesos.cpp e0f641c6828833de13a0a233e39ff6dc3f343d5c 
> 
> Diff: https://reviews.apache.org/r/43614/diff/
> 
> 
> Testing
> -------
> 
> Tests are run at the end of this review chain.
> 
> 
> Thanks,
> 
> Joseph Wu
> 
>


Re: Review Request 43614: Refactor MesosTest and remove cleanup logic.

Posted by Joseph Wu <jo...@mesosphere.io>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/43614/
-----------------------------------------------------------

(Updated March 4, 2016, 3:43 p.m.)


Review request for mesos, Bernd Mathiske and Artem Harutyunyan.


Changes
-------

A couple of comment changes (Bernd's comments & a stale comment that I noticed in one of the `StartMaster` helpers).


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
-------

Updates `StartMaster` and `StartSlave` test helpers to use the reworked `cluster` helpers.  Removes all `MesosTest` cleanup logic and as well as the helpers that accept a `MockExecutor` pointer.


Diffs (updated)
-----

  src/tests/mesos.hpp d36840f6e23e5823332de53061bf6852330bdf0b 
  src/tests/mesos.cpp e0f641c6828833de13a0a233e39ff6dc3f343d5c 

Diff: https://reviews.apache.org/r/43614/diff/


Testing
-------

Tests are run at the end of this review chain.


Thanks,

Joseph Wu


Re: Review Request 43614: Refactor MesosTest and remove cleanup logic.

Posted by Joseph Wu <jo...@mesosphere.io>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/43614/
-----------------------------------------------------------

(Updated March 2, 2016, 1:45 p.m.)


Review request for mesos, Bernd Mathiske and Artem Harutyunyan.


Changes
-------

Propagating changes due to the reintroduction of the Try<> in the factory method's return type.


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
-------

Updates `StartMaster` and `StartSlave` test helpers to use the reworked `cluster` helpers.  Removes all `MesosTest` cleanup logic and as well as the helpers that accept a `MockExecutor` pointer.


Diffs (updated)
-----

  src/tests/mesos.hpp 1d4f075e470a60040e17b9f011aea6202310c437 
  src/tests/mesos.cpp e0f641c6828833de13a0a233e39ff6dc3f343d5c 

Diff: https://reviews.apache.org/r/43614/diff/


Testing
-------

Tests are run at the end of this review chain.


Thanks,

Joseph Wu


Re: Review Request 43614: Refactor MesosTest and remove cleanup logic.

Posted by Joseph Wu <jo...@mesosphere.io>.

> On March 2, 2016, 7:28 a.m., Bernd Mathiske wrote:
> > src/tests/mesos.hpp, line 135
> > <https://reviews.apache.org/r/43614/diff/1/?file=1251883#file1251883line135>
> >
> >     So this injection is allowed to be a shared_ptr and the others are not? This makes me wonder if it would not be simpler if all injections were shared_ptr, even the ones that are sometimes Owned and sometimes not (i.e. declared with a parallel member of type *). Then we would only need one kind for all cases and a lot of code would look substantially simpler. The only Owned ones would be those that are always Owned.

I'll add a note above this one.  The reason this is a `shared_ptr` is because the `Master` expects a `shared_ptr` for this one.
Also see: https://reviews.apache.org/r/43613/#comment181352


- Joseph


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


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/43614/
> -----------------------------------------------------------
> 
> (Updated Feb. 16, 2016, 2:15 p.m.)
> 
> 
> Review request for mesos, 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
> -------
> 
> Updates `StartMaster` and `StartSlave` test helpers to use the reworked `cluster` helpers.  Removes all `MesosTest` cleanup logic and as well as the helpers that accept a `MockExecutor` pointer.
> 
> 
> Diffs
> -----
> 
>   src/tests/mesos.hpp 242a11658c0a9ba4caced9b2b2bdbcb921f7fdd0 
>   src/tests/mesos.cpp e0f641c6828833de13a0a233e39ff6dc3f343d5c 
> 
> Diff: https://reviews.apache.org/r/43614/diff/
> 
> 
> Testing
> -------
> 
> Tests are run at the end of this review chain.
> 
> 
> Thanks,
> 
> Joseph Wu
> 
>


Re: Review Request 43614: Refactor MesosTest and remove cleanup logic.

Posted by Bernd Mathiske <be...@mesosphere.io>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/43614/#review121656
-----------------------------------------------------------




src/tests/mesos.hpp (line 133)
<https://reviews.apache.org/r/43614/#comment183412>

    So this injection is allowed to be a shared_ptr and the others are not? This makes me wonder if it would not be simpler if all injections were shared_ptr, even the ones that are sometimes Owned and sometimes not (i.e. declared with a parallel member of type *). Then we would only need one kind for all cases and a lot of code would look substantially simpler. The only Owned ones would be those that are always Owned.


- Bernd Mathiske


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/43614/
> -----------------------------------------------------------
> 
> (Updated Feb. 16, 2016, 2:15 p.m.)
> 
> 
> Review request for mesos, 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
> -------
> 
> Updates `StartMaster` and `StartSlave` test helpers to use the reworked `cluster` helpers.  Removes all `MesosTest` cleanup logic and as well as the helpers that accept a `MockExecutor` pointer.
> 
> 
> Diffs
> -----
> 
>   src/tests/mesos.hpp 242a11658c0a9ba4caced9b2b2bdbcb921f7fdd0 
>   src/tests/mesos.cpp e0f641c6828833de13a0a233e39ff6dc3f343d5c 
> 
> Diff: https://reviews.apache.org/r/43614/diff/
> 
> 
> Testing
> -------
> 
> Tests are run at the end of this review chain.
> 
> 
> Thanks,
> 
> Joseph Wu
> 
>