This is an automated email from the ASF dual-hosted git repository. bmahler pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/mesos.git
The following commit(s) were added to refs/heads/master by this push: new 6287324 Fixed MasterQuotaTest.AvailableResourcesSingleDisconnectedAgent. 6287324 is described below commit 6287324fe2873062c060a89430e5f4f781c3bc21 Author: Benjamin Mahler <bmah...@apache.org> AuthorDate: Wed Apr 3 14:16:00 2019 -0400 Fixed MasterQuotaTest.AvailableResourcesSingleDisconnectedAgent. In this test it was possible for the agent to retry registration either from the initial registration attempt's retry backoff loop, or from the master pinging it with the disconnected bit set. Pausing the clock prevents these issues. Review: https://reviews.apache.org/r/70381 --- src/tests/master_quota_tests.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/tests/master_quota_tests.cpp b/src/tests/master_quota_tests.cpp index 0337f10..66641f2 100644 --- a/src/tests/master_quota_tests.cpp +++ b/src/tests/master_quota_tests.cpp @@ -879,6 +879,13 @@ TEST_F(MasterQuotaTest, AvailableResourcesSingleDisconnectedAgent) AWAIT_READY(agentTotalResources); EXPECT_EQ(defaultAgentResources, agentTotalResources.get()); + // Make sure there are no agent registration retries in flight. + // Pausing also ensures the master does not continue to ping + // the agent once we spoof disconnection (which would trigger + // the agent to re-register). + Clock::pause(); + Clock::settle(); + // Spoof the agent disconnecting from the master. Future<Nothing> deactivateSlave = FUTURE_DISPATCH(_, &MesosAllocatorProcess::deactivateSlave);