You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@mesos.apache.org by Jiang Yan Xu <ya...@jxu.me> on 2017/07/16 18:29:17 UTC
Review Request 60898: Added more tests for agent reregistration.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/60898/
-----------------------------------------------------------
Review request for mesos, James Peach and Neil Conway.
Bugs: MESOS-7711
https://issues.apache.org/jira/browse/MESOS-7711
Repository: mesos
Description
-------
These new tests are specifically for verifying whether the registrar
is involved when an agent reregisters, depending on whether it has
been marked unreachable.
Diffs
-----
src/tests/slave_tests.cpp 035db18db3a64a9e358c1c54cc18a4bdeb85d8bf
Diff: https://reviews.apache.org/r/60898/diff/1/
Testing
-------
make check.
Thanks,
Jiang Yan Xu
Re: Review Request 60898: Added more tests for agent reregistration.
Posted by Jiang Yan Xu <ya...@jxu.me>.
> On July 18, 2017, 6:32 p.m., James Peach wrote:
> > src/tests/slave_tests.cpp
> > Lines 3440 (patched)
> > <https://reviews.apache.org/r/60898/diff/2/?file=1778627#file1778627line3440>
> >
> > Is there a way you can set an expectation that a registry operation is not made?
>
> Jiang Yan Xu wrote:
> This is it (a few lines above):
>
> ```
> // There should be no registrar operation across both agent termination
> // and reregistration.
> EXPECT_CALL(*master.get()->registrar.get(), apply(_))
> .Times(0);
> ```
It's a few line apart because I am also asserting that no registry operation happened prior to master failover that transitions the agent to unreachable in the
first place.
I can add a comment about this near the end of the test though!
- Jiang Yan
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/60898/#review180894
-----------------------------------------------------------
On July 16, 2017, 11:29 a.m., Jiang Yan Xu wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/60898/
> -----------------------------------------------------------
>
> (Updated July 16, 2017, 11:29 a.m.)
>
>
> Review request for mesos, James Peach and Neil Conway.
>
>
> Bugs: MESOS-7711
> https://issues.apache.org/jira/browse/MESOS-7711
>
>
> Repository: mesos
>
>
> Description
> -------
>
> These new tests are specifically for verifying whether the registrar
> is involved when an agent reregisters, depending on whether it has
> been marked unreachable.
>
>
> Diffs
> -----
>
> src/tests/slave_tests.cpp 053a14d1ea920058563173de7e0fa644fdbd8d96
>
>
> Diff: https://reviews.apache.org/r/60898/diff/2/
>
>
> Testing
> -------
>
> make check.
>
>
> Thanks,
>
> Jiang Yan Xu
>
>
Re: Review Request 60898: Added more tests for agent reregistration.
Posted by Jiang Yan Xu <ya...@jxu.me>.
> On July 18, 2017, 6:32 p.m., James Peach wrote:
> > src/tests/slave_tests.cpp
> > Lines 3327 (patched)
> > <https://reviews.apache.org/r/60898/diff/2/?file=1778627#file1778627line3327>
> >
> > You need a corresponding `Clock::resume()`?
This is fine. The clock is automatically resumed at the end of the test: https://github.com/apache/mesos/blob/83718691d7d96d35c25d9be5e172429bd7d9a447/3rdparty/libprocess/include/process/gtest.hpp#L53
We used to have issues with container reaping when the clock is paused but it's now fixed as well: https://github.com/apache/mesos/blob/83718691d7d96d35c25d9be5e172429bd7d9a447/src/tests/mesos.cpp#L746
So most of the (newer) tests don't resume the clock explicitly now.
> On July 18, 2017, 6:32 p.m., James Peach wrote:
> > src/tests/slave_tests.cpp
> > Lines 3415 (patched)
> > <https://reviews.apache.org/r/60898/diff/2/?file=1778627#file1778627line3415>
> >
> > You need a corresponding `Clock::resume()`?
Ditto.
> On July 18, 2017, 6:32 p.m., James Peach wrote:
> > src/tests/slave_tests.cpp
> > Lines 3431 (patched)
> > <https://reviews.apache.org/r/60898/diff/2/?file=1778627#file1778627line3431>
> >
> > This comment seems wrong since you are not intercepting a registry operation.
Damn how did I miss this. :) Thanks.
> On July 18, 2017, 6:32 p.m., James Peach wrote:
> > src/tests/slave_tests.cpp
> > Lines 3440 (patched)
> > <https://reviews.apache.org/r/60898/diff/2/?file=1778627#file1778627line3440>
> >
> > Is there a way you can set an expectation that a registry operation is not made?
This is it (a few lines above):
```
// There should be no registrar operation across both agent termination
// and reregistration.
EXPECT_CALL(*master.get()->registrar.get(), apply(_))
.Times(0);
```
- Jiang Yan
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/60898/#review180894
-----------------------------------------------------------
On July 16, 2017, 11:29 a.m., Jiang Yan Xu wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/60898/
> -----------------------------------------------------------
>
> (Updated July 16, 2017, 11:29 a.m.)
>
>
> Review request for mesos, James Peach and Neil Conway.
>
>
> Bugs: MESOS-7711
> https://issues.apache.org/jira/browse/MESOS-7711
>
>
> Repository: mesos
>
>
> Description
> -------
>
> These new tests are specifically for verifying whether the registrar
> is involved when an agent reregisters, depending on whether it has
> been marked unreachable.
>
>
> Diffs
> -----
>
> src/tests/slave_tests.cpp 053a14d1ea920058563173de7e0fa644fdbd8d96
>
>
> Diff: https://reviews.apache.org/r/60898/diff/2/
>
>
> Testing
> -------
>
> make check.
>
>
> Thanks,
>
> Jiang Yan Xu
>
>
Re: Review Request 60898: Added more tests for agent reregistration.
Posted by James Peach <jp...@apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/60898/#review180894
-----------------------------------------------------------
src/tests/slave_tests.cpp
Lines 3327 (patched)
<https://reviews.apache.org/r/60898/#comment256210>
You need a corresponding `Clock::resume()`?
src/tests/slave_tests.cpp
Lines 3415 (patched)
<https://reviews.apache.org/r/60898/#comment256213>
You need a corresponding `Clock::resume()`?
src/tests/slave_tests.cpp
Lines 3431 (patched)
<https://reviews.apache.org/r/60898/#comment256211>
This comment seems wrong since you are not intercepting a registry operation.
src/tests/slave_tests.cpp
Lines 3440 (patched)
<https://reviews.apache.org/r/60898/#comment256212>
Is there a way you can set an expectation that a registry operation is not made?
- James Peach
On July 16, 2017, 6:29 p.m., Jiang Yan Xu wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/60898/
> -----------------------------------------------------------
>
> (Updated July 16, 2017, 6:29 p.m.)
>
>
> Review request for mesos, James Peach and Neil Conway.
>
>
> Bugs: MESOS-7711
> https://issues.apache.org/jira/browse/MESOS-7711
>
>
> Repository: mesos
>
>
> Description
> -------
>
> These new tests are specifically for verifying whether the registrar
> is involved when an agent reregisters, depending on whether it has
> been marked unreachable.
>
>
> Diffs
> -----
>
> src/tests/slave_tests.cpp 053a14d1ea920058563173de7e0fa644fdbd8d96
>
>
> Diff: https://reviews.apache.org/r/60898/diff/2/
>
>
> Testing
> -------
>
> make check.
>
>
> Thanks,
>
> Jiang Yan Xu
>
>
Re: Review Request 60898: Added more tests for agent reregistration.
Posted by James Peach <jp...@apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/60898/#review181401
-----------------------------------------------------------
Ship it!
Ship It!
- James Peach
On July 20, 2017, 4:26 a.m., Jiang Yan Xu wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/60898/
> -----------------------------------------------------------
>
> (Updated July 20, 2017, 4:26 a.m.)
>
>
> Review request for mesos, James Peach and Neil Conway.
>
>
> Bugs: MESOS-7711
> https://issues.apache.org/jira/browse/MESOS-7711
>
>
> Repository: mesos
>
>
> Description
> -------
>
> These new tests are specifically for verifying whether the registrar
> is involved when an agent reregisters, depending on whether it has
> been marked unreachable.
>
>
> Diffs
> -----
>
> src/tests/slave_tests.cpp e1cc96dbb279aea998b99779ee1b55e96fee4e41
>
>
> Diff: https://reviews.apache.org/r/60898/diff/3/
>
>
> Testing
> -------
>
> make check.
>
>
> Thanks,
>
> Jiang Yan Xu
>
>
Re: Review Request 60898: Added more tests for agent reregistration.
Posted by Jiang Yan Xu <ya...@jxu.me>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/60898/
-----------------------------------------------------------
(Updated July 19, 2017, 9:26 p.m.)
Review request for mesos, James Peach and Neil Conway.
Changes
-------
Addressed comments.
Bugs: MESOS-7711
https://issues.apache.org/jira/browse/MESOS-7711
Repository: mesos
Description
-------
These new tests are specifically for verifying whether the registrar
is involved when an agent reregisters, depending on whether it has
been marked unreachable.
Diffs (updated)
-----
src/tests/slave_tests.cpp e1cc96dbb279aea998b99779ee1b55e96fee4e41
Diff: https://reviews.apache.org/r/60898/diff/3/
Changes: https://reviews.apache.org/r/60898/diff/2-3/
Testing
-------
make check.
Thanks,
Jiang Yan Xu
Re: Review Request 60898: Added more tests for agent reregistration.
Posted by Mesos Reviewbot Windows <re...@mesos.apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/60898/#review180644
-----------------------------------------------------------
Patch looks great!
Reviews applied: [60854, 60400, 60898]
Passed command: support\windows-build.bat
- Mesos Reviewbot Windows
On July 16, 2017, 6:29 p.m., Jiang Yan Xu wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/60898/
> -----------------------------------------------------------
>
> (Updated July 16, 2017, 6:29 p.m.)
>
>
> Review request for mesos, James Peach and Neil Conway.
>
>
> Bugs: MESOS-7711
> https://issues.apache.org/jira/browse/MESOS-7711
>
>
> Repository: mesos
>
>
> Description
> -------
>
> These new tests are specifically for verifying whether the registrar
> is involved when an agent reregisters, depending on whether it has
> been marked unreachable.
>
>
> Diffs
> -----
>
> src/tests/slave_tests.cpp 035db18db3a64a9e358c1c54cc18a4bdeb85d8bf
>
>
> Diff: https://reviews.apache.org/r/60898/diff/1/
>
>
> Testing
> -------
>
> make check.
>
>
> Thanks,
>
> Jiang Yan Xu
>
>