@@ -374,7 +374,8 @@ mod tests {
374
374
use crate :: partition:: state_machine:: Action ;
375
375
use crate :: partition:: state_machine:: tests:: TestEnv ;
376
376
use crate :: partition:: state_machine:: tests:: fixtures:: {
377
- invoker_end_effect, invoker_entry_effect, pinned_deployment,
377
+ invoker_end_effect, invoker_end_effect_for_epoch, invoker_entry_effect,
378
+ invoker_entry_effect_for_epoch, pinned_deployment, pinned_deployment_for_epoch,
378
379
} ;
379
380
use crate :: partition:: state_machine:: tests:: matchers:: storage:: {
380
381
has_commands, has_journal_length, is_epoch, is_variant,
@@ -960,6 +961,31 @@ mod tests {
960
961
ok( eq( InvocationStatus :: Free ) )
961
962
) ;
962
963
964
+ // Complete the restarted invocation too
965
+ let _ = test_env
966
+ . apply_multiple ( [
967
+ pinned_deployment_for_epoch ( invocation_id, 1 , ServiceProtocolVersion :: V5 ) ,
968
+ invoker_entry_effect_for_epoch (
969
+ invocation_id,
970
+ 1 ,
971
+ OutputCommand {
972
+ result : OutputResult :: Success ( Bytes :: from_static ( b"456" ) ) ,
973
+ name : Default :: default ( ) ,
974
+ } ,
975
+ ) ,
976
+ invoker_end_effect_for_epoch ( invocation_id, 1 ) ,
977
+ ] )
978
+ . await ;
979
+
980
+ // Nothing left for this invocation
981
+ assert_that ! (
982
+ test_env
983
+ . storage( )
984
+ . get_invocation_status( & invocation_id)
985
+ . await ,
986
+ ok( eq( InvocationStatus :: Free ) )
987
+ ) ;
988
+
963
989
test_env. shutdown ( ) . await ;
964
990
}
965
991
0 commit comments