Function run_client

Source
pub fn run_client<GetClient, GetClientRes>(
    exec: TestExecutor,
    get_client: GetClient,
)
where GetClient: FnOnce() -> GetClientRes, GetClientRes: Future<Output = ()>,
Expand description

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.

For example, this way the client can control when the first open() call will happen on the server and/or perform additional open() calls on the server. With run_server_client() the first call to open() is already finished by the time client code starts running.

This is the second most common case for the test execution, and, similarly to run_server_client it is actually just forwarding to test_client() followed by a AsyncClientTestParams::run() call.