From 2e7c129505a857fddc100a7a7cea182fc07aad58 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> --- .../samples/snippets/samples_test.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/packages/google-cloud-containeranalysis/samples/snippets/samples_test.py b/packages/google-cloud-containeranalysis/samples/snippets/samples_test.py index 04768836d009..116796c0bf67 100644 --- a/packages/google-cloud-containeranalysis/samples/snippets/samples_test.py +++ b/packages/google-cloud-containeranalysis/samples/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: