Fixed compile issue for backporting by removing 'AwaitSingleAbandon'.

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

Branch: refs/heads/1.3.x
Commit: ad74b044516c7254a8f3fcb6a9fcd70840fc2df4
Parents: 4e8394b
Author: Gilbert Song <songzihao1...@gmail.com>
Authored: Mon Mar 5 18:09:40 2018 -0800
Committer: Gilbert Song <songzihao1...@gmail.com>
Committed: Mon Mar 5 18:14:59 2018 -0800

----------------------------------------------------------------------
 3rdparty/libprocess/src/tests/collect_tests.cpp | 35 --------------------
 1 file changed, 35 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mesos/blob/ad74b044/3rdparty/libprocess/src/tests/collect_tests.cpp
----------------------------------------------------------------------
diff --git a/3rdparty/libprocess/src/tests/collect_tests.cpp 
b/3rdparty/libprocess/src/tests/collect_tests.cpp
index 0dd3771..cd6f259 100644
--- a/3rdparty/libprocess/src/tests/collect_tests.cpp
+++ b/3rdparty/libprocess/src/tests/collect_tests.cpp
@@ -274,38 +274,3 @@ TEST(AwaitTest, AwaitSingleDiscard)
 
   EXPECT_TRUE(promise.future().hasDiscard());
 }
-
-
-TEST(AwaitTest, AwaitSingleAbandon)
-{
-  Owned<Promise<int>> promise(new Promise<int>());
-
-  auto bar = [&]() {
-    return promise->future();
-  };
-
-  auto foo = [&]() {
-    return await(bar())
-      .then([](const Future<int>& f) {
-        return f
-          .then([](int i) {
-            return stringify(i);
-          });
-      });
-  };
-
-  // There is a race from the time that we reset the promise to when
-  // the await process is terminated so we need to use Future::recover
-  // to properly handle this case.
-  Future<string> future = foo()
-    .recover([](const Future<string>& f) -> Future<string> {
-      if (f.isAbandoned()) {
-        return "hello";
-      }
-      return f;
-    });
-
-  promise.reset();
-
-  AWAIT_EQ("hello", future);
-}

Reply via email to