diff options
| author | Laurenz <laurmaedje@gmail.com> | 2024-09-05 21:59:00 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-09-05 19:59:00 +0000 |
| commit | a452fc94bb8dc5d2f4bdb3fe98506f60308487b6 (patch) | |
| tree | 9c0b9343645e8c3e4819c49cecab720bcc9429f0 /tests/src/logger.rs | |
| parent | 8a8c4cec77342cc8c0772122cd2d0a71085c2c24 (diff) | |
Terminate tests when stuck for 10s (#4905)
Diffstat (limited to 'tests/src/logger.rs')
| -rw-r--r-- | tests/src/logger.rs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/tests/src/logger.rs b/tests/src/logger.rs index a8ba43c6..45c9f098 100644 --- a/tests/src/logger.rs +++ b/tests/src/logger.rs @@ -100,9 +100,10 @@ impl<'a> Logger<'a> { self.failed == 0 } - /// Refresh the status. - pub fn refresh(&mut self) { + /// Refresh the status. Returns whether we still seem to be making progress. + pub fn refresh(&mut self) -> bool { self.print(|_| Ok(())).unwrap(); + self.last_change.elapsed() < Duration::from_secs(10) } /// Refresh the status print. |
