diff --git a/test/engine/CartesianProductJoinTest.cpp b/test/engine/CartesianProductJoinTest.cpp index 90488dca5..b6d09f13d 100644 --- a/test/engine/CartesianProductJoinTest.cpp +++ b/test/engine/CartesianProductJoinTest.cpp @@ -220,17 +220,19 @@ TEST(CartesianProductJoin, variableColumnMap) { ::testing::UnorderedElementsAreArray(expectedVariables)); } -// First parameter indicates "seed" for splitting the last input table. +// First parameter indicates if the last input table should be split into +// pseudo-random splits. // Second parameter indicates the offset for the LIMIT clause. // Third parameter indicates the limit for the LIMIT clause. class CartesianProductJoinLazyTest : public testing::TestWithParam< - std::tuple>> { + std::tuple>> { // Randomly split `idTable` into equivalent subsets of itself at pseudo-random // positions. static std::vector splitIntoRandomSubtables(const IdTable& idTable) { + AD_CORRECTNESS_CHECK(std::get<0>(GetParam())); // Ensure results are reproducible. - std::mt19937_64 generator{std::get<0>(GetParam())}; + std::mt19937_64 generator{(getLimit() << 32) + getOffset()}; // The average size of splits. size_t averageSplitSize = std::uniform_int_distribution{0, idTable.size()}(generator); @@ -603,22 +605,21 @@ TEST(CartesianProductJoinLazy, lazyTableTurnsOutEmptyWithEmptyGenerator) { // _____________________________________________________________________________ -using ::testing::Range; +using ::testing::Bool; using ::testing::Values; INSTANTIATE_TEST_SUITE_P( CartesianProdctJoinTestSuite, CartesianProductJoinLazyTest, ::testing::Combine( - Range(0, 5), - Values(0, 1, 25, CHUNK_SIZE, CHUNK_SIZE + 1, CHUNK_SIZE * 2), + Bool(), Values(0, 1, 25, CHUNK_SIZE, CHUNK_SIZE + 1, CHUNK_SIZE * 2), Values(O{0}, O{1}, O{25}, O{CHUNK_SIZE}, O{CHUNK_SIZE * 2}, O{CHUNK_SIZE * 10}, std::nullopt)), [](const testing::TestParamInfo< - std::tuple>>& info) { + std::tuple>>& info) { std::ostringstream stream; - if (std::get<0>(info.param) == 0) { - stream << "FullyMaterialized"; + if (std::get<0>(info.param)) { + stream << "WithSplitTables"; } else { - stream << "WithSplitSeed_" << std::get<0>(info.param); + stream << "FullyMaterialized"; } stream << "_Offset_" << std::get<1>(info.param); stream << "_Limit_";