]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
test/rgw: ceph_test_rgw_throttle uses spawn library
authorCasey Bodley <cbodley@redhat.com>
Fri, 6 Dec 2019 14:16:42 +0000 (09:16 -0500)
committerCasey Bodley <cbodley@redhat.com>
Wed, 8 Jan 2020 16:31:04 +0000 (11:31 -0500)
Signed-off-by: Casey Bodley <cbodley@redhat.com>
src/test/rgw/test_rgw_throttle.cc

index be4d456f4553bdba88e15aea8ce47e84fdccfdf6..fff680012f4df02282a99037cd5760d6e6257b58 100644 (file)
@@ -19,7 +19,7 @@
 #include "include/scope_guard.h"
 
 #ifdef HAVE_BOOST_CONTEXT
-#include <boost/asio/spawn.hpp>
+#include <spawn/spawn.hpp>
 #endif
 #include <gtest/gtest.h>
 
@@ -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;