Fixed the flaky FaultToleranceTest.eSchedulerFailoverFrameworkMessage test.
Review: https://reviews.apache.org/r/30423 Project: http://git-wip-us.apache.org/repos/asf/mesos/repo Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/99389235 Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/99389235 Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/99389235 Branch: refs/heads/master Commit: 99389235e25b106c2b1c9d688c82e04af7dcdc8e Parents: dc7c4b6 Author: Benjamin Mahler <[email protected]> Authored: Thu Jan 29 11:46:40 2015 -0800 Committer: Benjamin Mahler <[email protected]> Committed: Thu Jan 29 17:19:44 2015 -0800 ---------------------------------------------------------------------- src/tests/fault_tolerance_tests.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/mesos/blob/99389235/src/tests/fault_tolerance_tests.cpp ---------------------------------------------------------------------- diff --git a/src/tests/fault_tolerance_tests.cpp b/src/tests/fault_tolerance_tests.cpp index e0065b3..f927d4a 100644 --- a/src/tests/fault_tolerance_tests.cpp +++ b/src/tests/fault_tolerance_tests.cpp @@ -1380,13 +1380,17 @@ TEST_F(FaultToleranceTest, SchedulerFailoverFrameworkMessage) EXPECT_CALL(sched2, frameworkMessage(&driver2, _, _, _)) .WillOnce(FutureSatisfy(&frameworkMessage)); - EXPECT_CALL(sched1, error(&driver1, "Framework failed over")); + Future<Nothing> error; + EXPECT_CALL(sched1, error(&driver1, "Framework failed over")) + .WillOnce(FutureSatisfy(&error)); Future<UpdateFrameworkMessage> updateFrameworkMessage = FUTURE_PROTOBUF(UpdateFrameworkMessage(), _, _); driver2.start(); + AWAIT_READY(error); + AWAIT_READY(registered); // Wait for the slave to get the updated framework pid.
