kudu-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a...@apache.org
Subject kudu git commit: block_manager-test: don't inject EIO in destructor
Date Tue, 27 Jun 2017 02:25:32 GMT
Repository: kudu
Updated Branches:
  refs/heads/master 78ef92ec8 -> baa8d1716


block_manager-test: don't inject EIO in destructor

BlockManagerTest uses FLAGS_env_inject_eio to inject errors in
TestMetadataOkayDespiteFailedWrites. This may inject errors when
cleaning up files after the test has finished.

This patch fixes this by resetting the flag at the end of the test.

Change-Id: Idad1fb2157a766f017c2308691d55a32c8664156
Reviewed-on: http://gerrit.cloudera.org:8080/7271
Reviewed-by: Adar Dembo <adar@cloudera.com>
Tested-by: Kudu Jenkins


Project: http://git-wip-us.apache.org/repos/asf/kudu/repo
Commit: http://git-wip-us.apache.org/repos/asf/kudu/commit/baa8d171
Tree: http://git-wip-us.apache.org/repos/asf/kudu/tree/baa8d171
Diff: http://git-wip-us.apache.org/repos/asf/kudu/diff/baa8d171

Branch: refs/heads/master
Commit: baa8d17167340d6ac0302e44ceef40262f820e47
Parents: 78ef92e
Author: Andrew Wong <awong@cloudera.com>
Authored: Thu Jun 22 17:09:48 2017 -0700
Committer: Adar Dembo <adar@cloudera.com>
Committed: Tue Jun 27 02:25:04 2017 +0000

----------------------------------------------------------------------
 src/kudu/fs/block_manager-test.cc | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/kudu/blob/baa8d171/src/kudu/fs/block_manager-test.cc
----------------------------------------------------------------------
diff --git a/src/kudu/fs/block_manager-test.cc b/src/kudu/fs/block_manager-test.cc
index a3331f7..ac21b08 100644
--- a/src/kudu/fs/block_manager-test.cc
+++ b/src/kudu/fs/block_manager-test.cc
@@ -932,7 +932,7 @@ TYPED_TEST(BlockManagerTest, TestMetadataOkayDespiteFailedWrites) {
       // Since this test is for failed writes, don't inject faults during reads
       // or while reopening the block manager.
       google::FlagSaver saver;
-      FLAGS_env_inject_eio = false;
+      FLAGS_env_inject_eio = 0;
       for (const auto& id : ids) {
         ASSERT_OK(read_a_block(id));
       }
@@ -942,6 +942,7 @@ TYPED_TEST(BlockManagerTest, TestMetadataOkayDespiteFailedWrites) {
                                          false /* create */));
     }
   }
+  FLAGS_env_inject_eio = 0;
 }
 
 TYPED_TEST(BlockManagerTest, TestGetAllBlockIds) {


Mime
View raw message