]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
test/crimson: move member variable into test
authorKefu Chai <kchai@redhat.com>
Fri, 11 Dec 2020 09:13:10 +0000 (17:13 +0800)
committerKefu Chai <kchai@redhat.com>
Sun, 13 Dec 2020 03:32:48 +0000 (11:32 +0800)
so the test is more self-contained.

Signed-off-by: Kefu Chai <kchai@redhat.com>
src/test/crimson/test_errorator.cc

index e15352616fbe55ca10b5bb344e819439d70bccda..b6285c67f8568098e21723a2ffd37d7f6c723f97 100644 (file)
@@ -9,7 +9,7 @@
 struct errorator_test_t : public seastar_test_suite_t {
   using ertr = crimson::errorator<crimson::ct_error::invarg>;
   ertr::future<> test_do_until() {
-    return crimson::do_until([this] {
+    return crimson::do_until([i=0]() mutable {
       if (i < 5) {
         ++i;
         return ertr::make_ready_future<bool>(false);
@@ -18,8 +18,6 @@ struct errorator_test_t : public seastar_test_suite_t {
       }
     });
   }
-
-  int i = 0;
 };
 
 TEST_F(errorator_test_t, basic)