Fix fault_injestion_test

Summary: A bug in MockEnv causes fault_injestion_test to fail. I don't know why it doesn't fail every time but it doesn't seem to be right.

Test Plan:
Run fault_injestion_test
Also run db_test with MEM_ENV=1 until the first failure.

Reviewers: yhchiang, rven, igor

Reviewed By: igor

Subscribers: leveldb, dhruba

Differential Revision: https://reviews.facebook.net/D32877
main
sdong 10 years ago
parent b37f5ffc76
commit fe9f691194
  1. 4
      util/mock_env.cc

@ -630,10 +630,10 @@ Status MockEnv::LockFile(const std::string& fname, FileLock** flock) {
return Status::IOError(fn, "Lock is already held.");
}
} else {
auto* file = new MemFile(fname, true);
auto* file = new MemFile(fn, true);
file->Ref();
file->Lock();
file_map_[fname] = file;
file_map_[fn] = file;
}
}
*flock = new MockEnvFileLock(fn);

Loading…
Cancel
Save