]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
crimson/os/seastore/journal: proper close journal when test finishes
authorYingxin Cheng <yingxin.cheng@intel.com>
Tue, 26 Oct 2021 06:19:33 +0000 (14:19 +0800)
committerYingxin Cheng <yingxin.cheng@intel.com>
Wed, 27 Oct 2021 07:44:56 +0000 (15:44 +0800)
Signed-off-by: Yingxin Cheng <yingxin.cheng@intel.com>
src/test/crimson/seastore/test_seastore_journal.cc

index 53679f174a1fa4f9738611777c2a03ad00293d55..f264bf429c0a8403110a7ebe404d266c98700e50 100644 (file)
@@ -114,6 +114,15 @@ struct journal_test_t : seastar_test_suite_t, SegmentProvider {
       }));
   }
 
+  seastar::future<> tear_down_fut() final {
+    return journal->close(
+    ).handle_error(
+      crimson::ct_error::all_same_way([](auto e) {
+        ASSERT_FALSE("Unable to close");
+      })
+    );
+  }
+
   template <typename T>
   auto replay(T &&f) {
     return journal->close(
@@ -209,10 +218,6 @@ struct journal_test_t : seastar_test_suite_t, SegmentProvider {
     return addr;
   }
 
-  seastar::future<> tear_down_fut() final {
-    return seastar::now();
-  }
-
   extent_t generate_extent(size_t blocks) {
     std::uniform_int_distribution<char> distribution(
       std::numeric_limits<char>::min(),