make DBTest.SharedWriteBuffer to pass MockEnv
Summary: DBTest.SharedWriteBuffer uses an Options that doesn't pass CurrentOptions(), so that it doesn't use MockEnv. However, DBTest's constructor uses MockEnv to call DestoryDB() to clean up, causing uncleaned state before it runs. Test Plan: Run the test modified to make sure they pass default Env and SharedWriteBuffer now passes MockEnv. Reviewers: rven, yhchiang, igor Reviewed By: igor Subscribers: leveldb, dhruba Differential Revision: https://reviews.facebook.net/D32475
This commit is contained in:
parent
4bdf38b16e
commit
d07fec3bdc
@ -3995,7 +3995,7 @@ TEST(DBTest, UniversalCompactionCompressRatio2) {
|
||||
}
|
||||
|
||||
TEST(DBTest, FailMoreDbPaths) {
|
||||
Options options;
|
||||
Options options = CurrentOptions();
|
||||
options.db_paths.emplace_back(dbname_, 10000000);
|
||||
options.db_paths.emplace_back(dbname_ + "_2", 1000000);
|
||||
options.db_paths.emplace_back(dbname_ + "_3", 1000000);
|
||||
@ -4099,7 +4099,7 @@ TEST(DBTest, UniversalCompactionSecondPathRatio) {
|
||||
}
|
||||
|
||||
TEST(DBTest, LevelCompactionThirdPath) {
|
||||
Options options;
|
||||
Options options = CurrentOptions();
|
||||
options.db_paths.emplace_back(dbname_, 500 * 1024);
|
||||
options.db_paths.emplace_back(dbname_ + "_2", 4 * 1024 * 1024);
|
||||
options.db_paths.emplace_back(dbname_ + "_3", 1024 * 1024 * 1024);
|
||||
@ -4212,7 +4212,7 @@ TEST(DBTest, LevelCompactionThirdPath) {
|
||||
}
|
||||
|
||||
TEST(DBTest, LevelCompactionPathUse) {
|
||||
Options options;
|
||||
Options options = CurrentOptions();
|
||||
options.db_paths.emplace_back(dbname_, 500 * 1024);
|
||||
options.db_paths.emplace_back(dbname_ + "_2", 4 * 1024 * 1024);
|
||||
options.db_paths.emplace_back(dbname_ + "_3", 1024 * 1024 * 1024);
|
||||
@ -7154,7 +7154,7 @@ TEST(DBTest, RecoverCheckFileAmount) {
|
||||
}
|
||||
|
||||
TEST(DBTest, SharedWriteBuffer) {
|
||||
Options options;
|
||||
Options options = CurrentOptions();
|
||||
options.db_write_buffer_size = 100000; // this is the real limit
|
||||
options.write_buffer_size = 500000; // this is never hit
|
||||
CreateAndReopenWithCF({"pikachu", "dobrynia", "nikitich"}, options);
|
||||
|
Loading…
Reference in New Issue
Block a user