@@ -174,8 +174,8 @@ mod tests {
174174
175175 let registrations = register_participants ( & mut oracle, & pks) . await ;
176176 let link = Link {
177- latency : 10.0 ,
178- jitter : 1.0 ,
177+ latency : Duration :: from_millis ( 10 ) ,
178+ jitter : Duration :: from_millis ( 1 ) ,
179179 success_rate : 1.0 ,
180180 } ;
181181 link_participants ( & mut oracle, & pks, Action :: Link ( link) , None ) . await ;
@@ -407,8 +407,8 @@ mod tests {
407407
408408 let mut registrations = register_participants ( & mut oracle, & pks) . await ;
409409 let link = commonware_p2p:: simulated:: Link {
410- latency : 10.0 ,
411- jitter : 1.0 ,
410+ latency : Duration :: from_millis ( 10 ) ,
411+ jitter : Duration :: from_millis ( 1 ) ,
412412 success_rate : 1.0 ,
413413 } ;
414414 link_participants ( & mut oracle, & pks, Action :: Link ( link) , None ) . await ;
@@ -525,8 +525,8 @@ mod tests {
525525
526526 // Heal the partition by re-adding links.
527527 let link = Link {
528- latency : 10.0 ,
529- jitter : 1.0 ,
528+ latency : Duration :: from_millis ( 10 ) ,
529+ jitter : Duration :: from_millis ( 1 ) ,
530530 success_rate : 1.0 ,
531531 } ;
532532 link_participants ( & mut oracle, & pks, Action :: Link ( link) , None ) . await ;
@@ -567,8 +567,8 @@ mod tests {
567567 )
568568 . await ;
569569 let delayed_link = Link {
570- latency : 50.0 ,
571- jitter : 40.0 ,
570+ latency : Duration :: from_millis ( 50 ) ,
571+ jitter : Duration :: from_millis ( 40 ) ,
572572 success_rate : 0.5 ,
573573 } ;
574574 let mut oracle_clone = oracle. clone ( ) ;
@@ -740,8 +740,8 @@ mod tests {
740740
741741 // Heal the partition by re-adding links.
742742 let link = Link {
743- latency : 10.0 ,
744- jitter : 1.0 ,
743+ latency : Duration :: from_millis ( 10 ) ,
744+ jitter : Duration :: from_millis ( 1 ) ,
745745 success_rate : 1.0 ,
746746 } ;
747747 link_participants ( & mut oracle, & pks, Action :: Link ( link) , None ) . await ;
@@ -809,8 +809,8 @@ mod tests {
809809 // Register all participants
810810 let mut registrations = register_participants ( & mut oracle, & participants) . await ;
811811 let link = commonware_p2p:: simulated:: Link {
812- latency : 10.0 ,
813- jitter : 1.0 ,
812+ latency : Duration :: from_millis ( 10 ) ,
813+ jitter : Duration :: from_millis ( 1 ) ,
814814 success_rate : 1.0 ,
815815 } ;
816816 link_participants ( & mut oracle, & participants, Action :: Link ( link) , None ) . await ;
@@ -969,8 +969,8 @@ mod tests {
969969 )
970970 . await ;
971971 let delayed_link = Link {
972- latency : 80.0 ,
973- jitter : 10.0 ,
972+ latency : Duration :: from_millis ( 80 ) ,
973+ jitter : Duration :: from_millis ( 10 ) ,
974974 success_rate : 0.98 ,
975975 } ;
976976 let mut oracle_clone = oracle. clone ( ) ;
0 commit comments