Review Request 44275: Fixed flakiness in tests using the scheduler library.

2016-03-02 Thread Anand Mazumdar

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

Review request for mesos and Vinod Kone.


Bugs: MESOS-4029
https://issues.apache.org/jira/browse/MESOS-4029


Repository: mesos


Description
---

This change fixes the tests using the scheduler library by
explicitly invoking `stop()` from the testing interface. This
ensures that no further callbacks are delivered to the scheduler.

For one-off async callbacks that are already on the libprocess queue
we need to do a `Clock::settle` to ensure they are executed before
the mock object goes out of scope.


Diffs
-

  src/tests/mesos.hpp 0c55d5901753dc3f6e71486f727a2af7bd920429 

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


Testing
---

make check + Induced a sleep in the async callbacks. Previously, the test used 
to crash but with the fix it no longer crashes.


Thanks,

Anand Mazumdar



Re: Review Request 44275: Fixed flakiness in tests using the scheduler library.

2016-03-02 Thread Mesos ReviewBot

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



Bad patch!

Reviews applied: [44275, 44274, 44273]

Failed command: ./support/apply-review.sh -n -r 44273

Error:
2016-03-02 20:25:32 URL:https://reviews.apache.org/r/44273/diff/raw/ 
[46243/46243] -> "44273.patch" [1]
error: patch failed: src/tests/scheduler_tests.cpp:589
error: src/tests/scheduler_tests.cpp: patch does not apply

Full log: https://builds.apache.org/job/mesos-reviewbot/11784/console

- Mesos ReviewBot


On March 2, 2016, 6:21 p.m., Anand Mazumdar wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/44275/
> ---
> 
> (Updated March 2, 2016, 6:21 p.m.)
> 
> 
> Review request for mesos and Vinod Kone.
> 
> 
> Bugs: MESOS-4029
> https://issues.apache.org/jira/browse/MESOS-4029
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> This change fixes the tests using the scheduler library by
> explicitly invoking `stop()` from the testing interface. This
> ensures that no further callbacks are delivered to the scheduler.
> 
> For one-off async callbacks that are already on the libprocess queue
> we need to do a `Clock::settle` to ensure they are executed before
> the mock object goes out of scope.
> 
> 
> Diffs
> -
> 
>   src/tests/mesos.hpp 0c55d5901753dc3f6e71486f727a2af7bd920429 
> 
> Diff: https://reviews.apache.org/r/44275/diff/
> 
> 
> Testing
> ---
> 
> make check + Induced a sleep in the async callbacks. Previously, the test 
> used to crash but with the fix it no longer crashes.
> 
> 
> Thanks,
> 
> Anand Mazumdar
> 
>



Re: Review Request 44275: Fixed flakiness in tests using the scheduler library.

2016-03-02 Thread Anand Mazumdar

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

(Updated March 2, 2016, 9:08 p.m.)


Review request for mesos and Vinod Kone.


Changes
---

Make review bot run again.


Bugs: MESOS-4029
https://issues.apache.org/jira/browse/MESOS-4029


Repository: mesos


Description
---

This change fixes the tests using the scheduler library by
explicitly invoking `stop()` from the testing interface. This
ensures that no further callbacks are delivered to the scheduler.

For one-off async callbacks that are already on the libprocess queue
we need to do a `Clock::settle` to ensure they are executed before
the mock object goes out of scope.


Diffs (updated)
-

  src/tests/mesos.hpp 1d4f075e470a60040e17b9f011aea6202310c437 

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


Testing
---

make check + Induced a sleep in the async callbacks. Previously, the test used 
to crash but with the fix it no longer crashes.


Thanks,

Anand Mazumdar



Re: Review Request 44275: Fixed flakiness in tests using the scheduler library.

2016-03-02 Thread Vinod Kone

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




src/tests/mesos.hpp (lines 992 - 994)


MESOS-4029 is talking about a bunch of issues. The final thing it says is 
to use a shared_ptr. There is nothing about why there needs to be a stop() and 
this settle().

Can you explain here with a little more detail for posterity? both the 
stop() and settle().


- Vinod Kone


On March 2, 2016, 9:08 p.m., Anand Mazumdar wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/44275/
> ---
> 
> (Updated March 2, 2016, 9:08 p.m.)
> 
> 
> Review request for mesos and Vinod Kone.
> 
> 
> Bugs: MESOS-4029
> https://issues.apache.org/jira/browse/MESOS-4029
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> This change fixes the tests using the scheduler library by
> explicitly invoking `stop()` from the testing interface. This
> ensures that no further callbacks are delivered to the scheduler.
> 
> For one-off async callbacks that are already on the libprocess queue
> we need to do a `Clock::settle` to ensure they are executed before
> the mock object goes out of scope.
> 
> 
> Diffs
> -
> 
>   src/tests/mesos.hpp 1d4f075e470a60040e17b9f011aea6202310c437 
> 
> Diff: https://reviews.apache.org/r/44275/diff/
> 
> 
> Testing
> ---
> 
> make check + Induced a sleep in the async callbacks. Previously, the test 
> used to crash but with the fix it no longer crashes.
> 
> 
> Thanks,
> 
> Anand Mazumdar
> 
>



Re: Review Request 44275: Fixed flakiness in tests using the scheduler library.

2016-03-02 Thread Anand Mazumdar


> On March 3, 2016, 1:10 a.m., Vinod Kone wrote:
> > src/tests/mesos.hpp, lines 992-994
> > 
> >
> > MESOS-4029 is talking about a bunch of issues. The final thing it says 
> > is to use a shared_ptr. There is nothing about why there needs to be a 
> > stop() and this settle().
> > 
> > Can you explain here with a little more detail for posterity? both the 
> > stop() and settle().

+1. I removed the link to the JIRA since it was doing more harm than good. I 
modified the comment slightly and it looks pretty self-explanatory to me now.


- Anand


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


On March 2, 2016, 9:08 p.m., Anand Mazumdar wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/44275/
> ---
> 
> (Updated March 2, 2016, 9:08 p.m.)
> 
> 
> Review request for mesos and Vinod Kone.
> 
> 
> Bugs: MESOS-4029
> https://issues.apache.org/jira/browse/MESOS-4029
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> This change fixes the tests using the scheduler library by
> explicitly invoking `stop()` from the testing interface. This
> ensures that no further callbacks are delivered to the scheduler.
> 
> For one-off async callbacks that are already on the libprocess queue
> we need to do a `Clock::settle` to ensure they are executed before
> the mock object goes out of scope.
> 
> 
> Diffs
> -
> 
>   src/tests/mesos.hpp 1d4f075e470a60040e17b9f011aea6202310c437 
> 
> Diff: https://reviews.apache.org/r/44275/diff/
> 
> 
> Testing
> ---
> 
> make check + Induced a sleep in the async callbacks. Previously, the test 
> used to crash but with the fix it no longer crashes.
> 
> 
> Thanks,
> 
> Anand Mazumdar
> 
>



Re: Review Request 44275: Fixed flakiness in tests using the scheduler library.

2016-03-02 Thread Anand Mazumdar

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

(Updated March 3, 2016, 1:31 a.m.)


Review request for mesos and Vinod Kone.


Changes
---

Review comments from Vinod


Bugs: MESOS-4029
https://issues.apache.org/jira/browse/MESOS-4029


Repository: mesos


Description
---

This change fixes the tests using the scheduler library by
explicitly invoking `stop()` from the testing interface. This
ensures that no further callbacks are delivered to the scheduler.

For one-off async callbacks that are already on the libprocess queue
we need to do a `Clock::settle` to ensure they are executed before
the mock object goes out of scope.


Diffs (updated)
-

  src/tests/mesos.hpp 1d4f075e470a60040e17b9f011aea6202310c437 

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


Testing
---

make check + Induced a sleep in the async callbacks. Previously, the test used 
to crash but with the fix it no longer crashes.


Thanks,

Anand Mazumdar



Re: Review Request 44275: Fixed flakiness in tests using the scheduler library.

2016-03-02 Thread Mesos ReviewBot

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



Patch looks great!

Reviews applied: [44273, 44274, 44275]

Passed command: export OS='ubuntu:14.04' CONFIGURATION='--verbose' 
COMPILER='gcc' ENVIRONMENT='GLOG_v=1 MESOS_VERBOSE=1'; ./support/docker_build.sh

- Mesos ReviewBot


On March 3, 2016, 1:31 a.m., Anand Mazumdar wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/44275/
> ---
> 
> (Updated March 3, 2016, 1:31 a.m.)
> 
> 
> Review request for mesos and Vinod Kone.
> 
> 
> Bugs: MESOS-4029
> https://issues.apache.org/jira/browse/MESOS-4029
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> This change fixes the tests using the scheduler library by
> explicitly invoking `stop()` from the testing interface. This
> ensures that no further callbacks are delivered to the scheduler.
> 
> For one-off async callbacks that are already on the libprocess queue
> we need to do a `Clock::settle` to ensure they are executed before
> the mock object goes out of scope.
> 
> 
> Diffs
> -
> 
>   src/tests/mesos.hpp 1d4f075e470a60040e17b9f011aea6202310c437 
> 
> Diff: https://reviews.apache.org/r/44275/diff/
> 
> 
> Testing
> ---
> 
> make check + Induced a sleep in the async callbacks. Previously, the test 
> used to crash but with the fix it no longer crashes.
> 
> 
> Thanks,
> 
> Anand Mazumdar
> 
>



Re: Review Request 44275: Fixed flakiness in tests using the scheduler library.

2016-03-03 Thread Anand Mazumdar

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

(Updated March 4, 2016, 12:03 a.m.)


Review request for mesos and Vinod Kone.


Changes
---

Review comments from Vinod to add more comments to the destructor.


Bugs: MESOS-4029
https://issues.apache.org/jira/browse/MESOS-4029


Repository: mesos


Description
---

This change fixes the tests using the scheduler library by
explicitly invoking `stop()` from the testing interface. This
ensures that no further callbacks are delivered to the scheduler.

For one-off async callbacks that are already on the libprocess queue
we need to do a `Clock::settle` to ensure they are executed before
the mock object goes out of scope.


Diffs (updated)
-

  src/tests/mesos.hpp 1d4f075e470a60040e17b9f011aea6202310c437 

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


Testing
---

make check + Induced a sleep in the async callbacks. Previously, the test used 
to crash but with the fix it no longer crashes.


Thanks,

Anand Mazumdar



Re: Review Request 44275: Fixed flakiness in tests using the scheduler library.

2016-03-03 Thread Vinod Kone

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


Ship it!




Ship It!

- Vinod Kone


On March 4, 2016, 12:03 a.m., Anand Mazumdar wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/44275/
> ---
> 
> (Updated March 4, 2016, 12:03 a.m.)
> 
> 
> Review request for mesos and Vinod Kone.
> 
> 
> Bugs: MESOS-4029
> https://issues.apache.org/jira/browse/MESOS-4029
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> This change fixes the tests using the scheduler library by
> explicitly invoking `stop()` from the testing interface. This
> ensures that no further callbacks are delivered to the scheduler.
> 
> For one-off async callbacks that are already on the libprocess queue
> we need to do a `Clock::settle` to ensure they are executed before
> the mock object goes out of scope.
> 
> 
> Diffs
> -
> 
>   src/tests/mesos.hpp 1d4f075e470a60040e17b9f011aea6202310c437 
> 
> Diff: https://reviews.apache.org/r/44275/diff/
> 
> 
> Testing
> ---
> 
> make check + Induced a sleep in the async callbacks. Previously, the test 
> used to crash but with the fix it no longer crashes.
> 
> 
> Thanks,
> 
> Anand Mazumdar
> 
>