Skip to content

Commit 3bcce7c

Browse files
committed
test(integration): adjust for flakiness
1 parent 7efc9d6 commit 3bcce7c

File tree

3 files changed

+9
-3
lines changed

3 files changed

+9
-3
lines changed

docs/source/configuring.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,4 +69,4 @@ If do not want your function to be publicly available, set the privacy to `priva
6969
def handler(event, context):
7070
...
7171
72-
.. autofunction:: scw_serverless.app.Serverless.schedule
72+
.. autoclass:: scw_serverless.config.triggers.CronTrigger

docs/source/deploying.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ The `deploy` command will deploy your functions directly.
1515
The command will wait until all functions are deployed and ready to be called. It will also deploy the corresponding triggers.
1616

1717
If you have routed functions, the deploy command will also call your Serverless Gateway to update the routes to your function.
18-
For more information on the Gateway integration, check out :doc:`gateway`.
18+
For more information on the Gateway integration, see also :doc:`gateway`.
1919

2020
Dependencies
2121
------------

tests/integrations/utils.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,13 @@ def get_deployed_functions_by_name(client: Client, app_instance: Serverless):
5757
def trigger_function(domain_name: str, max_retries: int = 5) -> requests.Response:
5858
url = f"https://{domain_name}"
5959
session = requests.Session()
60-
retries = Retry(total=max_retries, backoff_factor=0.1)
60+
retries = Retry(
61+
total=max_retries,
62+
backoff_factor=1,
63+
status=10, # Status max retries
64+
status_forcelist=[500, 404],
65+
raise_on_status=False, # Raise for status called after
66+
)
6167
session.mount("https://", HTTPAdapter(max_retries=retries))
6268
req = session.get(url, timeout=constants.COLD_START_TIMEOUT)
6369
req.raise_for_status()

0 commit comments

Comments
 (0)