You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@mesos.apache.org by Thomas Marshall <tw...@gmail.com> on 2013/03/18 22:40:51 UTC

Review Request: Fixes the flaky AllocatorTest/ResourcesUnused test

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

Review request for mesos, Benjamin Hindman, Vinod Kone, and Ben Mahler.


Description
-------

In the ResourcesUnused test, a framework receives an offer and then launches a task with it that uses less than the entire offer, to check that the unused resources are being returned and reoffered correctly. Since we don't care that the task is actually launched by the executor, just that the master processes the task launching, the test was written under the assumption that it would exit before the executor was registered and received the launchTask call. This doesn't always happen, though, so the test was sometimes failing.

This patch adds in expectations on the executor for the registered and launchTask calls, though since we still don't care whether or not they actually happen they are both cardinality AtMost(1).


This addresses bug MESOS-378.
    https://issues.apache.org/jira/browse/MESOS-378


Diffs
-----

  src/tests/allocator_tests.cpp 4ae8bfd 

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


Testing
-------

make check


Thanks,

Thomas Marshall


Re: Review Request: Fixes the flaky AllocatorTest/ResourcesUnused test

Posted by Thomas Marshall <tw...@gmail.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/9996/
-----------------------------------------------------------

(Updated March 20, 2013, 5:39 p.m.)


Review request for mesos, Benjamin Hindman, Vinod Kone, and Ben Mahler.


Changes
-------

additional testing


Description
-------

In the ResourcesUnused test, a framework receives an offer and then launches a task with it that uses less than the entire offer, to check that the unused resources are being returned and reoffered correctly. Since we don't care that the task is actually launched by the executor, just that the master processes the task launching, the test was written under the assumption that it would exit before the executor was registered and received the launchTask call. This doesn't always happen, though, so the test was sometimes failing.

This patch adds in expectations on the executor for the registered and launchTask calls, though since we still don't care whether or not they actually happen they are both cardinality AtMost(1).


This addresses bug MESOS-378.
    https://issues.apache.org/jira/browse/MESOS-378


Diffs
-----

  src/tests/allocator_tests.cpp 4ae8bfd 

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


Testing (updated)
-------

make check

./bin/mesos-tests.sh --gtest_filter=*ResourcesUnused* --gtest_repeat=300 --gtest_break_on_failure


Thanks,

Thomas Marshall


Re: Review Request: Fixes the flaky AllocatorTest/ResourcesUnused test

Posted by Ben Mahler <be...@gmail.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/9996/#review18134
-----------------------------------------------------------

Ship it!


Can you run this repetitively with a lot of repetitions to check for flakiness?
./bin/mesos-tests.sh --gtest_filter="*ResourcesUnused*" -verbose --gtest_repeat=300 --gtest_break_on_failure

- Ben Mahler


On March 19, 2013, 10:14 p.m., Thomas Marshall wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/9996/
> -----------------------------------------------------------
> 
> (Updated March 19, 2013, 10:14 p.m.)
> 
> 
> Review request for mesos, Benjamin Hindman, Vinod Kone, and Ben Mahler.
> 
> 
> Description
> -------
> 
> In the ResourcesUnused test, a framework receives an offer and then launches a task with it that uses less than the entire offer, to check that the unused resources are being returned and reoffered correctly. Since we don't care that the task is actually launched by the executor, just that the master processes the task launching, the test was written under the assumption that it would exit before the executor was registered and received the launchTask call. This doesn't always happen, though, so the test was sometimes failing.
> 
> This patch adds in expectations on the executor for the registered and launchTask calls, though since we still don't care whether or not they actually happen they are both cardinality AtMost(1).
> 
> 
> This addresses bug MESOS-378.
>     https://issues.apache.org/jira/browse/MESOS-378
> 
> 
> Diffs
> -----
> 
>   src/tests/allocator_tests.cpp 4ae8bfd 
> 
> Diff: https://reviews.apache.org/r/9996/diff/
> 
> 
> Testing
> -------
> 
> make check
> 
> 
> Thanks,
> 
> Thomas Marshall
> 
>


Re: Review Request: Fixes the flaky AllocatorTest/ResourcesUnused test

Posted by Thomas Marshall <tw...@gmail.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/9996/
-----------------------------------------------------------

(Updated March 19, 2013, 10:14 p.m.)


Review request for mesos, Benjamin Hindman, Vinod Kone, and Ben Mahler.


Changes
-------

Vinod's review.


Description
-------

In the ResourcesUnused test, a framework receives an offer and then launches a task with it that uses less than the entire offer, to check that the unused resources are being returned and reoffered correctly. Since we don't care that the task is actually launched by the executor, just that the master processes the task launching, the test was written under the assumption that it would exit before the executor was registered and received the launchTask call. This doesn't always happen, though, so the test was sometimes failing.

This patch adds in expectations on the executor for the registered and launchTask calls, though since we still don't care whether or not they actually happen they are both cardinality AtMost(1).


This addresses bug MESOS-378.
    https://issues.apache.org/jira/browse/MESOS-378


Diffs (updated)
-----

  src/tests/allocator_tests.cpp 4ae8bfd 

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


Testing
-------

make check


Thanks,

Thomas Marshall


Re: Review Request: Fixes the flaky AllocatorTest/ResourcesUnused test

Posted by Vinod Kone <vi...@gmail.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/9996/#review18099
-----------------------------------------------------------

Ship it!



src/tests/allocator_tests.cpp
<https://reviews.apache.org/r/9996/#comment38194>

    pull this down to line #408, to be closer to where it is used.


- Vinod Kone


On March 18, 2013, 9:40 p.m., Thomas Marshall wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/9996/
> -----------------------------------------------------------
> 
> (Updated March 18, 2013, 9:40 p.m.)
> 
> 
> Review request for mesos, Benjamin Hindman, Vinod Kone, and Ben Mahler.
> 
> 
> Description
> -------
> 
> In the ResourcesUnused test, a framework receives an offer and then launches a task with it that uses less than the entire offer, to check that the unused resources are being returned and reoffered correctly. Since we don't care that the task is actually launched by the executor, just that the master processes the task launching, the test was written under the assumption that it would exit before the executor was registered and received the launchTask call. This doesn't always happen, though, so the test was sometimes failing.
> 
> This patch adds in expectations on the executor for the registered and launchTask calls, though since we still don't care whether or not they actually happen they are both cardinality AtMost(1).
> 
> 
> This addresses bug MESOS-378.
>     https://issues.apache.org/jira/browse/MESOS-378
> 
> 
> Diffs
> -----
> 
>   src/tests/allocator_tests.cpp 4ae8bfd 
> 
> Diff: https://reviews.apache.org/r/9996/diff/
> 
> 
> Testing
> -------
> 
> make check
> 
> 
> Thanks,
> 
> Thomas Marshall
> 
>