From b3afbbc9803834fd67b6ca96550248ee0ba966e7 Mon Sep 17 00:00:00 2001 From: Casey Bodley Date: Fri, 6 Dec 2019 09:16:42 -0500 Subject: [PATCH] test/rgw: ceph_test_rgw_throttle uses spawn library Signed-off-by: Casey Bodley --- src/test/rgw/test_rgw_throttle.cc | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/test/rgw/test_rgw_throttle.cc b/src/test/rgw/test_rgw_throttle.cc index be4d456f455..fff680012f4 100644 --- a/src/test/rgw/test_rgw_throttle.cc +++ b/src/test/rgw/test_rgw_throttle.cc @@ -19,7 +19,7 @@ #include "include/scope_guard.h" #ifdef HAVE_BOOST_CONTEXT -#include +#include #endif #include @@ -38,6 +38,7 @@ struct RadosEnv : public ::testing::Environment { ASSERT_EQ(0, r); } void TearDown() override { + rados->shutdown(); rados.reset(); } }; @@ -171,8 +172,8 @@ TEST_F(Aio_Throttle, YieldCostOverWindow) auto obj = make_obj(__PRETTY_FUNCTION__); boost::asio::io_context context; - boost::asio::spawn(context, - [&] (boost::asio::yield_context yield) { + spawn::spawn(context, + [&] (spawn::yield_context yield) { YieldingAioThrottle throttle(4, context, yield); scoped_completion op; auto c = throttle.get(obj, wait_on(op), 8, 0); @@ -193,8 +194,8 @@ TEST_F(Aio_Throttle, YieldingThrottleOverMax) uint64_t outstanding = 0; boost::asio::io_context context; - boost::asio::spawn(context, - [&] (boost::asio::yield_context yield) { + spawn::spawn(context, + [&] (spawn::yield_context yield) { YieldingAioThrottle throttle(window, context, yield); for (uint64_t i = 0; i < total; i++) { using namespace std::chrono_literals; -- 2.39.5