]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
test/crimson: use invoke instead of apply
authorKefu Chai <kchai@redhat.com>
Sun, 24 May 2020 04:18:12 +0000 (12:18 +0800)
committerKefu Chai <kchai@redhat.com>
Sun, 24 May 2020 04:26:37 +0000 (12:26 +0800)
it's an oversight in 33af821baafbb2e9c4ebea2e377db665e210701f

Signed-off-by: Kefu Chai <kchai@redhat.com>
src/test/crimson/test_socket.cc

index 2c7faccb341736b8e8df3e6daab349be55822c66..1a99d9f490116e0ae4e388f7442c238c207dc52f 100644 (file)
@@ -217,7 +217,7 @@ class Connection {
     logger.debug("dispatch_write(round={}, force_shut={})...", round, force_shut);
     return seastar::repeat([this, round, force_shut] {
       if (round != 0 && round <= write_count) {
-        return seastar::futurize_apply([this, force_shut] {
+        return seastar::futurize_invoke([this, force_shut] {
           if (force_shut) {
             logger.debug("dispatch_write() done, force shutdown output");
             socket->force_shutdown_out();
@@ -263,7 +263,7 @@ class Connection {
     logger.debug("dispatch_read(round={}, force_shut={})...", round, force_shut);
     return seastar::repeat([this, round, force_shut] {
       if (round != 0 && round <= read_count) {
-        return seastar::futurize_apply([this, force_shut] {
+        return seastar::futurize_invoke([this, force_shut] {
           if (force_shut) {
             logger.debug("dispatch_read() done, force shutdown input");
             socket->force_shutdown_in();
@@ -274,7 +274,7 @@ class Connection {
           return seastar::make_ready_future<stop_t>(stop_t::yes);
         });
       } else {
-        return seastar::futurize_apply([this] {
+        return seastar::futurize_invoke([this] {
           // we want to test both Socket::read() and Socket::read_exactly()
           if (read_count % 2) {
             return socket->read(DATA_SIZE * sizeof(uint64_t)
@@ -342,7 +342,7 @@ class Connection {
       return seastar::when_all_succeed(
         conn.dispatch_write_unbounded(),
         conn.dispatch_read_unbounded(),
-        seastar::futurize_apply([&conn, preemptive_shut] {
+        seastar::futurize_invoke([&conn, preemptive_shut] {
           if (preemptive_shut) {
             return seastar::sleep(100ms).then([&conn] {
               logger.debug("dispatch_rw_unbounded() shutdown socket preemptively(100ms)");
@@ -425,7 +425,7 @@ int main(int argc, char** argv)
 {
   seastar::app_template app;
   return app.run(argc, argv, [] {
-    return seastar::futurize_apply([] {
+    return seastar::futurize_invoke([] {
       return test_refused();
     }).then([] {
       return test_bind_same();