You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mesos.apache.org by gi...@apache.org on 2018/01/13 01:03:17 UTC
[2/4] mesos git commit: Reverted "Updated composing containerizer
tests.".
Reverted "Updated composing containerizer tests.".
This reverts commit 84365a140c3730e2d6579ad500118d6749d2f87f.
Review: https://reviews.apache.org/r/65140
Project: http://git-wip-us.apache.org/repos/asf/mesos/repo
Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/ee06a3b4
Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/ee06a3b4
Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/ee06a3b4
Branch: refs/heads/master
Commit: ee06a3b4e15a0419df2311e65a72bf03e6bae802
Parents: dd6ab9d
Author: Gilbert Song <so...@gmail.com>
Authored: Thu Jan 11 17:59:19 2018 -0800
Committer: Gilbert Song <so...@gmail.com>
Committed: Fri Jan 12 17:01:07 2018 -0800
----------------------------------------------------------------------
.../composing_containerizer_tests.cpp | 34 ++------------------
1 file changed, 2 insertions(+), 32 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/mesos/blob/ee06a3b4/src/tests/containerizer/composing_containerizer_tests.cpp
----------------------------------------------------------------------
diff --git a/src/tests/containerizer/composing_containerizer_tests.cpp b/src/tests/containerizer/composing_containerizer_tests.cpp
index 7c22f16..09f7ea4 100644
--- a/src/tests/containerizer/composing_containerizer_tests.cpp
+++ b/src/tests/containerizer/composing_containerizer_tests.cpp
@@ -88,12 +88,6 @@ TEST_F(ComposingContainerizerTest, DestroyDuringUnsupportedLaunchLoop)
EXPECT_CALL(*mockContainerizer1, launch(_, _, _, _))
.WillOnce(Return(launchPromise.future()));
- Future<Nothing> wait;
- Promise<Option<ContainerTermination>> waitPromise;
- EXPECT_CALL(*mockContainerizer1, wait(_))
- .WillOnce(DoAll(FutureSatisfy(&wait),
- Return(waitPromise.future())));
-
Future<Nothing> destroy;
Promise<bool> destroyPromise;
EXPECT_CALL(*mockContainerizer1, destroy(_))
@@ -115,9 +109,6 @@ TEST_F(ComposingContainerizerTest, DestroyDuringUnsupportedLaunchLoop)
EXPECT_CALL(*mockContainerizer2, launch(_, _, _, _))
.Times(0);
- // We make sure the wait is being called on the first containerizer.
- AWAIT_READY(wait);
-
// We make sure the destroy is being called on the first containerizer.
// The second containerizer shouldn't be called as well since the
// container is already destroyed.
@@ -125,7 +116,6 @@ TEST_F(ComposingContainerizerTest, DestroyDuringUnsupportedLaunchLoop)
launchPromise.set(Containerizer::LaunchResult::NOT_SUPPORTED);
destroyPromise.set(false);
- waitPromise.set(Option<ContainerTermination>::none());
// `launched` should be a failure and `destroyed` should be true
// because the launch was stopped from being tried on the 2nd
@@ -140,7 +130,7 @@ TEST_F(ComposingContainerizerTest, DestroyDuringUnsupportedLaunchLoop)
// underlying containerizer's destroy (because it's not sure
// if the containerizer can handle the type of container being
// launched). If the launch is successful the destroy future
-// value depends on the containerizer's termination future.
+// value depends on the containerizer's destroy.
TEST_F(ComposingContainerizerTest, DestroyDuringSupportedLaunchLoop)
{
vector<Containerizer*> containerizers;
@@ -164,12 +154,6 @@ TEST_F(ComposingContainerizerTest, DestroyDuringSupportedLaunchLoop)
EXPECT_CALL(*mockContainerizer1, launch(_, _, _, _))
.WillOnce(Return(launchPromise.future()));
- Future<Nothing> wait;
- Promise<Option<ContainerTermination>> waitPromise;
- EXPECT_CALL(*mockContainerizer1, wait(_))
- .WillOnce(DoAll(FutureSatisfy(&wait),
- Return(waitPromise.future())));
-
Future<Nothing> destroy;
Promise<bool> destroyPromise;
EXPECT_CALL(*mockContainerizer1, destroy(_))
@@ -191,9 +175,6 @@ TEST_F(ComposingContainerizerTest, DestroyDuringSupportedLaunchLoop)
EXPECT_CALL(*mockContainerizer2, launch(_, _, _, _))
.Times(0);
- // We make sure the wait is being called on the first containerizer.
- AWAIT_READY(wait);
-
// We make sure the destroy is being called on the first containerizer.
// The second containerizer shouldn't be called as well since the
// container is already destroyed.
@@ -201,10 +182,9 @@ TEST_F(ComposingContainerizerTest, DestroyDuringSupportedLaunchLoop)
launchPromise.set(Containerizer::LaunchResult::SUCCESS);
destroyPromise.set(false);
- waitPromise.set(Option<ContainerTermination>::none());
// `launched` should return true and `destroyed` should return false
- // because the launch succeeded and `waitPromise` was set to `None`.
+ // because the launch succeeded and `destroyPromise` was set to false.
AWAIT_EXPECT_EQ(Containerizer::LaunchResult::SUCCESS, launched);
AWAIT_EXPECT_EQ(false, destroyed);
}
@@ -236,12 +216,6 @@ TEST_F(ComposingContainerizerTest, DestroyAfterLaunchLoop)
EXPECT_CALL(*mockContainerizer1, launch(_, _, _, _))
.WillOnce(Return(launchPromise.future()));
- Future<Nothing> wait;
- Promise<Option<ContainerTermination>> waitPromise;
- EXPECT_CALL(*mockContainerizer1, wait(_))
- .WillOnce(DoAll(FutureSatisfy(&wait),
- Return(waitPromise.future())));
-
Future<Nothing> destroy;
Promise<bool> destroyPromise;
EXPECT_CALL(*mockContainerizer1, destroy(_))
@@ -260,15 +234,11 @@ TEST_F(ComposingContainerizerTest, DestroyAfterLaunchLoop)
Future<bool> destroyed = containerizer.destroy(containerId);
- // We make sure the wait is being called on the containerizer.
- AWAIT_READY(wait);
-
// We make sure the destroy is being called on the containerizer.
AWAIT_READY(destroy);
launchPromise.set(Containerizer::LaunchResult::NOT_SUPPORTED);
destroyPromise.set(false);
- waitPromise.set(Option<ContainerTermination>::none());
// `launch` should return false and `destroyed` should return false
// because none of the containerizers support the launch.