Speedup ManualCompactionTest.Test
Summary: ManualCompactionTest.Test occasionally times out in tsan flavor of our test infra. The patch reduces the number of keys to make the test run faster. The change does not seem to negatively impact the coverage of the test. Closes https://github.com/facebook/rocksdb/pull/3802 Differential Revision: D7865596 Pulled By: maysamyabandeh fbshipit-source-id: b4f60e32c3ae1677e25506f71c766e33fa985785
This commit is contained in:
parent
d59549298f
commit
a8d77ca381
@ -19,7 +19,12 @@ using namespace rocksdb;
|
|||||||
|
|
||||||
namespace {
|
namespace {
|
||||||
|
|
||||||
const int kNumKeys = 1100000;
|
// Reasoning: previously the number was 1100000. Since the keys are written to
|
||||||
|
// the batch in one write each write will result into one SST file. each write
|
||||||
|
// will result into one SST file. We reduced the write_buffer_size to 1K to
|
||||||
|
// basically have the same effect with however less number of keys, which
|
||||||
|
// results into less test runtime.
|
||||||
|
const int kNumKeys = 1100;
|
||||||
|
|
||||||
std::string Key1(int i) {
|
std::string Key1(int i) {
|
||||||
char buf[100];
|
char buf[100];
|
||||||
@ -99,6 +104,7 @@ TEST_F(ManualCompactionTest, Test) {
|
|||||||
// specific scenario.
|
// specific scenario.
|
||||||
rocksdb::DB* db;
|
rocksdb::DB* db;
|
||||||
rocksdb::Options db_options;
|
rocksdb::Options db_options;
|
||||||
|
db_options.write_buffer_size = 1024;
|
||||||
db_options.create_if_missing = true;
|
db_options.create_if_missing = true;
|
||||||
db_options.compression = rocksdb::kNoCompression;
|
db_options.compression = rocksdb::kNoCompression;
|
||||||
ASSERT_OK(rocksdb::DB::Open(db_options, dbname_, &db));
|
ASSERT_OK(rocksdb::DB::Open(db_options, dbname_, &db));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user