Skip to content

Commit

Permalink
Deflake TransactionStressTest.ExpiredTransactionDataRace1 (facebook#8258
Browse files Browse the repository at this point in the history
)

Summary:
We saw the `Commit()` fail with "Operation expired" so apparently the
expiration time is too short. Increased the magnitude of the times in
this test to make flakiness less likely.

Pull Request resolved: facebook#8258

Reviewed By: jay-zhuang

Differential Revision: D28177033

Pulled By: ajkr

fbshipit-source-id: 0357acee6cc14c104b6ccd39231a683a606ab130
  • Loading branch information
ajkr authored and facebook-github-bot committed May 12, 2021
1 parent a79b46c commit d76c46e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions utilities/transactions/transaction_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -5321,7 +5321,7 @@ TEST_P(TransactionStressTest, ExpiredTransactionDataRace1) {

// Force txn1 to expire
/* sleep override */
std::this_thread::sleep_for(std::chrono::milliseconds(150));
std::this_thread::sleep_for(std::chrono::milliseconds(1500));

Transaction* txn2 = db->BeginTransaction(write_options, txn_options);
Status s;
Expand All @@ -5337,7 +5337,7 @@ TEST_P(TransactionStressTest, ExpiredTransactionDataRace1) {
WriteOptions write_options;
TransactionOptions txn_options;

txn_options.expiration = 100;
txn_options.expiration = 1000; // 1 second
Transaction* txn1 = db->BeginTransaction(write_options, txn_options);

Status s;
Expand Down

0 comments on commit d76c46e

Please sign in to comment.