Skip to content

Commit

Permalink
add WaitForIdle to avoid bad thread shutdown
Browse files Browse the repository at this point in the history
  • Loading branch information
zeroshade committed Nov 6, 2024
1 parent f9c5aeb commit 85178f7
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions cpp/src/arrow/c/bridge_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -5378,6 +5378,8 @@ TEST_F(TestAsyncDeviceArrayStreamRoundTrip, Simple) {
ASSERT_EQ(results.size(), 2);
AssertBatchesEqual(*results[0].batch, *batches[0]);
AssertBatchesEqual(*results[1].batch, *batches[1]);

internal::GetCpuThreadPool()->WaitForIdle();
}

TEST_F(TestAsyncDeviceArrayStreamRoundTrip, NullSchema) {
Expand Down Expand Up @@ -5415,6 +5417,8 @@ TEST_F(TestAsyncDeviceArrayStreamRoundTrip, PropagateError) {
auto collect_fut = CollectAsyncGenerator(generator.generator);
ASSERT_FINISHES_AND_RAISES(UnknownError, collect_fut);
ASSERT_FINISHES_AND_RAISES(UnknownError, fut);

internal::GetCpuThreadPool()->WaitForIdle();
}

} // namespace arrow

0 comments on commit 85178f7

Please sign in to comment.