You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mesos.apache.org by tn...@apache.org on 2016/01/13 23:16:06 UTC
[2/3] mesos git commit: Added expectations for call to mocked
executor shutdown.
Added expectations for call to mocked executor shutdown.
Review: https://reviews.apache.org/r/42215/
Project: http://git-wip-us.apache.org/repos/asf/mesos/repo
Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/3e24f5f2
Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/3e24f5f2
Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/3e24f5f2
Branch: refs/heads/master
Commit: 3e24f5f210f28256f63bad3459131594e71365ca
Parents: f139333
Author: Greg Mann <gr...@mesosphere.io>
Authored: Wed Jan 13 13:24:04 2016 -0800
Committer: Timothy Chen <tn...@apache.org>
Committed: Wed Jan 13 14:15:58 2016 -0800
----------------------------------------------------------------------
src/tests/reservation_tests.cpp | 16 ++++++++++++++++
1 file changed, 16 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/mesos/blob/3e24f5f2/src/tests/reservation_tests.cpp
----------------------------------------------------------------------
diff --git a/src/tests/reservation_tests.cpp b/src/tests/reservation_tests.cpp
index 61d275c..1c318b4 100644
--- a/src/tests/reservation_tests.cpp
+++ b/src/tests/reservation_tests.cpp
@@ -60,6 +60,7 @@ using std::string;
using std::vector;
using testing::_;
+using testing::AtMost;
using testing::DoAll;
using testing::DoDefault;
@@ -268,6 +269,9 @@ TEST_F(ReservationTest, ReserveAndLaunchThenUnreserve)
EXPECT_TRUE(Resources(offer.resources()).contains(unreserved));
+ EXPECT_CALL(exec, shutdown(_))
+ .Times(AtMost(1));
+
driver.stop();
driver.join();
@@ -978,6 +982,9 @@ TEST_F(ReservationTest, CompatibleCheckpointedResources)
terminate(slave2);
wait(slave2);
+ EXPECT_CALL(exec, shutdown(_))
+ .Times(AtMost(1));
+
driver.stop();
driver.join();
@@ -1104,6 +1111,9 @@ TEST_F(ReservationTest, CompatibleCheckpointedResourcesWithPersistentVolumes)
terminate(slave2);
wait(slave2);
+ EXPECT_CALL(exec, shutdown(_))
+ .Times(AtMost(1));
+
driver.stop();
driver.join();
@@ -1208,6 +1218,9 @@ TEST_F(ReservationTest, IncompatibleCheckpointedResources)
terminate(slave2);
wait(slave2);
+ EXPECT_CALL(exec, shutdown(_))
+ .Times(AtMost(1));
+
driver.stop();
driver.join();
@@ -1723,6 +1736,9 @@ TEST_F(ReservationTest, ACLMultipleOperations)
// Check that the task launched as expected.
EXPECT_EQ(TASK_FINISHED, failedTaskStatus.get().state());
+ EXPECT_CALL(exec, shutdown(_))
+ .Times(AtMost(1));
+
driver.stop();
driver.join();