@@ -548,7 +548,6 @@ pub(crate) mod tests {
548548 use concepts:: storage:: http_client_trace:: { RequestTrace , ResponseTrace } ;
549549 use concepts:: storage:: { DbPool , TimeoutOutcome } ;
550550 use concepts:: storage:: { ExecutionRequest , Version } ;
551- use concepts:: time:: Now ;
552551 use concepts:: time:: TokioSleep ;
553552 use concepts:: { ComponentRetryConfig , ComponentType } ;
554553 use concepts:: {
@@ -1038,18 +1037,20 @@ pub(crate) mod tests {
10381037 let engine =
10391038 Engines :: get_activity_engine_test ( EngineConfig :: pooling_nocache_testing ( pool_opts) )
10401039 . unwrap ( ) ;
1040+ let sim_clock = SimClock :: epoch ( ) ;
10411041
10421042 let ( fibo_worker, _) = new_activity_worker (
10431043 test_programs_fibo_activity_builder:: TEST_PROGRAMS_FIBO_ACTIVITY ,
10441044 engine,
1045- Now . clone_box ( ) ,
1045+ sim_clock . clone_box ( ) ,
10461046 TokioSleep ,
10471047 )
10481048 . await ;
10491049 // create executions
10501050 let join_handles = ( 0 ..tasks)
10511051 . map ( |_| {
10521052 let fibo_worker = fibo_worker. clone ( ) ;
1053+ let sim_clock = sim_clock. clone ( ) ;
10531054 let execution_id = ExecutionId :: generate ( ) ;
10541055 let ( executor_close_tx, executor_close_watcher) =
10551056 tokio:: sync:: watch:: channel ( false ) ;
@@ -1070,7 +1071,7 @@ pub(crate) mod tests {
10701071 executor_id : ExecutorId :: generate ( ) ,
10711072 deployment_id : DEPLOYMENT_ID_DUMMY ,
10721073 run_id : RunId :: generate ( ) ,
1073- lock_expires_at : Now . now ( ) + lock_expiry,
1074+ lock_expires_at : sim_clock . now ( ) + lock_expiry,
10741075 retry_config : ComponentRetryConfig :: ZERO ,
10751076 } ,
10761077 executor_close_watcher,
@@ -1386,7 +1387,6 @@ pub(crate) mod tests {
13861387 let created_at = sim_clock. now ( ) ;
13871388 let db_connection = db_pool. connection_test ( ) . await . unwrap ( ) ;
13881389 info ! ( "Creating execution" ) ;
1389- let stopwatch = std:: time:: Instant :: now ( ) ;
13901390 db_connection
13911391 . create ( CreateRequest {
13921392 created_at,
@@ -1423,8 +1423,6 @@ pub(crate) mod tests {
14231423 . len( )
14241424 ) ;
14251425 let exec_log = db_connection. get ( & execution_id) . await . unwrap ( ) ;
1426- let stopwatch = stopwatch. elapsed ( ) ;
1427- info ! ( "Finished in {stopwatch:?}" ) ;
14281426 let ( res, http_client_traces) = assert_matches ! (
14291427 exec_log. last_event( ) . event. clone( ) ,
14301428 ExecutionRequest :: Finished { retval, http_client_traces: Some ( http_client_traces) }
@@ -1518,7 +1516,6 @@ pub(crate) mod tests {
15181516 let created_at = sim_clock. now ( ) ;
15191517 let db_connection = db_pool. connection_test ( ) . await . unwrap ( ) ;
15201518 info ! ( "Creating execution" ) ;
1521- let stopwatch = std:: time:: Instant :: now ( ) ;
15221519 db_connection
15231520 . create ( CreateRequest {
15241521 created_at,
@@ -1555,8 +1552,6 @@ pub(crate) mod tests {
15551552 . len( )
15561553 ) ;
15571554 let exec_log = db_connection. get ( & execution_id) . await . unwrap ( ) ;
1558- let stopwatch = stopwatch. elapsed ( ) ;
1559- info ! ( "Finished in {stopwatch:?}" ) ;
15601555 let ( res, http_client_traces) = assert_matches ! (
15611556 exec_log. last_event( ) . event. clone( ) ,
15621557 ExecutionRequest :: Finished { retval, http_client_traces: Some ( http_client_traces) }
0 commit comments