Make test_terminal_eof less flaky and faster (#39281)
Release Notes: - N/A
This commit is contained in:
@@ -115,6 +115,7 @@ impl<T: Future> Future for WithTimeout<T> {
|
||||
|
||||
#[cfg(any(test, feature = "test-support"))]
|
||||
/// Uses smol executor to run a given future no longer than the timeout specified.
|
||||
/// Note that this won't "rewind" on `cx.executor().advance_clock` call, truly waiting for the timeout to elapse.
|
||||
pub async fn smol_timeout<F, T>(timeout: Duration, f: F) -> Result<T, ()>
|
||||
where
|
||||
F: Future<Output = T>,
|
||||
|
||||
Reference in New Issue
Block a user