| 120 | // Assert the future is successful *now* |
| 121 | template <typename T> |
| 122 | void AssertSuccessful(const Future<T>& fut) { |
| 123 | if (IsFutureFinished(fut.state())) { |
| 124 | ASSERT_EQ(fut.state(), FutureState::SUCCESS); |
| 125 | ASSERT_OK(fut.status()); |
| 126 | } else { |
| 127 | FAIL() << "Expected future to be completed successfully but it was still pending"; |
| 128 | } |
| 129 | } |
| 130 | |
| 131 | // Assert the future is failed *now* |
| 132 | template <typename T> |