You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mesos.apache.org by vi...@apache.org on 2014/02/11 20:30:54 UTC
[4/5] git commit: Fixed flaky
MasterZooKeeperTest.LostZooKeeperCluster.
Fixed flaky MasterZooKeeperTest.LostZooKeeperCluster.
Review: https://reviews.apache.org/r/17864
Project: http://git-wip-us.apache.org/repos/asf/mesos/repo
Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/c84d0802
Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/c84d0802
Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/c84d0802
Branch: refs/heads/master
Commit: c84d080266c4d2d9e15b73e08cdb848006488632
Parents: 9ad3c04
Author: Jiang Yan Xu <ya...@jxu.me>
Authored: Tue Feb 11 11:20:37 2014 -0800
Committer: Vinod Kone <vi...@twitter.com>
Committed: Tue Feb 11 11:20:37 2014 -0800
----------------------------------------------------------------------
src/tests/master_tests.cpp | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/mesos/blob/c84d0802/src/tests/master_tests.cpp
----------------------------------------------------------------------
diff --git a/src/tests/master_tests.cpp b/src/tests/master_tests.cpp
index 815149a..70dab6f 100644
--- a/src/tests/master_tests.cpp
+++ b/src/tests/master_tests.cpp
@@ -1481,7 +1481,7 @@ TEST_F(MasterZooKeeperTest, LostZooKeeperCluster)
// Need to drop these two dispatches because otherwise the master
// will EXIT.
Future<Nothing> masterDetected = DROP_DISPATCH(_, &Master::detected);
- DROP_DISPATCH(_, &Master::lostCandidacy);
+ Future<Nothing> lostCandidacy = DROP_DISPATCH(_, &Master::lostCandidacy);
Future<Nothing> slaveDetected = FUTURE_DISPATCH(_, &Slave::detected);
@@ -1491,7 +1491,8 @@ TEST_F(MasterZooKeeperTest, LostZooKeeperCluster)
while (schedulerDisconnected.isPending() ||
masterDetected.isPending() ||
- slaveDetected.isPending()) {
+ slaveDetected.isPending() ||
+ lostCandidacy.isPending()) {
Clock::advance(MASTER_CONTENDER_ZK_SESSION_TIMEOUT);
Clock::settle();
}
@@ -1501,6 +1502,7 @@ TEST_F(MasterZooKeeperTest, LostZooKeeperCluster)
// Master, slave and scheduler all lose the leading master.
AWAIT_READY(schedulerDisconnected);
AWAIT_READY(masterDetected);
+ AWAIT_READY(lostCandidacy);
AWAIT_READY(slaveDetected);
driver.stop();