Skip to content

Commit

Permalink
Make TestScanner.ScanOrderingFail and AssertOrderNode.SingleColumn[A|…
Browse files Browse the repository at this point in the history
…De]sc assertions robust
  • Loading branch information
EnricoMi committed Nov 20, 2024
1 parent 937695d commit 7750094
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions cpp/src/arrow/acero/assert_order_node_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,8 @@ void CheckAssert(const std::shared_ptr<ChunkedArray>& array,
auto result = DeclarationToTable(plan, query_options);
ASSERT_NOT_OK(result);
const auto& actual_status = result.status();
ASSERT_EQ(actual_status.code(), expected_status.code());
ASSERT_EQ(actual_status.message(), expected_status.message());
EXPECT_EQ(actual_status.code(), expected_status.code());
EXPECT_THAT(actual_status.message(), testing::StartsWith(expected_status.message()));
}
}
}
Expand Down
4 changes: 2 additions & 2 deletions cpp/src/arrow/dataset/scanner_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1036,8 +1036,8 @@ class TestScanner : public DatasetFixtureMixinWithParam<TestScannerParams> {
next = it.Next();
}
// expect iteration to stop on failure status
ASSERT_NOT_OK(next);
ASSERT_EQ(next.status().message(), "Data is not ordered");
EXPECT_EQ(next.status().code(), StatusCode::ExecutionError);
EXPECT_THAT(next.status().message(), testing::StartsWith("Data is not ordered"));
}
}
};
Expand Down

0 comments on commit 7750094

Please sign in to comment.