Skip to content

Commit

Permalink
ColumnFamilyTest often times out in internal test infra (facebook#7638)
Browse files Browse the repository at this point in the history
Summary:
Tries to fix by skipping fsync.

Pull Request resolved: facebook#7638

Test Plan: watch the tests to pass

Reviewed By: jay-zhuang

Differential Revision: D24764355

Pulled By: cheng-chang

fbshipit-source-id: 9c21b177709025ca1943066d94da89324ed47655
  • Loading branch information
Cheng Chang authored and facebook-github-bot committed Nov 6, 2020
1 parent 8154336 commit 4c2aef0
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions db/column_family_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,10 @@ namespace ROCKSDB_NAMESPACE {
static const int kValueSize = 1000;

// counts how many operations were performed
class EnvCounter : public EnvWrapper {
class EnvCounter : public SpecialEnv {
public:
explicit EnvCounter(Env* base)
: EnvWrapper(base), num_new_writable_file_(0) {}
: SpecialEnv(base), num_new_writable_file_(0) {}
int GetNumberOfNewWritableFileCalls() {
return num_new_writable_file_;
}
Expand Down Expand Up @@ -68,6 +68,7 @@ class ColumnFamilyTestBase : public testing::Test {
#endif // !ROCKSDB_LITE
EXPECT_NE(nullptr, base_env);
env_ = new EnvCounter(base_env);
env_->skip_fsync_ = true;
dbname_ = test::PerThreadDBPath("column_family_test");
db_options_.create_if_missing = true;
db_options_.fail_if_options_file_error = true;
Expand Down

0 comments on commit 4c2aef0

Please sign in to comment.