pub fn run_test(
num_iterations: usize,
explicit_seeds: &[u64],
max_retries: usize,
test_fn: &mut (dyn RefUnwindSafe + Fn(TestDispatcher, u64)),
on_fail_fn: Option<fn()>,
)Expand description
Runs test_fn for each seed, retrying a failing seed up to max_retries times.
The #[gpui::test] macro calls this function. It chooses seeds from the
macro’s arguments and these environment variables:
ITERATIONS=noverrides the number of iterations.SEED=nruns only seedn, or, with more than one iteration, the seedsnton + iterations - 1. It replacesexplicit_seeds.
When more than one seed runs, each seed is printed before it runs, and a
failing seed is printed when its last attempt fails. After the last failure,
on_fail_fn runs, then the panic is re-raised.