Skip to main content

test_lock

Function test_lock 

Source
pub fn test_lock() -> MutexGuard<'static, ()>
Expand description

A process-global lock for serializing tests that share the global pool.

The pool is process-global, so tests that install it and run requests must not execute concurrently. Generated scaffold controller tests hold this lock for their duration; hold it in any hand-written test that touches the global pool. Poisoning is ignored so one failing test doesn’t cascade.