Commit 70ebf75b authored by Adam Norton's avatar Adam Norton Committed by Facebook Github Bot

Fix WindowTests

Summary: `collect` short-circuits on an exception, so we need to wait for all the callbacks before deallocating the captured state

Reviewed By: yfeldblum

Differential Revision: D14818841

fbshipit-source-id: e7af2965b7641feff1e4230a6a66c7860994f826
parent 2b546a7a
...@@ -359,7 +359,7 @@ TEST(WindowExecutor, parallel) { ...@@ -359,7 +359,7 @@ TEST(WindowExecutor, parallel) {
t.join(); t.join();
} }
executor.waitFor(f); executor.drain();
EXPECT_TRUE(f.isReady()); EXPECT_TRUE(f.isReady());
for (size_t i = 0; i < ps.size(); i++) { for (size_t i = 0; i < ps.size(); i++) {
EXPECT_EQ(i, f.value()[i]); EXPECT_EQ(i, f.value()[i]);
...@@ -396,7 +396,7 @@ TEST(WindowExecutor, parallelWithError) { ...@@ -396,7 +396,7 @@ TEST(WindowExecutor, parallelWithError) {
t.join(); t.join();
} }
executor.waitFor(f); executor.drain();
EXPECT_TRUE(f.isReady()); EXPECT_TRUE(f.isReady());
EXPECT_THROW(f.value(), eggs_t); EXPECT_THROW(f.value(), eggs_t);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment