From 0ce14671e775f2631e595b5899a177b225052dad Mon Sep 17 00:00:00 2001 From: unw9527 <1041593558@qq.com> Date: Thu, 5 Dec 2024 13:59:24 -0500 Subject: [PATCH] fix(f24 p4): misleading error --- test/txn/txn_index_concurrent_test.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/test/txn/txn_index_concurrent_test.cpp b/test/txn/txn_index_concurrent_test.cpp index 384ad08dc..ee945f857 100644 --- a/test/txn/txn_index_concurrent_test.cpp +++ b/test/txn/txn_index_concurrent_test.cpp @@ -150,7 +150,8 @@ TEST(TxnIndexTest, DISABLED_IndexConcurrentUpdateTest) { // NOLINT if (add_delete_insert) { StringVectorWriter data_writer; BUSTUB_ENSURE(bustub->ExecuteSqlTxn(generate_select_sql(i), data_writer, txn), "cannot retrieve data"); - BUSTUB_ENSURE(data_writer.values_.size() == 1, "more than 1 row fetched??"); + BUSTUB_ENSURE(data_writer.values_.size() > 1, "more than one row fetched??"); + BUSTUB_ENSURE(!data_writer.values_.empty(), "no row fetched??"); const auto b_val = std::stoi(data_writer.values_[0][0]); BUSTUB_ENSURE(bustub->ExecuteSqlTxn(generate_delete_sql(i), data_writer, txn), "cannot delete data"); BUSTUB_ENSURE(bustub->ExecuteSqlTxn(generate_txn_insert_sql(b_val, i), data_writer, txn),