Skip to content

Commit 28cf095

Browse files
authored
Do not retry on SkipTest (#280)
1 parent 97a82b9 commit 28cf095

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

integration/combination/test_connectors.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,16 @@
11
from time import sleep
2+
from unittest import SkipTest
23
from parameterized import parameterized
3-
from tenacity import retry, stop_after_attempt
4+
from tenacity import retry, stop_after_attempt, retry_if_exception
45
from integration.conftest import clean_bucket
56
from integration.helpers.base_test import S3_BUCKET_PREFIX, BaseTest
67
from integration.helpers.resource import generate_suffix
78

8-
retry_once = retry(stop=stop_after_attempt(2))
9+
retry_once = retry(
10+
stop=stop_after_attempt(2),
11+
# unittest raises SkipTest for skipping tests
12+
retry=retry_if_exception(lambda e: not isinstance(e, SkipTest)),
13+
)
914

1015

1116
class TestConnectors(BaseTest):

0 commit comments

Comments
 (0)