In random collaboration test, add failing assertion for worktree convergence

This commit is contained in:
Max Brunsfeld 2022-02-15 14:55:38 -08:00
parent a11495af19
commit 34bba303dc
5 changed files with 88 additions and 15 deletions

View file

@ -370,6 +370,13 @@ impl Foreground {
*any_value.downcast().unwrap()
}
pub fn run_until_parked(&self) {
match self {
Self::Deterministic { executor, .. } => executor.run_until_parked(),
_ => panic!("this method can only be called on a deterministic executor"),
}
}
pub fn parking_forbidden(&self) -> bool {
match self {
Self::Deterministic { executor, .. } => executor.state.lock().forbid_parking,