From ccaaad1d12cd9896ec329740864bdff1213e0537 Mon Sep 17 00:00:00 2001 From: Kefu Chai Date: Fri, 11 Dec 2020 17:13:10 +0800 Subject: [PATCH] test/crimson: move member variable into test so the test is more self-contained. Signed-off-by: Kefu Chai --- src/test/crimson/test_errorator.cc | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/test/crimson/test_errorator.cc b/src/test/crimson/test_errorator.cc index e15352616fbe5..b6285c67f8568 100644 --- a/src/test/crimson/test_errorator.cc +++ b/src/test/crimson/test_errorator.cc @@ -9,7 +9,7 @@ struct errorator_test_t : public seastar_test_suite_t { using ertr = crimson::errorator; 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(false); @@ -18,8 +18,6 @@ struct errorator_test_t : public seastar_test_suite_t { } }); } - - int i = 0; }; TEST_F(errorator_test_t, basic) -- 2.39.5