From 84e07a86457dbbc2eed1ff72a82969392bed0ce2 Mon Sep 17 00:00:00 2001 From: Takashi Matsuo Date: Thu, 7 May 2020 14:23:59 -0700 Subject: [PATCH] [container_registry] fix: bump the pubsub timeout [(#3698)](https://github.com/GoogleCloudPlatform/python-docs-samples/issues/3698) fixes #2894 Co-authored-by: Leah E. Cole <6719667+leahecole@users.noreply.github.com> --- .../container_analysis/snippets/samples_test.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/container_registry/container_analysis/snippets/samples_test.py b/container_registry/container_analysis/snippets/samples_test.py index 04768836d009..116796c0bf67 100644 --- a/container_registry/container_analysis/snippets/samples_test.py +++ b/container_registry/container_analysis/snippets/samples_test.py @@ -175,7 +175,10 @@ def test_pubsub(self): time.sleep(SLEEP_TIME) samples.delete_occurrence(basename(occ.name), PROJECT_ID) time.sleep(SLEEP_TIME) - job_done.wait(timeout=60) + # We saw occational failure with 60 seconds timeout, so we bumped it + # to 180 seconds. + # See also: python-docs-samples/issues/2894 + job_done.wait(timeout=180) print('done. msg_count = {}'.format(receiver.msg_count)) assert message_count <= receiver.msg_count finally: