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 Bannier <be...@mesosphere.io> on 2019/01/11 23:17:39 UTC

Review Request 69728: Invoked base test `SetUp` and `TearDown` methods in derived tests.

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

Review request for mesos, Alexander Rukletsov and Jie Yu.


Repository: mesos


Description
-------

This patch adds required invocations of base class `Setup` and
`TearDown` in more derived classes.Unfortunately googletest provides no
indirection(e.g., via applying the template method pattern) and we do
have to care of this ourself.

These missing cases were identified with the following clang query with
`METHOD` either `"SetUp"` or `"TearDown"`

    match cxxMethodDecl(
        ofClass(isDerivedFrom("::testing::Test")),
        unless(isImplicit()),
        hasName(METHOD),
        isOverride(),
        unless(hasDescendant(cxxMemberCallExpr(
            hasDeclaration(cxxMethodDecl(hasName(METHOD), isVirtual()))))))

and subsequentially fixing all true positives.


Diffs
-----

  src/tests/containerizer/docker_tests.cpp 0eefbd9fd842632fc183c3d7d2874428d866dfd1 
  src/tests/csi_client_tests.cpp 3d4a0626c1d60e723487f99aee26d92064f82298 


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


Testing
-------

`make check`


Thanks,

Benjamin Bannier


Re: Review Request 69728: Invoked base test `SetUp` and `TearDown` methods in derived tests.

Posted by Gilbert Song <so...@gmail.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/69728/#review211915
-----------------------------------------------------------


Ship it!




Ship It!

- Gilbert Song


On Jan. 11, 2019, 3:17 p.m., Benjamin Bannier wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/69728/
> -----------------------------------------------------------
> 
> (Updated Jan. 11, 2019, 3:17 p.m.)
> 
> 
> Review request for mesos, Alexander Rukletsov and Jie Yu.
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> This patch adds required invocations of base class `Setup` and
> `TearDown` in more derived classes.Unfortunately googletest provides no
> indirection(e.g., via applying the template method pattern) and we do
> have to care of this ourself.
> 
> These missing cases were identified with the following clang query with
> `METHOD` either `"SetUp"` or `"TearDown"`
> 
>     match cxxMethodDecl(
>         ofClass(isDerivedFrom("::testing::Test")),
>         unless(isImplicit()),
>         hasName(METHOD),
>         isOverride(),
>         unless(hasDescendant(cxxMemberCallExpr(
>             hasDeclaration(cxxMethodDecl(hasName(METHOD), isVirtual()))))))
> 
> and subsequentially fixing all true positives.
> 
> 
> Diffs
> -----
> 
>   src/tests/containerizer/docker_tests.cpp 0eefbd9fd842632fc183c3d7d2874428d866dfd1 
>   src/tests/csi_client_tests.cpp 3d4a0626c1d60e723487f99aee26d92064f82298 
> 
> 
> Diff: https://reviews.apache.org/r/69728/diff/1/
> 
> 
> Testing
> -------
> 
> `make check`
> 
> 
> Thanks,
> 
> Benjamin Bannier
> 
>


Re: Review Request 69728: Invoked base test `SetUp` and `TearDown` methods in derived tests.

Posted by Jie Yu <yu...@gmail.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/69728/#review211917
-----------------------------------------------------------


Ship it!




Ship It!

- Jie Yu


On Jan. 11, 2019, 11:17 p.m., Benjamin Bannier wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/69728/
> -----------------------------------------------------------
> 
> (Updated Jan. 11, 2019, 11:17 p.m.)
> 
> 
> Review request for mesos, Alexander Rukletsov and Jie Yu.
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> This patch adds required invocations of base class `Setup` and
> `TearDown` in more derived classes.Unfortunately googletest provides no
> indirection(e.g., via applying the template method pattern) and we do
> have to care of this ourself.
> 
> These missing cases were identified with the following clang query with
> `METHOD` either `"SetUp"` or `"TearDown"`
> 
>     match cxxMethodDecl(
>         ofClass(isDerivedFrom("::testing::Test")),
>         unless(isImplicit()),
>         hasName(METHOD),
>         isOverride(),
>         unless(hasDescendant(cxxMemberCallExpr(
>             hasDeclaration(cxxMethodDecl(hasName(METHOD), isVirtual()))))))
> 
> and subsequentially fixing all true positives.
> 
> 
> Diffs
> -----
> 
>   src/tests/containerizer/docker_tests.cpp 0eefbd9fd842632fc183c3d7d2874428d866dfd1 
>   src/tests/csi_client_tests.cpp 3d4a0626c1d60e723487f99aee26d92064f82298 
> 
> 
> Diff: https://reviews.apache.org/r/69728/diff/1/
> 
> 
> Testing
> -------
> 
> `make check`
> 
> 
> Thanks,
> 
> Benjamin Bannier
> 
>