From 8fdcdcd8b0457f2fb36d2c5b0256dd9c72b782b7 Mon Sep 17 00:00:00 2001 From: Ryoji Kurosawa Date: Wed, 18 Dec 2024 12:31:01 +0900 Subject: [PATCH] fix test failure due to ramdom order from scans --- test/jogasaki/api/parallel_scan_test.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/test/jogasaki/api/parallel_scan_test.cpp b/test/jogasaki/api/parallel_scan_test.cpp index 011ede07..4214d875 100644 --- a/test/jogasaki/api/parallel_scan_test.cpp +++ b/test/jogasaki/api/parallel_scan_test.cpp @@ -97,6 +97,7 @@ TEST_F(parallel_scan_test, simple) { auto tx = utils::create_transaction(*db_, true, false); std::vector result{}; execute_query("SELECT * FROM t", *tx, result); + std::sort(result.begin(), result.end()); ASSERT_EQ(3, result.size()); EXPECT_EQ((create_nullable_record(100)), result[0]); EXPECT_EQ((create_nullable_record(200)), result[1]); @@ -119,7 +120,10 @@ TEST_F(parallel_scan_test, negative_values) { auto tx = utils::create_transaction(*db_, true, false); std::vector result{}; execute_query("SELECT * FROM t", *tx, result); + std::sort(result.begin(), result.end()); ASSERT_EQ(2, result.size()); + EXPECT_EQ((create_nullable_record(-200)), result[0]); + EXPECT_EQ((create_nullable_record(-100)), result[1]); } TEST_F(parallel_scan_test, various_types) {