Skip to content

Commit 370956c

Browse files
authored
add backoff to conftest (#9283)
1 parent 775cd6f commit 370956c

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

privateca/snippets/conftest.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,9 @@
1414

1515
import uuid
1616

17+
import backoff
1718
from google.api_core.exceptions import FailedPrecondition
19+
from google.api_core.exceptions import ServiceUnavailable
1820
import google.auth
1921
from google.cloud.security import privateca_v1
2022
import pytest
@@ -71,6 +73,7 @@ def delete_capool() -> None:
7173
continue
7274

7375

76+
@backoff.on_exception(backoff.expo, ServiceUnavailable, max_tries=3)
7477
def delete_stale_resources() -> None:
7578
delete_capool()
7679

0 commit comments

Comments
 (0)