You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@mesos.apache.org by Benjamin Hindman <be...@berkeley.edu> on 2018/07/18 01:19:54 UTC

Review Request 67957: Refactored TemporaryDirectoryTest to be a mixin.

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

Review request for mesos and Benjamin Mahler.


Repository: mesos


Description
-------

Currently you can't easily "mixin" the functionality of the
TemporaryDirectoryTest which makes for tests that might have a weird
inheritance structure. This refactor makes it easy for you to get the
functionality of the TemporaryDirectoryTest while easily composing it
with other test classes.


Diffs
-----

  3rdparty/stout/include/stout/tests/utils.hpp eb13cceec29c5db8a75067aac5a00b8f8e9b5046 


Diff: https://reviews.apache.org/r/67957/diff/1/


Testing
-------

make check


Thanks,

Benjamin Hindman


Re: Review Request 67957: Refactored TemporaryDirectoryTest to be a mixin.

Posted by Benjamin Mahler <bm...@apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/67957/#review210341
-----------------------------------------------------------


Fix it, then Ship it!




Probably also worth mentioning that the ASSERTs were moved up (along with the motivation)?


3rdparty/stout/include/stout/tests/utils.hpp
Lines 46-48 (patched)
<https://reviews.apache.org/r/67957/#comment294998>

    The opposite order as alexr suggested is what I would have expected, if there's a reason it must be done in the same order, it seems worth documenting?



3rdparty/stout/include/stout/tests/utils.hpp
Lines 52-69 (original), 70-108 (patched)
<https://reviews.apache.org/r/67957/#comment294999>

    Just a suggestion, I find it less error prone and more readable to close the single quotes on the same line when possible, e.g.:
    
    ```
            return Error("Failed to do rmdir on '" + sandbox.get() + "'"
                         ": " + rmdir.error());
    ```



3rdparty/stout/include/stout/tests/utils.hpp
Lines 103 (patched)
<https://reviews.apache.org/r/67957/#comment295000>

    s/do//
    s/on//


- Benjamin Mahler


On July 18, 2018, 1:19 a.m., Benjamin Hindman wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/67957/
> -----------------------------------------------------------
> 
> (Updated July 18, 2018, 1:19 a.m.)
> 
> 
> Review request for mesos and Benjamin Mahler.
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> Currently you can't easily "mixin" the functionality of the
> TemporaryDirectoryTest which makes for tests that might have a weird
> inheritance structure. This refactor makes it easy for you to get the
> functionality of the TemporaryDirectoryTest while easily composing it
> with other test classes.
> 
> 
> Diffs
> -----
> 
>   3rdparty/stout/include/stout/tests/utils.hpp eb13cceec29c5db8a75067aac5a00b8f8e9b5046 
> 
> 
> Diff: https://reviews.apache.org/r/67957/diff/1/
> 
> 
> Testing
> -------
> 
> make check
> 
> 
> Thanks,
> 
> Benjamin Hindman
> 
>


Re: Review Request 67957: Refactored TemporaryDirectoryTest to be a mixin.

Posted by Alexander Rukletsov <ru...@gmail.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/67957/#review207227
-----------------------------------------------------------




3rdparty/stout/include/stout/tests/utils.hpp
Lines 46-48 (patched)
<https://reviews.apache.org/r/67957/#comment290539>

    Please swap the order.


- Alexander Rukletsov


On July 18, 2018, 1:19 a.m., Benjamin Hindman wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/67957/
> -----------------------------------------------------------
> 
> (Updated July 18, 2018, 1:19 a.m.)
> 
> 
> Review request for mesos and Benjamin Mahler.
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> Currently you can't easily "mixin" the functionality of the
> TemporaryDirectoryTest which makes for tests that might have a weird
> inheritance structure. This refactor makes it easy for you to get the
> functionality of the TemporaryDirectoryTest while easily composing it
> with other test classes.
> 
> 
> Diffs
> -----
> 
>   3rdparty/stout/include/stout/tests/utils.hpp eb13cceec29c5db8a75067aac5a00b8f8e9b5046 
> 
> 
> Diff: https://reviews.apache.org/r/67957/diff/1/
> 
> 
> Testing
> -------
> 
> make check
> 
> 
> Thanks,
> 
> Benjamin Hindman
> 
>