Skip to content

Commit

Permalink
[yugabyte#3989] Relax requirement on number of log segments in QLTran…
Browse files Browse the repository at this point in the history
…sactionTest.PreserveLogs

Summary:
We have check that there are were several log segments at end of the QLTransactionTest.PreserveLogs.
It is ok to have this number smaller that half of transactions, we should just check that there are multiple of them.
To make sure that test did his check.

This diff relaxes requirement, to avoid test flakiness.

Test Plan: ybd --gtest_filter QLTransactionTest.PreserveLogs -n 100 -- -p 8

Reviewers: bogdan

Reviewed By: bogdan

Subscribers: ybase

Differential Revision: https://phabricator.dev.yugabyte.com/D8145
  • Loading branch information
spolitov committed Mar 18, 2020
1 parent 420e0f7 commit 35936e3
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/yb/client/ql-transaction-test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -442,6 +442,7 @@ TEST_F(QLTransactionTest, Expire) {
}

TEST_F(QLTransactionTest, PreserveLogs) {
FLAGS_transaction_rpc_timeout_ms = 60000;
SetDisableHeartbeatInTests(true);
DisableTransactionTimeout();
std::vector<std::shared_ptr<YBTransaction>> transactions;
Expand Down Expand Up @@ -480,7 +481,7 @@ TEST_F(QLTransactionTest, PreserveLogs) {
}

// Ensure that we had enough log segments, otherwise this test is pretty useless.
ASSERT_GE(max_active_segment_sequence_number, kTransactions / 2);
ASSERT_GE(max_active_segment_sequence_number, kTransactions / 4);
}

TEST_F(QLTransactionTest, ResendApplying) {
Expand Down

0 comments on commit 35936e3

Please sign in to comment.