westonpace commented on a change in pull request #8680:
URL: https://github.com/apache/arrow/pull/8680#discussion_r545367277



##########
File path: cpp/src/arrow/util/future_test.cc
##########
@@ -122,15 +125,19 @@ void AssertFinished(const Future<T>& fut) {
 // Assert the future is successful *now*
 template <typename T>
 void AssertSuccessful(const Future<T>& fut) {
-  ASSERT_EQ(fut.state(), FutureState::SUCCESS);
-  ASSERT_OK(fut.status());
+  if (IsFutureFinished(fut.state())) {

Review comment:
       Good catch.  There should be an else block calling FAIL.  I'll add that. 
 The intent of this "if" wrapper is to prevent a pending future from 
deadlocking the test (which makes it difficult to debug).  It absolutely should 
fail if the future is pending.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to