-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
time: advance frozen time in
park_timeout
(#2059)
This patch improves the behavior of frozen time (a testing utility made available with the `test-util` feature flag). Instead of of requiring `time::advance` to be called in order to advance the value returned by `Instant::now`, calls to `time::Driver::park_timeout` will use the provided duration to advance the time. This is the desired behavior as the timeout is used to indicate when the next scheduled delay needs to be fired.
- Loading branch information
1 parent
84ff73e
commit f000600
Showing
10 changed files
with
849 additions
and
694 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,4 @@ | ||
mod mock_clock; | ||
mod test_delay; | ||
mod test_queue; | ||
|
||
use crate::time::{self, Instant}; | ||
use std::time::Duration; | ||
|
Oops, something went wrong.