@@ -11,7 +11,7 @@ pub mod workflows;
1111pub use temporal_sdk_core:: replay:: HistoryForReplay ;
1212
1313use crate :: stream:: { Stream , TryStreamExt } ;
14- use anyhow:: Context ;
14+ use anyhow:: { Context , Error } ;
1515use base64:: { prelude:: BASE64_STANDARD , Engine } ;
1616use futures:: { future, stream, stream:: FuturesUnordered , StreamExt } ;
1717use parking_lot:: Mutex ;
@@ -47,6 +47,7 @@ use temporal_sdk_core_api::{
4747} ;
4848use temporal_sdk_core_protos:: {
4949 coresdk:: {
50+ workflow_activation:: WorkflowActivation ,
5051 workflow_commands:: {
5152 workflow_command, ActivityCancellationType , CompleteWorkflowExecution , QueryResult ,
5253 QuerySuccess , ScheduleActivity , ScheduleLocalActivity , StartTimer ,
@@ -510,7 +511,7 @@ impl TestWorker {
510511 } ) ;
511512 }
512513
513- /// Runs until all expected workflows have completed
514+ /// Runs until all expected workflows have completed and then shuts down the worker
514515 pub async fn run_until_done ( & mut self ) -> Result < ( ) , anyhow:: Error > {
515516 self . run_until_done_intercepted ( Option :: < TestWorkerCompletionIceptor > :: None )
516517 . await
@@ -604,6 +605,12 @@ impl WorkerInterceptor for TestWorkerCompletionIceptor {
604605 n. on_shutdown ( sdk_worker) ;
605606 }
606607 }
608+ async fn on_workflow_activation ( & self , a : & WorkflowActivation ) -> Result < ( ) , Error > {
609+ if let Some ( n) = self . next . as_ref ( ) {
610+ n. on_workflow_activation ( a) . await ?;
611+ }
612+ Ok ( ( ) )
613+ }
607614}
608615
609616/// Returns the client options used to connect to the server used for integration tests.
0 commit comments