mirror of
https://github.com/zed-industries/zed.git
synced 2025-01-12 05:15:00 +00:00
Clear the executor at the end of a test by running until it is parked
This commit is contained in:
parent
426e0e3d4f
commit
c09921e790
2 changed files with 2 additions and 1 deletions
|
@ -174,7 +174,7 @@ impl Deterministic {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fn run_until_parked(&self) {
|
pub(crate) fn run_until_parked(&self) {
|
||||||
let woken = Arc::new(AtomicBool::new(false));
|
let woken = Arc::new(AtomicBool::new(false));
|
||||||
self.run_internal(woken, None);
|
self.run_internal(woken, None);
|
||||||
}
|
}
|
||||||
|
|
|
@ -84,6 +84,7 @@ pub fn run_test(
|
||||||
)
|
)
|
||||||
});
|
});
|
||||||
|
|
||||||
|
deterministic.run_until_parked();
|
||||||
leak_detector.lock().detect();
|
leak_detector.lock().detect();
|
||||||
if is_last_iteration {
|
if is_last_iteration {
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Reference in a new issue