vfs::test_utils

Module run

Source
Expand description

Utilities to run asynchronous tests that use pseudo-fs objects.

Structs§

  • A helper that holds all the parameters necessary to run an async client-only test.
  • A helper that holds all the parameters necessary to run an async test with a server and a client.
  • test_server_client and test_client allow for a “coordinator” closure - something responsible for coordinating test execution. In particular in certain tests it is important to make sure all the operations have completed before running the next portion of the test.

Functions§

  • Similar to run_server_client() but does not automatically connect the server and the client. The client is expected to connect to the server on it’s own. Otherwise behaviour is the same as for run_server_client(), except the executor is not implicit, but is specified via the exec argument.
  • A helper to connect a pseudo fs server to a client and the run the client on a single threaded executor. Execution is run until the executor reports the execution has stalled. The client must complete it’s execution at this point. It is a failure if the client is stalled.
  • Collects a basic required set of parameters for a client-only test. Additional parameteres can be specified using exec, and coordinator methods via a builder patter. Actual execution of the test happen when AsyncClientTestParams::run() method is invoked.
  • Collects a basic required set of parameters for a server/client test. Additional parameters can be specified using exec and coordinator methods via a builder patter. Actual execution of the test happen when AsyncServerClientTestParams::run() method is invoked.