Skip to content

Commit

Permalink
Reduce runtime of db_with_timestamp_basic_test (#6546)
Browse files Browse the repository at this point in the history
Summary:
Reduce runtime by reducing test scale to avoid test time-outs.
Pull Request resolved: #6546

Test Plan:
time ./db_with_timestamp_basic_test
and watch internal tests.

Reviewed By: zhichao-cao

Differential Revision: D20479292

Pulled By: riversand963

fbshipit-source-id: c9e4a155be7699dd4de60fa531de86d442a3ba0a
  • Loading branch information
riversand963 authored and facebook-github-bot committed Mar 17, 2020
1 parent 098dce2 commit 66ed580
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions db/db_with_timestamp_basic_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -169,8 +169,8 @@ class DBBasicTestWithTimestamp : public DBBasicTestWithTimestampBase {
};

TEST_F(DBBasicTestWithTimestamp, SimpleForwardIterate) {
const int kNumKeysPerFile = 2048;
const uint64_t kMaxKey = 16384;
const int kNumKeysPerFile = 128;
const uint64_t kMaxKey = 1024;
Options options = CurrentOptions();
options.env = env_;
// TODO(yanqin) re-enable auto compaction
Expand Down Expand Up @@ -236,9 +236,9 @@ TEST_F(DBBasicTestWithTimestamp, SimpleForwardIterate) {
}

TEST_F(DBBasicTestWithTimestamp, ForwardIterateStartSeqnum) {
const int kNumKeysPerFile = 2048;
const int kNumKeysPerFile = 128;
const uint64_t kMaxKey = 0xffffffffffffffff;
const uint64_t kMinKey = kMaxKey - 16383;
const uint64_t kMinKey = kMaxKey - 1023;
Options options = CurrentOptions();
options.env = env_;
options.create_if_missing = true;
Expand Down Expand Up @@ -428,8 +428,8 @@ class DBBasicTestWithTimestampCompressionSettings
};

TEST_P(DBBasicTestWithTimestampCompressionSettings, PutAndGet) {
const int kNumKeysPerFile = 8192;
const size_t kNumTimestamps = 6;
const int kNumKeysPerFile = 1024;
const size_t kNumTimestamps = 4;
Options options = CurrentOptions();
options.create_if_missing = true;
options.env = env_;
Expand Down Expand Up @@ -534,7 +534,7 @@ class FlushedFileCollector : public EventListener {
};

TEST_P(DBBasicTestWithTimestampCompressionSettings, PutAndGetWithCompaction) {
const int kNumKeysPerFile = 8192;
const int kNumKeysPerFile = 1024;
const size_t kNumTimestamps = 2;
const size_t kNumKeysPerTimestamp = (kNumKeysPerFile - 1) / kNumTimestamps;
const size_t kSplitPosBase = kNumKeysPerTimestamp / 2;
Expand Down Expand Up @@ -674,7 +674,7 @@ class DBBasicTestWithTimestampPrefixSeek
};

TEST_P(DBBasicTestWithTimestampPrefixSeek, ForwardIterateWithPrefix) {
const size_t kNumKeysPerFile = 4096;
const size_t kNumKeysPerFile = 128;
Options options = CurrentOptions();
options.env = env_;
options.create_if_missing = true;
Expand All @@ -691,7 +691,7 @@ TEST_P(DBBasicTestWithTimestampPrefixSeek, ForwardIterateWithPrefix) {
DestroyAndReopen(options);

const uint64_t kMaxKey = 0xffffffffffffffff;
const uint64_t kMinKey = 0xffffffffffff8000;
const uint64_t kMinKey = 0xfffffffffffff000;
const std::vector<std::string> write_ts_list = {Timestamp(3, 0xffffffff),
Timestamp(6, 0xffffffff)};
WriteOptions write_opts;
Expand Down

0 comments on commit 66ed580

Please sign in to comment.