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 2015/09/02 00:41:08 UTC

mesos git commit: Fixed flaky SlaveTest.HTTPSchedulerSlaveRestart test.

Repository: mesos
Updated Branches:
  refs/heads/master dd1f09af9 -> b2879ff48


Fixed flaky SlaveTest.HTTPSchedulerSlaveRestart test.

Paused the clock and then settle/resume invocations to ensure the retry does not
happen.

Review: https://reviews.apache.org/r/37785


Project: http://git-wip-us.apache.org/repos/asf/mesos/repo
Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/b2879ff4
Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/b2879ff4
Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/b2879ff4

Branch: refs/heads/master
Commit: b2879ff482e14f500537d0db82d9d95e7bc5dc64
Parents: dd1f09a
Author: Anand Mazumdar <ma...@gmail.com>
Authored: Tue Sep 1 15:40:35 2015 -0700
Committer: Vinod Kone <vi...@gmail.com>
Committed: Tue Sep 1 15:40:35 2015 -0700

----------------------------------------------------------------------
 src/tests/slave_tests.cpp | 7 +++++++
 1 file changed, 7 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mesos/blob/b2879ff4/src/tests/slave_tests.cpp
----------------------------------------------------------------------
diff --git a/src/tests/slave_tests.cpp b/src/tests/slave_tests.cpp
index d55e9dd..2411918 100644
--- a/src/tests/slave_tests.cpp
+++ b/src/tests/slave_tests.cpp
@@ -2614,9 +2614,16 @@ TEST_F(SlaveTest, HTTPSchedulerSlaveRestart)
   Future<UpdateFrameworkMessage> updateFrameworkMessage =
      DROP_PROTOBUF(UpdateFrameworkMessage(), _, _);
 
+  // Ensure that there will be no reregistration retries from the
+  // slave resulting in another UpdateFrameworkMessage from master.
+  Clock::pause();
+
   slave = StartSlave(containerizer2.get(), flags);
   ASSERT_SOME(slave);
 
+  Clock::settle();
+  Clock::resume();
+
   AWAIT_READY(slaveReregisteredMessage);
   AWAIT_READY(updateFrameworkMessage);