This is an automatically generated e-mail. To reply, visit:

Review request for mesos, Alexander Rukletsov, Jie Yu, and Michael Park.

Bugs: MESOS-4208

Repository: mesos


Fixed race in persistent volume tests. This race occurred because 
`scheduelerDriver.reviveOffers` will trigger an offer immediately, while the 
tests originally assumed that settling and advancing the clock after reviving 
was necessary to produce an offer.



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


In order to reproduce this bug, insert a short sleep onto line 1204 or line 
1402 of `src/tests/persistent_volume_tests.cpp` - note that these line numbers 
refer to the file *before* applying this patch.

The race is due to the fact that calling `reviveOffers` triggers a new offer, 
while the code is assuming that the clock must be settled and advanced before 
an offer will be sent. Thus, the offer may arrive before the `EXPECT_CALL` is 
executed, causing a previous `EXPECT_CALL` to be triggered more times than 

By calling `EXPECT_CALL` before `reviveOffers`, this race is avoided. The 
unnecessary `Clock:settle` and `Clock::advance` calls have been removed as well.

To test, 
 bin/mesos-tests.sh` was run both with and without `sleep(1);` inserted before 
the relevant `EXPECT_CALL`s.


Greg Mann

Reply via email to