Skip to content

Commit 6a65cb2

Browse files
authored
Add retry-once to connector tests (#276)
1 parent f491eb2 commit 6a65cb2

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

integration/combination/test_connectors.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,12 @@
11
from time import sleep
22
from parameterized import parameterized
3+
from tenacity import retry, stop_after_attempt
34
from integration.conftest import clean_bucket
45
from integration.helpers.base_test import S3_BUCKET_PREFIX, BaseTest
56
from integration.helpers.resource import generate_suffix
67

8+
retry_once = retry(stop=stop_after_attempt(2))
9+
710

811
class TestConnectors(BaseTest):
912
def tearDown(self):
@@ -41,6 +44,7 @@ def tearDown(self):
4144
("combination/connector_table_to_function_read",),
4245
]
4346
)
47+
@retry_once
4448
def test_connector_by_invoking_a_function(self, template_file_path):
4549
self.skip_using_service_detector(template_file_path)
4650
self.create_and_verify_stack(template_file_path)
@@ -72,6 +76,7 @@ def test_connector_by_invoking_a_function(self, template_file_path):
7276
("combination/connector_sfn_to_eb_custom_write",),
7377
]
7478
)
79+
@retry_once
7580
def test_connector_by_sync_execute_an_state_machine(self, template_file_path):
7681
self.skip_using_service_detector(template_file_path)
7782
self.create_and_verify_stack(template_file_path)
@@ -91,6 +96,7 @@ def test_connector_by_sync_execute_an_state_machine(self, template_file_path):
9196
("combination/connector_sfn_to_sfn_sync",),
9297
]
9398
)
99+
@retry_once
94100
def test_connector_by_async_execute_an_state_machine(self, template_file_path):
95101
self.skip_using_service_detector(template_file_path)
96102
self.create_and_verify_stack(template_file_path)
@@ -123,6 +129,7 @@ def test_connector_by_async_execute_an_state_machine(self, template_file_path):
123129
("combination/connector_bucket_to_function_write",),
124130
]
125131
)
132+
@retry_once
126133
def test_connector_by_execute_a_s3_bucket(self, template_file_path):
127134
self.skip_using_service_detector(template_file_path)
128135
bucket_name = S3_BUCKET_PREFIX + "connector" + generate_suffix()

0 commit comments

Comments
 (0)