@@ -521,11 +521,14 @@ async def test_actor_mesh_supervision_handling(mesh):
521
521
await e .check .call ()
522
522
523
523
# existing call should fail with supervision error
524
- with pytest .raises (SupervisionError , match = "supervision error:" ):
524
+ with pytest .raises (
525
+ SupervisionError ,
526
+ match = ".*Actor .* exited because of the following reason" ,
527
+ ):
525
528
await e .fail_with_supervision_error .call_one ()
526
529
527
530
# new call should fail with check of health state of actor mesh
528
- with pytest .raises (SupervisionError , match = "actor mesh is unhealthy with reason" ):
531
+ with pytest .raises (SupervisionError , match = "Actor .* is unhealthy with reason" ):
529
532
await e .check .call ()
530
533
531
534
# should not be able to spawn actors anymore as proc mesh is unhealthy
@@ -588,11 +591,14 @@ async def test_actor_mesh_supervision_handling_chained_error(mesh):
588
591
# in a chain of client -> Intermediate -> ErrorActor, a supervision error
589
592
# happening in ErrorActor will be captured by Intermediate and re-raised
590
593
# as an application error (ActorError).
591
- with pytest .raises (ActorError , match = "supervision error:" ):
594
+ with pytest .raises (
595
+ ActorError ,
596
+ match = ".*Actor .* exited because of the following reason" ,
597
+ ):
592
598
await intermediate_actor .forward_error .call ()
593
599
594
600
# calling success endpoint should fail with ActorError, but with supervision msg.
595
- with pytest .raises (ActorError , match = "actor mesh is unhealthy with reason" ):
601
+ with pytest .raises (ActorError , match = "Actor .* is unhealthy with reason" ):
596
602
await intermediate_actor .forward_success .call ()
597
603
598
604
# healthy actor should still be working
@@ -621,11 +627,14 @@ async def test_base_exception_handling(mesh, method_name):
621
627
method = getattr (error_actor , method_name )
622
628
623
629
# The call should raise a SupervisionError
624
- with pytest .raises (SupervisionError , match = "supervision error:" ):
630
+ with pytest .raises (
631
+ SupervisionError ,
632
+ match = ".*Actor .* exited because of the following reason" ,
633
+ ):
625
634
await method .call_one ()
626
635
627
636
# Subsequent calls should fail with a health state error
628
- with pytest .raises (RuntimeError , match = "actor mesh is unhealthy with reason" ):
637
+ with pytest .raises (RuntimeError , match = "Actor .* is unhealthy with reason" ):
629
638
await error_actor .check .call ()
630
639
631
640
@@ -665,11 +674,14 @@ async def test_supervision_with_sending_error():
665
674
await actor_mesh .check_with_payload .call (payload = "a" )
666
675
667
676
# send a large payload to trigger send timeout error
668
- with pytest .raises (SupervisionError , match = "supervision error:.*" ):
677
+ with pytest .raises (
678
+ SupervisionError ,
679
+ match = ".*Actor .* exited because of the following reason" ,
680
+ ):
669
681
await actor_mesh .check_with_payload .call (payload = "a" * 55000000 )
670
682
671
683
# new call should fail with check of health state of actor mesh
672
- with pytest .raises (SupervisionError , match = "actor mesh is unhealthy with reason: " ):
684
+ with pytest .raises (SupervisionError , match = "Actor .* is unhealthy with reason" ):
673
685
await actor_mesh .check .call ()
674
- with pytest .raises (SupervisionError , match = "actor mesh is unhealthy with reason: " ):
686
+ with pytest .raises (SupervisionError , match = "Actor .* is unhealthy with reason" ):
675
687
await actor_mesh .check_with_payload .call (payload = "a" )
0 commit comments