| 131 | // Assert the future is failed *now* |
| 132 | template <typename T> |
| 133 | void AssertFailed(const Future<T>& fut) { |
| 134 | if (IsFutureFinished(fut.state())) { |
| 135 | ASSERT_EQ(fut.state(), FutureState::FAILURE); |
| 136 | ASSERT_FALSE(fut.status().ok()); |
| 137 | } else { |
| 138 | FAIL() << "Expected future to have failed but it was still pending"; |
| 139 | } |
| 140 | } |
| 141 | |
| 142 | } // namespace arrow |