Skip to content

Commit 60188c2

Browse files
committed
test: retry context delete
1 parent b82fb8a commit 60188c2

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

tests/integ/sagemaker/lineage/conftest.py

+6-2
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
from random import randint
4141
from botocore.exceptions import ClientError
4242

43-
from tests.integ.sagemaker.lineage.helpers import name, names
43+
from tests.integ.sagemaker.lineage.helpers import name, names, retry
4444

4545
SLEEP_TIME_SECONDS = 1
4646
SLEEP_TIME_TWO_SECONDS = 2
@@ -378,7 +378,11 @@ def model_obj(sagemaker_session):
378378

379379
yield model
380380
time.sleep(SLEEP_TIME_SECONDS)
381-
model.delete(disassociate=True)
381+
382+
def del_func():
383+
return model.delete(disassociate=True)
384+
385+
retry(del_func, num_attempts=4)
382386

383387

384388
@pytest.fixture

0 commit comments

Comments
 (0)