Adjust diagnostic transformation test to not wait for two buffer notifications
This commit is contained in:
parent
02b95ef320
commit
2db57b5139
5 changed files with 22 additions and 5 deletions
|
@ -434,7 +434,9 @@ impl<T: Entity> ModelHandle<T> {
|
|||
Duration::from_secs(1)
|
||||
};
|
||||
|
||||
let executor = cx.background().clone();
|
||||
async move {
|
||||
executor.start_waiting();
|
||||
let notification = crate::util::timeout(duration, rx.next())
|
||||
.await
|
||||
.expect("next notification timed out");
|
||||
|
|
|
@ -876,6 +876,14 @@ impl Background {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(any(test, feature = "test-support"))]
|
||||
pub fn start_waiting(&self) {
|
||||
match self {
|
||||
Self::Deterministic { executor, .. } => executor.start_waiting(),
|
||||
_ => panic!("this method can only be called on a deterministic executor"),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl Default for Background {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue