Make test_terminal_eof less flaky and faster (#39281)

Release Notes:

- N/A
This commit is contained in:
Kirill Bulatov
2025-10-01 12:14:06 +00:00
committed by GitHub
parent 1c85995ed7
commit 77cc55656e
2 changed files with 12 additions and 6 deletions
+1
View File
@@ -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>,