]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
test/rgw: use spawn library for test_rgw_dmclock_scheduler 43758/head
authorCasey Bodley <cbodley@redhat.com>
Tue, 20 Jul 2021 16:50:25 +0000 (12:50 -0400)
committerKefu Chai <kchai@redhat.com>
Mon, 1 Nov 2021 23:39:56 +0000 (07:39 +0800)
Signed-off-by: Casey Bodley <cbodley@redhat.com>
(cherry picked from commit a8e3589a2c875b6fadc853c75f20cb9256f294ca)

Conflicts:
src/test/rgw/CMakeLists.txt
src/test/rgw/test_rgw_dmclock_scheduler.cc: trivial resolution

src/test/rgw/CMakeLists.txt
src/test/rgw/test_rgw_dmclock_scheduler.cc

index c57e56f242ad3e3f81112e17293bd755009bf193..37f4375694037ba63dd09cd7a27c1dfec78294d3 100644 (file)
@@ -157,10 +157,6 @@ add_executable(unittest_rgw_dmclock_scheduler test_rgw_dmclock_scheduler.cc $<TA
 add_ceph_unittest(unittest_rgw_dmclock_scheduler)
 
 target_link_libraries(unittest_rgw_dmclock_scheduler rgw_schedulers global ${UNITTEST_LIBS})
-if(WITH_BOOST_CONTEXT)
-  target_compile_definitions(unittest_rgw_dmclock_scheduler PRIVATE BOOST_COROUTINES_NO_DEPRECATION_WARNING)
-  target_link_libraries(unittest_rgw_dmclock_scheduler Boost::coroutine Boost::context)
-endif()
 
 if(WITH_RADOSGW_AMQP_ENDPOINT)
   add_executable(unittest_rgw_amqp test_rgw_amqp.cc)
index d6eddff322f230aaf7c4007f252d60428d13e3b6..2943df218750e308d138dccef4330b1bc23ce54e 100644 (file)
@@ -18,9 +18,7 @@
 #include "rgw/rgw_dmclock_async_scheduler.h"
 
 #include <optional>
-#ifdef HAVE_BOOST_CONTEXT
-#include <boost/asio/spawn.hpp>
-#endif
+#include <spawn/spawn.hpp>
 #include <gtest/gtest.h>
 #include "acconfig.h"
 #include "global/global_context.h"
@@ -403,7 +401,7 @@ TEST(Queue, SpawnAsyncRequest)
 {
   boost::asio::io_context context;
 
-  boost::asio::spawn(context, [&] (boost::asio::yield_context yield) {
+  spawn::spawn(context, [&] (spawn::yield_context yield) {
     ClientCounters counters(g_ceph_context);
     AsyncScheduler queue(g_ceph_context, context, std::ref(counters), nullptr,
                     [] (client_id client) -> ClientInfo* {