mesos-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chhs...@apache.org
Subject [10/12] mesos git commit: Fixed flakiness for some `AgentResourceProviderConfigApiTest` tests.
Date Fri, 01 Jun 2018 01:32:36 GMT
Fixed flakiness for some `AgentResourceProviderConfigApiTest` tests.

The `ROOT_Add`, `ROOT_Update` and `ROOT_Remove` tests mistakenly use
`WillOnce` to declient unwanted offers. This patch changes them to
`WillRepeatedly`.

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


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

Branch: refs/heads/master
Commit: 0ce1ffae5bdb86fb8cbecd5bf7bb4929501d1aae
Parents: 261fcca
Author: Chun-Hung Hsiao <chhsiao@mesosphere.io>
Authored: Tue May 22 16:23:20 2018 -0700
Committer: Chun-Hung Hsiao <chhsiao@mesosphere.io>
Committed: Thu May 31 18:29:56 2018 -0700

----------------------------------------------------------------------
 src/tests/agent_resource_provider_config_api_tests.cpp | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mesos/blob/0ce1ffae/src/tests/agent_resource_provider_config_api_tests.cpp
----------------------------------------------------------------------
diff --git a/src/tests/agent_resource_provider_config_api_tests.cpp b/src/tests/agent_resource_provider_config_api_tests.cpp
index 7d4d3b9..e1967d1 100644
--- a/src/tests/agent_resource_provider_config_api_tests.cpp
+++ b/src/tests/agent_resource_provider_config_api_tests.cpp
@@ -325,7 +325,7 @@ TEST_P(AgentResourceProviderConfigApiTest, ROOT_Add)
 
   // Decline offers that contain only the agent's default resources.
   EXPECT_CALL(sched, resourceOffers(&driver, _))
-    .WillOnce(DeclineOffers(declineFilters));
+    .WillRepeatedly(DeclineOffers(declineFilters));
 
   Future<vector<Offer>> offers;
 
@@ -539,7 +539,7 @@ TEST_P(AgentResourceProviderConfigApiTest, ROOT_Update)
 
   // Decline offers that contain only the agent's default resources.
   EXPECT_CALL(sched, resourceOffers(&driver, _))
-    .WillOnce(DeclineOffers(declineFilters));
+    .WillRepeatedly(DeclineOffers(declineFilters));
 
   Future<vector<Offer>> oldOffers;
 
@@ -754,7 +754,7 @@ TEST_P(AgentResourceProviderConfigApiTest, ROOT_Remove)
 
   // Decline offers that contain only the agent's default resources.
   EXPECT_CALL(sched, resourceOffers(&driver, _))
-    .WillOnce(DeclineOffers(declineFilters));
+    .WillRepeatedly(DeclineOffers(declineFilters));
 
   Future<vector<Offer>> oldOffers;
 


Mime
View raw message