]> git.proxmox.com Git - ceph.git/blobdiff - ceph/src/test/crimson/test_alienstore_thread_pool.cc
import quincy beta 17.1.0
[ceph.git] / ceph / src / test / crimson / test_alienstore_thread_pool.cc
index 82b98abbb60c879cba22916efc21527d34370eab..7cfffec757b7421eac01709a8b8dbd1882c06baf 100644 (file)
@@ -15,7 +15,7 @@ seastar::future<> test_accumulate(ThreadPool& tp) {
   static constexpr auto N = 5;
   static constexpr auto M = 1;
   auto slow_plus = [&tp](int i) {
-    return tp.submit([=] {
+    return tp.submit(::rand() % 2, [=] {
       std::this_thread::sleep_for(10ns);
       return i + M;
     });
@@ -30,7 +30,7 @@ seastar::future<> test_accumulate(ThreadPool& tp) {
 }
 
 seastar::future<> test_void_return(ThreadPool& tp) {
-  return tp.submit([=] {
+  return tp.submit(::rand() % 2, [=] {
     std::this_thread::sleep_for(10ns);
   });
 }
@@ -50,7 +50,7 @@ int main(int argc, char** argv)
     .then([conf_file_list] {
       return local_conf().parse_config_files(conf_file_list);
     }).then([] {
-      return seastar::do_with(std::make_unique<crimson::os::ThreadPool>(2, 128, 0),
+      return seastar::do_with(std::make_unique<crimson::os::ThreadPool>(2, 128, (std::vector<uint64_t>){0}),
                               [](auto& tp) {
         return tp->start().then([&tp] {
           return test_accumulate(*tp);