Skip to content

Commit

Permalink
test: Fix combination of flaky+parameterized (#7868)
Browse files Browse the repository at this point in the history
Co-authored-by: Roger Zhang <[email protected]>
  • Loading branch information
valerena and roger-zhangg authored Feb 6, 2025
1 parent e0e42c6 commit 8f6b789
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tests/integration/local/start_api/test_start_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -1549,19 +1549,19 @@ def assert_cors(self, response):
self.assertEqual(response.headers.get("Access-Control-Allow-Credentials"), "true")
self.assertEqual(response.headers.get("Access-Control-Max-Age"), "510")

@parameterized.expand(["https://abc", None])
@pytest.mark.flaky(reruns=3)
@pytest.mark.timeout(timeout=600, method="thread")
@parameterized.expand(["https://abc", None])
def test_cors_swagger_options(self, origin):
"""
This tests that the Cors headers are added to OPTIONS responses
"""
response = requests.options(self.url + "/echobase64eventbody", **_create_request_params(origin))
self.assert_cors(response)

@parameterized.expand(["https://abc", None])
@pytest.mark.flaky(reruns=3)
@pytest.mark.timeout(timeout=600, method="thread")
@parameterized.expand(["https://abc", None])
def test_cors_swagger_get(self, origin):
"""
This tests that the Cors headers are added to _other_ method responses
Expand Down Expand Up @@ -1685,9 +1685,9 @@ class TestServiceCorsGlobalRequests(StartApiIntegBaseClass):
def setUp(self):
self.url = "http://127.0.0.1:{}".format(self.port)

@parameterized.expand(["https://abc", None])
@pytest.mark.flaky(reruns=3)
@pytest.mark.timeout(timeout=600, method="thread")
@parameterized.expand(["https://abc", None])
def test_cors_global(self, origin):
"""
This tests that the Cors headers are added to OPTIONS response when the global property is set
Expand Down

0 comments on commit 8f6b789

Please sign in to comment.