You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@mesos.apache.org by Anand Mazumdar <ma...@gmail.com> on 2016/02/19 03:50:36 UTC

Re: Review Request 42241: Speed up HookTest.VerifySlaveLaunchExecutorHook.

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



LGTM, some minor comments around avoiding redundant use of `Clock` functions that can be avoided.


src/tests/hook_tests.cpp (line 390)
<https://reviews.apache.org/r/42241/#comment181146>

    hmm ... Can't we just do:
    
    ```
    Clock::pause();
    Clock::advance(...);
    Clock::settle();
    ```



src/tests/hook_tests.cpp (line 392)
<https://reviews.apache.org/r/42241/#comment181148>

    Missing period at the end.



src/tests/hook_tests.cpp (line 396)
<https://reviews.apache.org/r/42241/#comment181147>

    Is there a need to explicitly invoke `Clock::resume()` here? If not, kill it.


- Anand Mazumdar


On Jan. 18, 2016, 4:03 p.m., Jian Qiu wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/42241/
> -----------------------------------------------------------
> 
> (Updated Jan. 18, 2016, 4:03 p.m.)
> 
> 
> Review request for mesos, Alexander Rukletsov and Timothy Chen.
> 
> 
> Bugs: MESOS-4174
>     https://issues.apache.org/jira/browse/MESOS-4174
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> Speed up HookTest.VerifySlaveLaunchExecutorHook.
> 
> 
> Diffs
> -----
> 
>   src/tests/hook_tests.cpp 152984b01069acd4cf195bfce58835f0304a97f2 
> 
> Diff: https://reviews.apache.org/r/42241/diff/
> 
> 
> Testing
> -------
> 
> Before
> HookTest.VerifySlaveLaunchExecutorHook (5061 ms)
> 
> After
> HookTest.VerifySlaveLaunchExecutorHook (132 ms)
> 
> 
> Thanks,
> 
> Jian Qiu
> 
>


Re: Review Request 42241: Speed up HookTest.VerifySlaveLaunchExecutorHook.

Posted by Anand Mazumdar <ma...@gmail.com>.

> On Feb. 19, 2016, 2:50 a.m., Anand Mazumdar wrote:
> > src/tests/hook_tests.cpp, line 396
> > <https://reviews.apache.org/r/42241/diff/3/?file=1200496#file1200496line396>
> >
> >     Is there a need to explicitly invoke `Clock::resume()` here? If not, kill it.
> 
> Alexander Rukletsov wrote:
>     Let's leave the test with resumed clock for consistency.

Alex, what consistency are you referring to here? Does this file follow the pattern of explicitly doing so?


- Anand


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


On Feb. 19, 2016, 4:36 a.m., Jian Qiu wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/42241/
> -----------------------------------------------------------
> 
> (Updated Feb. 19, 2016, 4:36 a.m.)
> 
> 
> Review request for mesos, Alexander Rukletsov and Timothy Chen.
> 
> 
> Bugs: MESOS-4174
>     https://issues.apache.org/jira/browse/MESOS-4174
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> Speed up HookTest.VerifySlaveLaunchExecutorHook.
> 
> 
> Diffs
> -----
> 
>   src/tests/hook_tests.cpp 59a00ea722a17bbc82b14c69bda826f68cbac6e9 
> 
> Diff: https://reviews.apache.org/r/42241/diff/
> 
> 
> Testing
> -------
> 
> Before
> HookTest.VerifySlaveLaunchExecutorHook (5061 ms)
> 
> After
> HookTest.VerifySlaveLaunchExecutorHook (132 ms)
> 
> 
> Thanks,
> 
> Jian Qiu
> 
>


Re: Review Request 42241: Speed up HookTest.VerifySlaveLaunchExecutorHook.

Posted by Jian Qiu <qi...@cn.ibm.com>.

> On 二月 19, 2016, 2:50 a.m., Anand Mazumdar wrote:
> > src/tests/hook_tests.cpp, line 390
> > <https://reviews.apache.org/r/42241/diff/3/?file=1200496#file1200496line390>
> >
> >     hmm ... Can't we just do:
> >     
> >     ```
> >     Clock::pause();
> >     Clock::advance(...);
> >     Clock::settle();
> >     ```
> 
> Jian Qiu wrote:
>     Thanks for reviewing! This settle() is necessary to trigger the shutdownExecutor timer.
> 
> Anand Mazumdar wrote:
>     Ahh, I see. It's not immediatly obvious to to why we need the first `Clock::settle`. As a suggestion, can we add a comment like this:
>     
>     ```
>     Clock::settle(); // Wait for `Slave::shutdownExecutor` to complete.
>     ```

Done :)


- Jian


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


On 二月 19, 2016, 4:36 a.m., Jian Qiu wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/42241/
> -----------------------------------------------------------
> 
> (Updated 二月 19, 2016, 4:36 a.m.)
> 
> 
> Review request for mesos, Alexander Rukletsov and Timothy Chen.
> 
> 
> Bugs: MESOS-4174
>     https://issues.apache.org/jira/browse/MESOS-4174
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> Speed up HookTest.VerifySlaveLaunchExecutorHook.
> 
> 
> Diffs
> -----
> 
>   src/tests/hook_tests.cpp 59a00ea722a17bbc82b14c69bda826f68cbac6e9 
> 
> Diff: https://reviews.apache.org/r/42241/diff/
> 
> 
> Testing
> -------
> 
> Before
> HookTest.VerifySlaveLaunchExecutorHook (5061 ms)
> 
> After
> HookTest.VerifySlaveLaunchExecutorHook (132 ms)
> 
> 
> Thanks,
> 
> Jian Qiu
> 
>


Re: Review Request 42241: Speed up HookTest.VerifySlaveLaunchExecutorHook.

Posted by Anand Mazumdar <ma...@gmail.com>.

> On Feb. 19, 2016, 2:50 a.m., Anand Mazumdar wrote:
> > src/tests/hook_tests.cpp, line 396
> > <https://reviews.apache.org/r/42241/diff/3/?file=1200496#file1200496line396>
> >
> >     Is there a need to explicitly invoke `Clock::resume()` here? If not, kill it.
> 
> Alexander Rukletsov wrote:
>     Let's leave the test with resumed clock for consistency.
> 
> Anand Mazumdar wrote:
>     Alex, what consistency are you referring to here? Does this file follow the pattern of explicitly doing so?
> 
> Alexander Rukletsov wrote:
>     We've discussed it with BenM here recently: https://reviews.apache.org/r/44994/#comment186808

Don't we explicitly resume the clock at the end of the test if an assertion fails making the `resume` call redundant? https://github.com/apache/mesos/blob/master/3rdparty/libprocess/include/process/gtest.hpp#L47

Looks like I am missing something here.


- Anand


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


On Feb. 19, 2016, 4:36 a.m., Jian Qiu wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/42241/
> -----------------------------------------------------------
> 
> (Updated Feb. 19, 2016, 4:36 a.m.)
> 
> 
> Review request for mesos, Alexander Rukletsov and Timothy Chen.
> 
> 
> Bugs: MESOS-4174
>     https://issues.apache.org/jira/browse/MESOS-4174
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> Speed up HookTest.VerifySlaveLaunchExecutorHook.
> 
> 
> Diffs
> -----
> 
>   src/tests/hook_tests.cpp 59a00ea722a17bbc82b14c69bda826f68cbac6e9 
> 
> Diff: https://reviews.apache.org/r/42241/diff/
> 
> 
> Testing
> -------
> 
> Before
> HookTest.VerifySlaveLaunchExecutorHook (5061 ms)
> 
> After
> HookTest.VerifySlaveLaunchExecutorHook (132 ms)
> 
> 
> Thanks,
> 
> Jian Qiu
> 
>


Re: Review Request 42241: Speed up HookTest.VerifySlaveLaunchExecutorHook.

Posted by Alexander Rukletsov <ru...@gmail.com>.

> On Feb. 19, 2016, 2:50 a.m., Anand Mazumdar wrote:
> > src/tests/hook_tests.cpp, line 396
> > <https://reviews.apache.org/r/42241/diff/3/?file=1200496#file1200496line396>
> >
> >     Is there a need to explicitly invoke `Clock::resume()` here? If not, kill it.
> 
> Alexander Rukletsov wrote:
>     Let's leave the test with resumed clock for consistency.
> 
> Anand Mazumdar wrote:
>     Alex, what consistency are you referring to here? Does this file follow the pattern of explicitly doing so?

We've discussed it with BenM here recently: https://reviews.apache.org/r/44994/#comment186808


- Alexander


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


On Feb. 19, 2016, 4:36 a.m., Jian Qiu wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/42241/
> -----------------------------------------------------------
> 
> (Updated Feb. 19, 2016, 4:36 a.m.)
> 
> 
> Review request for mesos, Alexander Rukletsov and Timothy Chen.
> 
> 
> Bugs: MESOS-4174
>     https://issues.apache.org/jira/browse/MESOS-4174
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> Speed up HookTest.VerifySlaveLaunchExecutorHook.
> 
> 
> Diffs
> -----
> 
>   src/tests/hook_tests.cpp 59a00ea722a17bbc82b14c69bda826f68cbac6e9 
> 
> Diff: https://reviews.apache.org/r/42241/diff/
> 
> 
> Testing
> -------
> 
> Before
> HookTest.VerifySlaveLaunchExecutorHook (5061 ms)
> 
> After
> HookTest.VerifySlaveLaunchExecutorHook (132 ms)
> 
> 
> Thanks,
> 
> Jian Qiu
> 
>


Re: Review Request 42241: Speed up HookTest.VerifySlaveLaunchExecutorHook.

Posted by Jian Qiu <qi...@cn.ibm.com>.

> On 二月 19, 2016, 2:50 a.m., Anand Mazumdar wrote:
> > src/tests/hook_tests.cpp, line 390
> > <https://reviews.apache.org/r/42241/diff/3/?file=1200496#file1200496line390>
> >
> >     hmm ... Can't we just do:
> >     
> >     ```
> >     Clock::pause();
> >     Clock::advance(...);
> >     Clock::settle();
> >     ```

Thanks for reviewing! This settle() is necessary to trigger the shutdownExecutor timer.


- Jian


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


On 二月 19, 2016, 3:29 a.m., Jian Qiu wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/42241/
> -----------------------------------------------------------
> 
> (Updated 二月 19, 2016, 3:29 a.m.)
> 
> 
> Review request for mesos, Alexander Rukletsov and Timothy Chen.
> 
> 
> Bugs: MESOS-4174
>     https://issues.apache.org/jira/browse/MESOS-4174
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> Speed up HookTest.VerifySlaveLaunchExecutorHook.
> 
> 
> Diffs
> -----
> 
>   src/tests/hook_tests.cpp 59a00ea722a17bbc82b14c69bda826f68cbac6e9 
> 
> Diff: https://reviews.apache.org/r/42241/diff/
> 
> 
> Testing
> -------
> 
> Before
> HookTest.VerifySlaveLaunchExecutorHook (5061 ms)
> 
> After
> HookTest.VerifySlaveLaunchExecutorHook (132 ms)
> 
> 
> Thanks,
> 
> Jian Qiu
> 
>


Re: Review Request 42241: Speed up HookTest.VerifySlaveLaunchExecutorHook.

Posted by Anand Mazumdar <ma...@gmail.com>.

> On Feb. 19, 2016, 2:50 a.m., Anand Mazumdar wrote:
> > src/tests/hook_tests.cpp, line 390
> > <https://reviews.apache.org/r/42241/diff/3/?file=1200496#file1200496line390>
> >
> >     hmm ... Can't we just do:
> >     
> >     ```
> >     Clock::pause();
> >     Clock::advance(...);
> >     Clock::settle();
> >     ```
> 
> Jian Qiu wrote:
>     Thanks for reviewing! This settle() is necessary to trigger the shutdownExecutor timer.

Ahh, I see. It's not immediatly obvious to to why we need the first `Clock::settle`. As a suggestion, can we add a comment like this:

```
Clock::settle(); // Wait for `Slave::shutdownExecutor` to complete.
```


- Anand


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


On Feb. 19, 2016, 3:29 a.m., Jian Qiu wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/42241/
> -----------------------------------------------------------
> 
> (Updated Feb. 19, 2016, 3:29 a.m.)
> 
> 
> Review request for mesos, Alexander Rukletsov and Timothy Chen.
> 
> 
> Bugs: MESOS-4174
>     https://issues.apache.org/jira/browse/MESOS-4174
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> Speed up HookTest.VerifySlaveLaunchExecutorHook.
> 
> 
> Diffs
> -----
> 
>   src/tests/hook_tests.cpp 59a00ea722a17bbc82b14c69bda826f68cbac6e9 
> 
> Diff: https://reviews.apache.org/r/42241/diff/
> 
> 
> Testing
> -------
> 
> Before
> HookTest.VerifySlaveLaunchExecutorHook (5061 ms)
> 
> After
> HookTest.VerifySlaveLaunchExecutorHook (132 ms)
> 
> 
> Thanks,
> 
> Jian Qiu
> 
>


Re: Review Request 42241: Speed up HookTest.VerifySlaveLaunchExecutorHook.

Posted by Alexander Rukletsov <ru...@gmail.com>.

> On Feb. 19, 2016, 2:50 a.m., Anand Mazumdar wrote:
> > src/tests/hook_tests.cpp, line 396
> > <https://reviews.apache.org/r/42241/diff/3/?file=1200496#file1200496line396>
> >
> >     Is there a need to explicitly invoke `Clock::resume()` here? If not, kill it.

Let's leave the test with resumed clock for consistency.


- Alexander


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


On Feb. 19, 2016, 4:36 a.m., Jian Qiu wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/42241/
> -----------------------------------------------------------
> 
> (Updated Feb. 19, 2016, 4:36 a.m.)
> 
> 
> Review request for mesos, Alexander Rukletsov and Timothy Chen.
> 
> 
> Bugs: MESOS-4174
>     https://issues.apache.org/jira/browse/MESOS-4174
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> Speed up HookTest.VerifySlaveLaunchExecutorHook.
> 
> 
> Diffs
> -----
> 
>   src/tests/hook_tests.cpp 59a00ea722a17bbc82b14c69bda826f68cbac6e9 
> 
> Diff: https://reviews.apache.org/r/42241/diff/
> 
> 
> Testing
> -------
> 
> Before
> HookTest.VerifySlaveLaunchExecutorHook (5061 ms)
> 
> After
> HookTest.VerifySlaveLaunchExecutorHook (132 ms)
> 
> 
> Thanks,
> 
> Jian Qiu
> 
>


Re: Review Request 42241: Speed up HookTest.VerifySlaveLaunchExecutorHook.

Posted by Jian Qiu <qi...@cn.ibm.com>.

> On 二月 19, 2016, 2:50 a.m., Anand Mazumdar wrote:
> > src/tests/hook_tests.cpp, line 396
> > <https://reviews.apache.org/r/42241/diff/3/?file=1200496#file1200496line396>
> >
> >     Is there a need to explicitly invoke `Clock::resume()` here? If not, kill it.
> 
> Alexander Rukletsov wrote:
>     Let's leave the test with resumed clock for consistency.
> 
> Anand Mazumdar wrote:
>     Alex, what consistency are you referring to here? Does this file follow the pattern of explicitly doing so?
> 
> Alexander Rukletsov wrote:
>     We've discussed it with BenM here recently: https://reviews.apache.org/r/44994/#comment186808
> 
> Anand Mazumdar wrote:
>     Don't we explicitly resume the clock at the end of the test if an assertion fails making the `resume` call redundant? https://github.com/apache/mesos/blob/master/3rdparty/libprocess/include/process/gtest.hpp#L47
>     
>     Looks like I am missing something here.

Change the test here to explicitly destroy container instead of waiting for timeout.


- Jian


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


On 四月 9, 2016, 2:45 p.m., Jian Qiu wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/42241/
> -----------------------------------------------------------
> 
> (Updated 四月 9, 2016, 2:45 p.m.)
> 
> 
> Review request for mesos, Alexander Rukletsov and Timothy Chen.
> 
> 
> Bugs: MESOS-4174
>     https://issues.apache.org/jira/browse/MESOS-4174
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> Speed up HookTest.VerifySlaveLaunchExecutorHook.
> 
> 
> Diffs
> -----
> 
>   src/tests/hook_tests.cpp 0bbb7ac9e80234920814e34286ea0da9b648ebe3 
> 
> Diff: https://reviews.apache.org/r/42241/diff/
> 
> 
> Testing
> -------
> 
> Before
> HookTest.VerifySlaveLaunchExecutorHook (5061 ms)
> 
> After
> HookTest.VerifySlaveLaunchExecutorHook (132 ms)
> 
> 
> Thanks,
> 
> Jian Qiu
> 
>