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: