lidavidm commented on a change in pull request #11958:
URL: https://github.com/apache/arrow/pull/11958#discussion_r769623430
##########
File path: cpp/src/arrow/util/async_util_test.cc
##########
@@ -158,6 +158,22 @@ TYPED_TEST(TypedTestAsyncTaskGroup, Error) {
ASSERT_FINISHES_AND_RAISES(Invalid, task_group.End());
}
+TYPED_TEST(TypedTestAsyncTaskGroup, ErrorWhileNotEmpty) {
+ TypeParam task_group;
+ Future<> pending_task = Future<>::Make();
+ Future<> will_fail_task = Future<>::Make();
+ Future<> after_fail_task = Future<>::Make();
+ ASSERT_OK(task_group.AddTask([pending_task] { return pending_task; }));
+ ASSERT_OK(task_group.AddTask([will_fail_task] { return will_fail_task; }));
+ ASSERT_OK(task_group.AddTask([after_fail_task] { return after_fail_task; }));
+ Future<> end = task_group.End();
+ AssertNotFinished(end);
+ pending_task.MarkFinished();
+ will_fail_task.MarkFinished(Status::Invalid("XYZ"));
+ after_fail_task.MarkFinished();
Review comment:
Ah, only for the serialized group - not for the regular group, so this
needs to be here.
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]