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 2018/02/28 16:06:26 UTC
mesos git commit: Fixed flakyness in
MasterTests.RegistryUpdateAfterReconfiguration.
Repository: mesos
Updated Branches:
refs/heads/master d07e51120 -> a15eb712a
Fixed flakyness in MasterTests.RegistryUpdateAfterReconfiguration.
It could happen that an agent resends its `RegisterSlaveMessage`
and with the correct timing, the master would assume that it
comes from a new agent with the same pid and store its information
in the registry. See MESOS-8336.
Review: https://reviews.apache.org/r/65758/
Project: http://git-wip-us.apache.org/repos/asf/mesos/repo
Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/a15eb712
Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/a15eb712
Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/a15eb712
Branch: refs/heads/master
Commit: a15eb712afd51048756148a5af9cd60e86c8e90b
Parents: d07e511
Author: Benno Evers <be...@mesosphere.com>
Authored: Wed Feb 28 17:05:24 2018 +0100
Committer: Alexander Rukletsov <al...@apache.org>
Committed: Wed Feb 28 17:05:24 2018 +0100
----------------------------------------------------------------------
src/tests/master_tests.cpp | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/mesos/blob/a15eb712/src/tests/master_tests.cpp
----------------------------------------------------------------------
diff --git a/src/tests/master_tests.cpp b/src/tests/master_tests.cpp
index 07422bf..8be43f3 100644
--- a/src/tests/master_tests.cpp
+++ b/src/tests/master_tests.cpp
@@ -2657,10 +2657,10 @@ TEST_F(MasterTest, SlavesEndpointQuerySlave)
// Tests that the master correctly updates the slave info on
// slave re-registration.
-//
-// TODO(alexr): Enable after MESOS-8336 is resolved.
-TEST_F(MasterTest, DISABLED_RegistryUpdateAfterReconfiguration)
+TEST_F(MasterTest, RegistryUpdateAfterReconfiguration)
{
+ Clock::pause();
+
// Start a master.
master::Flags masterFlags = CreateMasterFlags();
masterFlags.registry = "replicated_log";
@@ -2679,6 +2679,7 @@ TEST_F(MasterTest, DISABLED_RegistryUpdateAfterReconfiguration)
Try<Owned<cluster::Slave>> slave = StartSlave(detector.get(), slaveFlags);
ASSERT_SOME(slave);
+ Clock::advance(slaveFlags.registration_backoff_factor);
AWAIT_READY(slaveRegisteredMessage);
// Restart slave with changed resources.
@@ -2693,6 +2694,7 @@ TEST_F(MasterTest, DISABLED_RegistryUpdateAfterReconfiguration)
slave = StartSlave(detector.get(), slaveFlags);
ASSERT_SOME(slave);
+ Clock::advance(slaveFlags.registration_backoff_factor);
AWAIT_READY(slaveReregisteredMessage);
// Verify master has correctly updated the slave state.