1
1
from time import sleep
2
2
from parameterized import parameterized
3
+ from tenacity import retry , stop_after_attempt
3
4
from integration .conftest import clean_bucket
4
5
from integration .helpers .base_test import S3_BUCKET_PREFIX , BaseTest
5
6
from integration .helpers .resource import generate_suffix
6
7
8
+ retry_once = retry (stop = stop_after_attempt (2 ))
9
+
7
10
8
11
class TestConnectors (BaseTest ):
9
12
def tearDown (self ):
@@ -41,6 +44,7 @@ def tearDown(self):
41
44
("combination/connector_table_to_function_read" ,),
42
45
]
43
46
)
47
+ @retry_once
44
48
def test_connector_by_invoking_a_function (self , template_file_path ):
45
49
self .skip_using_service_detector (template_file_path )
46
50
self .create_and_verify_stack (template_file_path )
@@ -72,6 +76,7 @@ def test_connector_by_invoking_a_function(self, template_file_path):
72
76
("combination/connector_sfn_to_eb_custom_write" ,),
73
77
]
74
78
)
79
+ @retry_once
75
80
def test_connector_by_sync_execute_an_state_machine (self , template_file_path ):
76
81
self .skip_using_service_detector (template_file_path )
77
82
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):
91
96
("combination/connector_sfn_to_sfn_sync" ,),
92
97
]
93
98
)
99
+ @retry_once
94
100
def test_connector_by_async_execute_an_state_machine (self , template_file_path ):
95
101
self .skip_using_service_detector (template_file_path )
96
102
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):
123
129
("combination/connector_bucket_to_function_write" ,),
124
130
]
125
131
)
132
+ @retry_once
126
133
def test_connector_by_execute_a_s3_bucket (self , template_file_path ):
127
134
self .skip_using_service_detector (template_file_path )
128
135
bucket_name = S3_BUCKET_PREFIX + "connector" + generate_suffix ()
0 commit comments