]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
test/store_text_fixture: do umount before restoring default config.
authorIgor Fedotov <ifedotov@suse.com>
Mon, 28 Dec 2020 20:23:48 +0000 (23:23 +0300)
committerIgor Fedotov <igor.fedotov@croit.io>
Mon, 6 Dec 2021 10:43:45 +0000 (13:43 +0300)
Hence umount can benefit from custom settings as well.

Signed-off-by: Igor Fedotov <ifedotov@suse.com>
src/test/objectstore/store_test_fixture.cc

index 130c2c78bb9a9df922f106ae6ca54d1c55333d53..a3bdc7a36ac3a0bf8e40cc2bb8c7b189636aeb59 100644 (file)
@@ -68,6 +68,11 @@ void StoreTestFixture::SetUp()
 
 void StoreTestFixture::TearDown()
 {
+  if (store) {
+    int r = store->umount();
+    EXPECT_EQ(0, r);
+    rm_r(data_dir);
+  }
   // we keep this stuff 'unsafe' out of test case scope to be able to update ANY
   // config settings. Hence setting it to 'unsafe' here as test case is closing.
   g_conf()._clear_safe_to_start_threads();
@@ -76,11 +81,6 @@ void StoreTestFixture::TearDown()
     ::testing::FLAGS_gtest_death_test_style = orig_death_test_style;
     orig_death_test_style.clear();
   }
-  if (store) {
-    int r = store->umount();
-    EXPECT_EQ(0, r);
-    rm_r(data_dir);
-  }
 }
 
 void StoreTestFixture::SetVal(ConfigProxy& _conf, const char* key, const char* val)