-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/42921/
-----------------------------------------------------------
Review request for mesos, Anand Mazumdar and Ben Mahler.
Bugs: MESOS-4518
https://issues.apache.org/jira/browse/MESOS-4518
Repository: mesos
Description
-------
Previously, this test was calling EXPECT_CALL() on
SchedulerDriver.resourceOffers() after the scheduler driver itself had
already been started. This resulted in flaky test results when offers
came in between schedDriver.start() and the EXPECT_CALL().
This commit fixes this test by moving the EXPECT_CALL() above the
schedDriver.start() call. However, because of the nature of this test,
this introduced a few complexities related to processing the incoming offers
in a loop later on. To allow this, we had to introduce a custom gmock
ACTION to enqueue offers in a process::Queue for later processing. In
the future we shoudl consider generalizing this custom ACTION or at
least moving it into src/tests/mesos.hpp for more general use.
Diffs
-----
src/tests/master_tests.cpp ce6ce25a03cdb0883612fe40b20996ec2e50de40
Diff: https://reviews.apache.org/r/42921/diff/
Testing
-------
Tested locally on my mac, as well as with running support/docker_build.sh on a
linux machine.
Thanks,
Kevin Klues