Skip to content
This repository has been archived by the owner on Sep 27, 2019. It is now read-only.

Commit

Permalink
Increase sleep time for occasionally failing ReadOnlyTest. (#1443)
Browse files Browse the repository at this point in the history
(cherry picked from commit cd681eb)
  • Loading branch information
mbutrovich committed Jul 6, 2018
1 parent e036717 commit 33e3a3c
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions test/concurrency/serializable_transaction_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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});
Expand All @@ -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());

Expand Down

0 comments on commit 33e3a3c

Please sign in to comment.