From: Casey Bodley Date: Fri, 6 Dec 2019 14:16:42 +0000 (-0500) Subject: test/rgw: ceph_test_rgw_throttle uses spawn library X-Git-Tag: v15.1.0~249^2~3 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=b3afbbc9803834fd67b6ca96550248ee0ba966e7;p=ceph.git test/rgw: ceph_test_rgw_throttle uses spawn library Signed-off-by: Casey Bodley --- 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;