File tree Expand file tree Collapse file tree
crates/charon/src/expbackoff Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -255,6 +255,27 @@ mod tests {
255255 } ) ;
256256 }
257257
258+ #[ test]
259+ fn fast ( ) {
260+ assert_test_case ( TestCase {
261+ config : ExponentialBackoffBuilder :: < HasherRng > :: fast_config ( ) ,
262+ rng : 0.5 ,
263+ backoffs : vec ! [
264+ Duration :: from_millis( 100 ) ,
265+ Duration :: from_millis( 160 ) ,
266+ Duration :: from_millis( 250 ) ,
267+ Duration :: from_millis( 400 ) ,
268+ Duration :: from_millis( 650 ) ,
269+ Duration :: from_secs( 1 ) + Duration :: from_millis( 40 ) ,
270+ Duration :: from_secs( 1 ) + Duration :: from_millis( 670 ) ,
271+ Duration :: from_secs( 2 ) + Duration :: from_millis( 680 ) ,
272+ Duration :: from_secs( 4 ) + Duration :: from_millis( 290 ) ,
273+ Duration :: from_secs( 5 ) ,
274+ Duration :: from_secs( 5 ) ,
275+ ] ,
276+ } ) ;
277+ }
278+
258279 fn assert_test_case ( tc : TestCase ) {
259280 let mut instance = tc. config . with_rng ( Const ( tc. rng ) ) . build ( ) . unwrap ( ) ;
260281
You can’t perform that action at this time.
0 commit comments