File tree Expand file tree Collapse file tree
crates/sdk-core/tests/shared_tests Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -14,9 +14,15 @@ use temporalio_client::{
1414use temporalio_common:: {
1515 UntypedWorkflow ,
1616 protos:: temporal:: api:: {
17- enums:: v1:: { EventType , WorkflowTaskFailedCause :: GrpcMessageTooLarge } ,
18- history:: v1:: history_event:: Attributes :: {
19- WorkflowExecutionTerminatedEventAttributes , WorkflowTaskFailedEventAttributes ,
17+ enums:: v1:: {
18+ EventType ,
19+ WorkflowTaskFailedCause :: { self , GrpcMessageTooLarge } ,
20+ } ,
21+ history:: v1:: history_event:: {
22+ self ,
23+ Attributes :: {
24+ WorkflowExecutionTerminatedEventAttributes , WorkflowTaskFailedEventAttributes ,
25+ } ,
2026 } ,
2127 } ,
2228 worker:: WorkerTaskTypes ,
@@ -197,9 +203,14 @@ pub(crate) async fn shutdown_during_active_timer_activity_workflows() {
197203 let bad_events: Vec < _ > = history
198204 . events ( )
199205 . iter ( )
200- . filter ( |e| {
201- e. event_type ( ) == EventType :: WorkflowTaskFailed
202- || e. event_type ( ) == EventType :: WorkflowTaskTimedOut
206+ . filter ( |e| match & e. attributes {
207+ Some ( history_event:: Attributes :: WorkflowTaskFailedEventAttributes ( f) )
208+ if f. cause ( ) != WorkflowTaskFailedCause :: ForceCloseCommand =>
209+ {
210+ true
211+ }
212+ Some ( history_event:: Attributes :: WorkflowTaskTimedOutEventAttributes ( _) ) => true ,
213+ _ => false ,
203214 } )
204215 . collect ( ) ;
205216 assert ! (
You can’t perform that action at this time.
0 commit comments