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/dc6beb74
Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/dc6beb74
Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/dc6beb74

Branch: refs/heads/1.5.x
Commit: dc6beb74acf4fe2a1607ec7a2153b09958e8c256
Parents: c055944
Author: Gilbert Song <songzihao1...@gmail.com>
Authored: Thu Jan 11 17:59:19 2018 -0800
Committer: Gilbert Song <songzihao1...@gmail.com>
Committed: Fri Jan 12 17:04:19 2018 -0800

----------------------------------------------------------------------
 .../composing_containerizer_tests.cpp           | 34 ++------------------
 1 file changed, 2 insertions(+), 32 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mesos/blob/dc6beb74/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.

Reply via email to