Skip to content

Commit

Permalink
Use separate db dir for different tests hoping to remove flakiness (f…
Browse files Browse the repository at this point in the history
…acebook#8147)

Summary:
DBWALTestWithParam relies on `SstFileManager` to have the expected behavior. However, if this test shares
db directories with other DBSSTTest, then the SstFileManager may see non-empty data, thus will change its
behavior to be different from expectation, introducing flakiness.

Pull Request resolved: facebook#8147

Test Plan: make check

Reviewed By: jay-zhuang

Differential Revision: D27553362

Pulled By: riversand963

fbshipit-source-id: a2d86343e8e2220bc553b6695ce87dd21a97ddec
  • Loading branch information
riversand963 authored and facebook-github-bot committed Apr 3, 2021
1 parent 0fccc62 commit dd3fbbb
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions db/db_sst_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -751,10 +751,11 @@ TEST_F(DBSSTTest, RateLimitedWALDelete) {
}

class DBWALTestWithParam
: public DBSSTTest,
: public DBTestBase,
public testing::WithParamInterface<std::tuple<std::string, bool>> {
public:
DBWALTestWithParam() {
explicit DBWALTestWithParam()
: DBTestBase("/db_wal_test_with_params", /*env_do_fsync=*/true) {
wal_dir_ = std::get<0>(GetParam());
wal_dir_same_as_dbname_ = std::get<1>(GetParam());
}
Expand Down

0 comments on commit dd3fbbb

Please sign in to comment.