vfs::test_utils::run

Function run_server_client

Source
pub fn run_server_client<Marker, GetClient, GetClientRes>(
    flags: OpenFlags,
    server: Arc<dyn DirectoryEntry>,
    get_client: GetClient,
)
where Marker: ProtocolMarker, GetClient: FnOnce(Marker::Proxy) -> GetClientRes, GetClientRes: Future<Output = ()>,
Expand description

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.

This is the most common case for the test execution, and is actualy just forwarding to test_server_client() followed immediately by a AsyncClientTestParams::run() call.