]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
test/crimson: verify the futurization in an errorated future. 41457/head
authorRadoslaw Zarzynski <rzarzyns@redhat.com>
Thu, 20 May 2021 19:18:21 +0000 (19:18 +0000)
committerRadoslaw Zarzynski <rzarzyns@redhat.com>
Thu, 20 May 2021 19:28:14 +0000 (19:28 +0000)
commitf18a9e4faea43231f0bcfca5bc3b3244101261fd
tree1638ebc8884e9bb93bc703bbee3a3b8de08fdef5
parentfb7175c81832959cf4332438d5158051047ec793
test/crimson: verify the futurization in an errorated future.

`seastar::future` allows a lambda passed to e.g. `then()` to
return not only a future but also any non-future type like
a plain integer:

  ```cpp
  seastar::now().then([] {
    return 42;
  }).then([] (int futurized_life) {
    // ...
  });
  ```

In such case, the plain type is being wrapped in a future.
This process is called _futurization_ and is performed by
`seastar::futurize` called from the internals of `future`.

In this commit we want to ensure analogous facility is offered
by errorated futures.

Signed-off-by: Radoslaw Zarzynski <rzarzyns@redhat.com>
src/test/crimson/test_errorator.cc