@@ -709,15 +709,22 @@ def test__exc_to_status(self):
709709 for exc in custom_excs :
710710 assert cls ._exc_to_status (exc ) == cause_exc .grpc_status_code , exc
711711 # extract most recent exception for bigtable exception groups
712+ # if retry is cause, unwrap retry
713+ retry_exc = bt_exc .RetryExceptionGroup ([RuntimeError (), cause_exc ])
712714 exc_groups = [
713- bt_exc ._BigtableExceptionGroup ("" , [ValueError (), cause_exc ]),
714- bt_exc .RetryExceptionGroup ([RuntimeError (), cause_exc ]),
715+ retry_exc ,
715716 bt_exc .ShardedReadRowsExceptionGroup (
716717 [bt_exc .FailedQueryShardError (1 , {}, cause = cause_exc )], [], 2
717718 ),
719+ bt_exc .ShardedReadRowsExceptionGroup (
720+ [bt_exc .FailedQueryShardError (1 , {}, cause = retry_exc )], [], 2
721+ ),
718722 bt_exc .MutationsExceptionGroup (
719723 [bt_exc .FailedMutationEntryError (1 , mock .Mock (), cause = cause_exc )], 2
720724 ),
725+ bt_exc .MutationsExceptionGroup (
726+ [bt_exc .FailedMutationEntryError (1 , mock .Mock (), cause = retry_exc )], 2
727+ ),
721728 ]
722729 for exc in exc_groups :
723730 assert cls ._exc_to_status (exc ) == cause_exc .grpc_status_code , exc
0 commit comments