Skip to content

Commit

Permalink
stronger test condition for resume
Browse files Browse the repository at this point in the history
  • Loading branch information
rtpsw committed Jun 16, 2023
1 parent 2a1bac1 commit c0a7496
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions cpp/src/arrow/acero/asof_join_node_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1518,11 +1518,15 @@ void TestBackpressure(BatchesMaker maker, int num_batches, int batch_size) {
gate.ReleaseAllBatches();
ASSERT_FINISHES_OK_AND_ASSIGN(BatchesWithCommonSchema batches, batches_fut);

size_t total_resumed = 0;
for (const auto& counters : bp_counters) {
total_resumed += counters.resume_count;
}
ASSERT_GE(total_resumed, 2);
// One of the inputs is gated. The other two will eventually be resumed by the asof
// join node
for (size_t i = 0; i < source_configs.size(); i++) {
const auto& counters = bp_counters[i];
if (source_configs[i].is_gated) {
ASSERT_GE(counters.resume_count, 0) return false;
}
}
}

TEST(AsofJoinTest, BackpressureWithBatches) {
Expand Down

0 comments on commit c0a7496

Please sign in to comment.