disable ThreadExecutor in FutureTest.cpp, on OSX
[folly.git] / folly / futures / test / ViaTest.cpp
index 499d61d4159ae3b7c14e3d89336f514ef73bdc5c..6ed8e29c44b8387e8461766018af67aa74a02bd3 100644 (file)
@@ -291,6 +291,7 @@ TEST(Via, then2Variadic) {
   EXPECT_TRUE(f.a);
 }
 
+#ifndef __APPLE__ // TODO #7372389
 /// Simple executor that does work in another thread
 class ThreadExecutor : public Executor {
   folly::MPMCQueue<Func> funcs;
@@ -339,6 +340,34 @@ TEST(Via, viaThenGetWasRacy) {
   EXPECT_EQ(42, *val);
 }
 
+TEST(Via, callbackRace) {
+  ThreadExecutor x;
+
+  auto fn = [&x]{
+    auto promises = std::make_shared<std::vector<Promise<void>>>(4);
+    std::vector<Future<void>> futures;
+
+    for (auto& p : *promises) {
+      futures.emplace_back(
+        p.getFuture()
+        .via(&x)
+        .then([](Try<void>&&){}));
+    }
+
+    x.waitForStartup();
+    x.add([promises]{
+      for (auto& p : *promises) {
+        p.setValue();
+      }
+    });
+
+    return collectAll(futures);
+  };
+
+  fn().wait();
+}
+#endif
+
 class DummyDrivableExecutor : public DrivableExecutor {
  public:
   void add(Func f) override {}
@@ -415,33 +444,6 @@ TEST(Via, viaRaces) {
   t2.join();
 }
 
-TEST(Via, callbackRace) {
-  ThreadExecutor x;
-
-  auto fn = [&x]{
-    auto promises = std::make_shared<std::vector<Promise<void>>>(4);
-    std::vector<Future<void>> futures;
-
-    for (auto& p : *promises) {
-      futures.emplace_back(
-        p.getFuture()
-        .via(&x)
-        .then([](Try<void>&&){}));
-    }
-
-    x.waitForStartup();
-    x.add([promises]{
-      for (auto& p : *promises) {
-        p.setValue();
-      }
-    });
-
-    return collectAll(futures);
-  };
-
-  fn().wait();
-}
-
 TEST(ViaFunc, liftsVoid) {
   ManualExecutor x;
   int count = 0;