From 33e3a3c30235dbdf9075def64612deee1e60f9e7 Mon Sep 17 00:00:00 2001 From: Matt Butrovich Date: Wed, 4 Jul 2018 10:48:54 -0400 Subject: [PATCH] Increase sleep time for occasionally failing ReadOnlyTest. (#1443) (cherry picked from commit cd681eb) --- test/concurrency/serializable_transaction_test.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/test/concurrency/serializable_transaction_test.cpp b/test/concurrency/serializable_transaction_test.cpp index 2c352c0db7d..4548d47faaa 100644 --- a/test/concurrency/serializable_transaction_test.cpp +++ b/test/concurrency/serializable_transaction_test.cpp @@ -76,8 +76,8 @@ TEST_F(SerializableTransactionTests, ReadOnlyTransactionTest) { //manually update snapshot epoch number, so later snapshot read must get a larger epoch than table creating txn //or it may read nothing - //wait one epoch. so that global epoch is guaranteed to increase - std::this_thread::sleep_for(std::chrono::milliseconds(EPOCH_LENGTH)); + //wait two epochs. so that global epoch is guaranteed to increase + std::this_thread::sleep_for(std::chrono::milliseconds(2 * EPOCH_LENGTH)); concurrency::EpochManagerFactory::GetInstance().GetExpiredEpochId(); TransactionScheduler scheduler(1, table, &txn_manager, {0}); @@ -86,6 +86,8 @@ TEST_F(SerializableTransactionTests, ReadOnlyTransactionTest) { scheduler.Run(); + EXPECT_EQ(ResultType::SUCCESS, scheduler.schedules[0].txn_result); + //it should read all the 10 tuples EXPECT_EQ(10, scheduler.schedules[0].results.size());