You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mesos.apache.org by al...@apache.org on 2016/04/12 17:10:25 UTC
[02/10] mesos git commit: Speeded up RecoverTest.AutoInitialization.
Speeded up RecoverTest.AutoInitialization.
Advance the clock to avoid waiting for a retry delay
used by log replicas in recovery protocol.
Review: https://reviews.apache.org/r/43524/
Project: http://git-wip-us.apache.org/repos/asf/mesos/repo
Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/e9ea9890
Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/e9ea9890
Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/e9ea9890
Branch: refs/heads/master
Commit: e9ea9890bcc0c75cc6a5d5447b9f63cdf25fd28e
Parents: 37f382a
Author: Shuai Lin <li...@gmail.com>
Authored: Tue Apr 12 13:15:17 2016 +0200
Committer: Alexander Rukletsov <al...@apache.org>
Committed: Tue Apr 12 14:58:18 2016 +0200
----------------------------------------------------------------------
src/tests/log_tests.cpp | 10 ++++++++++
1 file changed, 10 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/mesos/blob/e9ea9890/src/tests/log_tests.cpp
----------------------------------------------------------------------
diff --git a/src/tests/log_tests.cpp b/src/tests/log_tests.cpp
index 8f208ba..85fc9d4 100644
--- a/src/tests/log_tests.cpp
+++ b/src/tests/log_tests.cpp
@@ -1865,6 +1865,16 @@ TEST_F(RecoverTest, AutoInitialization)
Future<Owned<Replica> > recovering3 = recover(2, replica3, network, true);
+ Clock::pause();
+ Clock::settle();
+
+ // At this moment `replica1` and `replica2` are in EMPTY status, and
+ // are retrying with a random interval between [0.5 sec, 1 sec]. Since
+ // the retry interval is hard coded and is not configurable, we need
+ // to advance the clock here to avoid waiting for the backoff time.
+ Clock::advance(Seconds(1));
+ Clock::resume();
+
AWAIT_READY(recovering1);
AWAIT_READY(recovering2);
AWAIT_READY(recovering3);