You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mesos.apache.org by bm...@apache.org on 2016/04/18 20:35:59 UTC

mesos git commit: Fixed the flaky MasterSlaveReconciliation.ReconcileRace test.

Repository: mesos
Updated Branches:
  refs/heads/master cb6c04eda -> cd4b24be6


Fixed the flaky MasterSlaveReconciliation.ReconcileRace test.

Since the agent retries registration, we need to ensure that
any duplicate registration messages are flushed prior to
triggering a re-registration in the agent.

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


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

Branch: refs/heads/master
Commit: cd4b24be62cf4fdf0915bf45f47171d2c143343f
Parents: cb6c04e
Author: Benjamin Mahler <bm...@apache.org>
Authored: Mon Apr 18 11:22:35 2016 -0700
Committer: Benjamin Mahler <bm...@apache.org>
Committed: Mon Apr 18 11:35:43 2016 -0700

----------------------------------------------------------------------
 src/tests/master_slave_reconciliation_tests.cpp | 8 ++++++++
 1 file changed, 8 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mesos/blob/cd4b24be/src/tests/master_slave_reconciliation_tests.cpp
----------------------------------------------------------------------
diff --git a/src/tests/master_slave_reconciliation_tests.cpp b/src/tests/master_slave_reconciliation_tests.cpp
index 71fb78a..7c41215 100644
--- a/src/tests/master_slave_reconciliation_tests.cpp
+++ b/src/tests/master_slave_reconciliation_tests.cpp
@@ -295,6 +295,14 @@ TEST_F(MasterSlaveReconciliationTest, ReconcileRace)
 
   driver.start();
 
+  // Since the agent may have retried registration, we want to
+  // ensure that any duplicate registrations are flushed before
+  // we appoint the master again. Otherwise, the agent may
+  // receive a stale registration message.
+  Clock::pause();
+  Clock::settle();
+  Clock::resume();
+
   // Trigger a re-registration of the slave and capture the message
   // so that we can spoof a race with a launch task message.
   DROP_PROTOBUFS(ReregisterSlaveMessage(), slave.get()->pid, master.get()->pid);