You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mesos.apache.org by ya...@apache.org on 2018/01/04 18:20:25 UTC
mesos git commit: Fixed flaky
PartitionedSlaveReregistrationMasterFailover test.
Repository: mesos
Updated Branches:
refs/heads/master 39525482a -> bbd3aaff9
Fixed flaky PartitionedSlaveReregistrationMasterFailover test.
The test was flaky due to a race condition that causes status updates
to be dropped because the agent reregisters before the schedulers.
Review: https://reviews.apache.org/r/64933/
Project: http://git-wip-us.apache.org/repos/asf/mesos/repo
Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/bbd3aaff
Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/bbd3aaff
Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/bbd3aaff
Branch: refs/heads/master
Commit: bbd3aaff9ea3f8de4405b652a7294ed9a9d36063
Parents: 3952548
Author: Jiang Yan Xu <ya...@jxu.me>
Authored: Thu Jan 4 10:19:50 2018 -0800
Committer: Jiang Yan Xu <xu...@apple.com>
Committed: Thu Jan 4 10:19:50 2018 -0800
----------------------------------------------------------------------
src/tests/partition_tests.cpp | 13 ++++++-------
1 file changed, 6 insertions(+), 7 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/mesos/blob/bbd3aaff/src/tests/partition_tests.cpp
----------------------------------------------------------------------
diff --git a/src/tests/partition_tests.cpp b/src/tests/partition_tests.cpp
index 7f4b9ed..3813139 100644
--- a/src/tests/partition_tests.cpp
+++ b/src/tests/partition_tests.cpp
@@ -808,11 +808,9 @@ TEST_F_TEMP_DISABLED_ON_WINDOWS(PartitionTest, ReregisterSlaveNotPartitionAware)
// not. Both tasks should survive the reregistration of the partitioned
// agent: we allow the non-partition-aware task to continue running for
// backward compatibility with the "non-strict" Mesos 1.0 behavior.
-//
-// TODO(alexr): Re-enable once MESOS-8334 is resolved.
TEST_F_TEMP_DISABLED_ON_WINDOWS(
PartitionTest,
- DISABLED_PartitionedSlaveReregistrationMasterFailover)
+ PartitionedSlaveReregistrationMasterFailover)
{
Clock::pause();
@@ -1023,14 +1021,15 @@ TEST_F_TEMP_DISABLED_ON_WINDOWS(
// Simulate a new master detected event to the slave and the schedulers.
detector.appoint(master.get()->pid);
- // Wait for slave to reregister.
- Clock::advance(slaveFlags.registration_backoff_factor);
- AWAIT_READY(slaveReregistered);
-
// Wait for both schedulers to reregister.
AWAIT_READY(registered1);
AWAIT_READY(registered2);
+ // Register the agent after the schedulers to make sure they receive the
+ // status updates sent by the master.
+ Clock::advance(slaveFlags.registration_backoff_factor);
+ AWAIT_READY(slaveReregistered);
+
AWAIT_READY(runningAgainStatus1);
EXPECT_EQ(TASK_RUNNING, runningAgainStatus1->state());