bounded
Module: bounded
Section titled “Module: bounded”Contents
Section titled “Contents”Functions
remove_dir- Remove a fixture directory as a named step.run- Runbodyto completion within 120 seconds, then shut the runtime downstep- Awaitfutureas the named test step.
firma_test_helpers::bounded::remove_dir
Section titled “firma_test_helpers::bounded::remove_dir”Function
Remove a fixture directory as a named step.
Removal runs on a blocking thread, so the step deadline still fires if the
filesystem stalls it. Removal errors are ignored, as in [TempDir]‘s
Drop.
Errors
Section titled “Errors”Returns an error if removal does not finish within 10 seconds.
fn remove_dir(dir: tempfile::TempDir) -> anyhow::Result<()>firma_test_helpers::bounded::run
Section titled “firma_test_helpers::bounded::run”Function
Run body to completion within 120 seconds, then shut the runtime down
within 10 seconds.
Authority and step logs go to the captured test output, so a failure shows
the last step that started. A panic in body is resumed after teardown.
Errors
Section titled “Errors”Returns the error from body, or an error if the runtime cannot be built,
body exceeds its deadline, or teardown exceeds its deadline.
fn run<impl Future<Output = anyhow::Result<()>> + Send + 'static>(body: impl Trait) -> anyhow::Result<()>firma_test_helpers::bounded::step
Section titled “firma_test_helpers::bounded::step”Function
Await future as the named test step.
Errors
Section titled “Errors”Returns an error naming the step if future does not finish within
limit.
fn step<F>(name: &str, limit: std::time::Duration, future: F) -> anyhow::Result<<F as >::Output>