Skip to content

Commit c0384c6

Browse files
fix: wait time instead of tries for flaky issues (GoogleCloudPlatform#10387)
* fix: wait time instead of tries for flaky issues * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --------- Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
1 parent 40e0160 commit c0384c6

File tree

8 files changed

+10
-8
lines changed

8 files changed

+10
-8
lines changed

appengine/standard_python3/bundled-services/blobstore/flask/main_test.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ def gcloud_cli(command):
5757

5858

5959
# Wait for app at given URL to initialize
60-
@backoff.on_exception(backoff.expo, requests.exceptions.HTTPError, max_tries=5)
60+
@backoff.on_exception(backoff.expo, requests.exceptions.HTTPError, max_time=300)
6161
def wait_for_app(url):
6262
r = requests.get(url)
6363
r.raise_for_status()

appengine/standard_python3/bundled-services/blobstore/wsgi/main_test.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ def gcloud_cli(command):
5757

5858

5959
# Wait for app to initialize
60-
@backoff.on_exception(backoff.expo, requests.exceptions.HTTPError, max_tries=3)
60+
@backoff.on_exception(backoff.expo, requests.exceptions.HTTPError, max_time=300)
6161
def wait_for_app(url):
6262
r = requests.get(url)
6363
r.raise_for_status()

appengine/standard_python3/bundled-services/deferred/flask/main_test.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ def version():
6868
version_hostname = f"{version_id}-dot-{project_id}.appspot.com"
6969

7070
# Wait for app to initialize
71-
@backoff.on_exception(backoff.expo, requests.exceptions.HTTPError, max_tries=3)
71+
@backoff.on_exception(backoff.expo, requests.exceptions.HTTPError, max_time=300)
7272
def wait_for_app(url):
7373
r = requests.get(url)
7474
r.raise_for_status()

appengine/standard_python3/bundled-services/deferred/wsgi/main_test.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ def version():
6868
version_hostname = f"{version_id}-dot-{project_id}.appspot.com"
6969

7070
# Wait for app to initialize
71-
@backoff.on_exception(backoff.expo, requests.exceptions.HTTPError, max_tries=3)
71+
@backoff.on_exception(backoff.expo, requests.exceptions.HTTPError, max_time=300)
7272
def wait_for_app(url):
7373
r = requests.get(url)
7474
r.raise_for_status()

appengine/standard_python3/bundled-services/mail/django/main_test.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ def gcloud_cli(command):
5656
raise Exception(output.stderr)
5757

5858

59-
@backoff.on_exception(backoff.expo, requests.exceptions.HTTPError, max_tries=6)
59+
@backoff.on_exception(backoff.expo, requests.exceptions.HTTPError, max_time=300)
6060
def get_with_retries(url):
6161
r = requests.get(url)
6262
r.raise_for_status()

appengine/standard_python3/bundled-services/mail/flask/main.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,9 @@ def receive_mail(path):
9292
message = mail.InboundEmailMessage(request.get_data())
9393

9494
# Do something with the message
95-
print(f"Received greeting for {escape(message.to)} at {escape(message.date)} from {escape(message.sender)}")
95+
print(
96+
f"Received greeting for {escape(message.to)} at {escape(message.date)} from {escape(message.sender)}"
97+
)
9698
for content_type, payload in message.bodies("text/plain"):
9799
print(f"Text/plain body: {payload.decode()}")
98100
break

appengine/standard_python3/bundled-services/mail/flask/main_test.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ def version():
6767
version_hostname = f"{version_id}-dot-{project_id}.appspot.com"
6868

6969
# Wait for app to initialize
70-
@backoff.on_exception(backoff.expo, requests.exceptions.HTTPError, max_tries=3)
70+
@backoff.on_exception(backoff.expo, requests.exceptions.HTTPError, max_time=300)
7171
def wait_for_app(url):
7272
r = requests.get(url)
7373
r.raise_for_status()

appengine/standard_python3/bundled-services/mail/wsgi/main_test.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ def gcloud_cli(command):
5656
raise Exception(output.stderr)
5757

5858

59-
@backoff.on_exception(backoff.expo, requests.exceptions.HTTPError, max_tries=6)
59+
@backoff.on_exception(backoff.expo, requests.exceptions.HTTPError, max_time=300)
6060
def get_with_retries(url):
6161
r = requests.get(url)
6262
r.raise_for_status()

0 commit comments

Comments
 (0)