You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mesos.apache.org by ch...@apache.org on 2018/05/04 19:18:49 UTC

[2/2] mesos git commit: Fixed synchronization orders for destructing mock resource providers.

Fixed synchronization orders for destructing mock resource providers.

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


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

Branch: refs/heads/master
Commit: 895f539b17e8d1960c44554e4d646dc9972350bd
Parents: c6a60b8
Author: Chun-Hung Hsiao <ch...@mesosphere.io>
Authored: Fri May 4 12:13:30 2018 -0700
Committer: Chun-Hung Hsiao <ch...@mesosphere.io>
Committed: Fri May 4 12:14:32 2018 -0700

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


http://git-wip-us.apache.org/repos/asf/mesos/blob/895f539b/src/tests/resource_provider_manager_tests.cpp
----------------------------------------------------------------------
diff --git a/src/tests/resource_provider_manager_tests.cpp b/src/tests/resource_provider_manager_tests.cpp
index 662ea3b..c2045f2 100644
--- a/src/tests/resource_provider_manager_tests.cpp
+++ b/src/tests/resource_provider_manager_tests.cpp
@@ -1130,8 +1130,8 @@ TEST_P_TEMP_DISABLED_ON_WINDOWS(
   Future<Nothing> disconnected;
   EXPECT_CALL(*resourceProvider, disconnected())
     .WillOnce(DoAll(
-        FutureSatisfy(&disconnected),
-        Invoke([&resourceProvider]() { resourceProvider.reset(); })))
+        Invoke([&resourceProvider]() { resourceProvider.reset(); }),
+        FutureSatisfy(&disconnected)))
     .WillRepeatedly(Return()); // Ignore spurious calls concurrent with `reset`.
 
   // The agent failover.
@@ -1375,8 +1375,8 @@ TEST_F(ResourceProviderManagerHttpApiTest, ResourceProviderSubscribeDisconnect)
   Future<Nothing> disconnected1;
   EXPECT_CALL(*resourceProvider1, disconnected())
     .WillOnce(DoAll(
-        FutureSatisfy(&disconnected1),
-        Invoke([&resourceProvider1]() { resourceProvider1.reset(); })))
+        Invoke([&resourceProvider1]() { resourceProvider1.reset(); }),
+        FutureSatisfy(&disconnected1)))
     .WillRepeatedly(Return()); // Ignore spurious calls concurrent with `reset`.
 
   Future<Event::Subscribed> subscribed2;