Skip to content

Commit

Permalink
Minor improvements in env_test (facebook#8317)
Browse files Browse the repository at this point in the history
Summary:
Fix typo in comments in env_test and add PermitUncheckedError() to two statuses.

Pull Request resolved: facebook#8317

Reviewed By: jay-zhuang

Differential Revision: D28525093

fbshipit-source-id: 7a1ed3e45b6f500b8d2ae19fa339c9368111e922
  • Loading branch information
siying authored and facebook-github-bot committed May 19, 2021
1 parent 9d61a08 commit ce0fc71
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions env/env_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1273,7 +1273,7 @@ TEST_P(EnvPosixTestWithParam, MultiRead) {
}

TEST_F(EnvPosixTest, MultiReadNonAlignedLargeNum) {
// In this test we don't do aligned read, wo it doesn't work for
// In this test we don't do aligned read, so it doesn't work for
// direct I/O case.
EnvOptions soptions;
soptions.use_direct_reads = soptions.use_direct_writes = false;
Expand Down Expand Up @@ -1401,8 +1401,7 @@ void GenerateFilesAndRequest(Env* env, const std::string& fname,
}

TEST_F(EnvPosixTest, MultiReadIOUringError) {
// In this test we don't do aligned read, wo it doesn't work for
// direct I/O case.
// In this test we don't do aligned read, so we can't do direct I/O.
EnvOptions soptions;
soptions.use_direct_reads = soptions.use_direct_writes = false;
std::string fname = test::PerThreadDBPath(env_, "testfile");
Expand All @@ -1429,14 +1428,15 @@ TEST_F(EnvPosixTest, MultiReadIOUringError) {
Status s = file->MultiRead(reqs.data(), reqs.size());
if (io_uring_wait_cqe_called) {
ASSERT_NOK(s);
} else {
s.PermitUncheckedError();
}

ROCKSDB_NAMESPACE::SyncPoint::GetInstance()->DisableProcessing();
}

TEST_F(EnvPosixTest, MultiReadIOUringError2) {
// In this test we don't do aligned read, wo it doesn't work for
// direct I/O case.
// In this test we don't do aligned read, so we can't do direct I/O.
EnvOptions soptions;
soptions.use_direct_reads = soptions.use_direct_writes = false;
std::string fname = test::PerThreadDBPath(env_, "testfile");
Expand Down Expand Up @@ -1469,6 +1469,8 @@ TEST_F(EnvPosixTest, MultiReadIOUringError2) {
Status s = file->MultiRead(reqs.data(), reqs.size());
if (io_uring_submit_and_wait_called) {
ASSERT_NOK(s);
} else {
s.PermitUncheckedError();
}

ROCKSDB_NAMESPACE::SyncPoint::GetInstance()->DisableProcessing();
Expand Down

0 comments on commit ce0fc71

Please sign in to comment.