Skip to content

Commit efad63b

Browse files
committed
only retry for async
1 parent dfb28e5 commit efad63b

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

test/asynchronous/unified_format.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1395,7 +1395,11 @@ async def run_scenario(self, spec, uri=None):
13951395
try:
13961396
return await self._run_scenario(spec, uri)
13971397
except (AssertionError, OperationFailure) as exc:
1398-
if isinstance(exc, OperationFailure) and "failpoint" not in exc._message:
1398+
if not (
1399+
isinstance(exc, OperationFailure)
1400+
and not _IS_SYNC
1401+
and "failpoint" in exc._message
1402+
):
13991403
raise
14001404
if i < attempts - 1:
14011405
print(

test/unified_format.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1382,7 +1382,11 @@ def run_scenario(self, spec, uri=None):
13821382
try:
13831383
return self._run_scenario(spec, uri)
13841384
except (AssertionError, OperationFailure) as exc:
1385-
if isinstance(exc, OperationFailure) and "failpoint" not in exc._message:
1385+
if not (
1386+
isinstance(exc, OperationFailure)
1387+
and not _IS_SYNC
1388+
and "failpoint" in exc._message
1389+
):
13861390
raise
13871391
if i < attempts - 1:
13881392
print(

0 commit comments

Comments
 (0)