Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit dd8984f

Browse filesBrowse files
authored
fix: wait up to 20 seconds for blob to appear (GoogleCloudPlatform#3061)
This test fails sometimes with a 3 second wait. Extend this wait, but poll to avoid taking all the time.
1 parent dffa18e commit dd8984f
Copy full SHA for dd8984f

File tree

Expand file treeCollapse file tree

1 file changed

+7
-3
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+7
-3
lines changed

‎video/cloud-client/analyze/beta_snippets_test.py

Copy file name to clipboardExpand all lines: video/cloud-client/analyze/beta_snippets_test.py
+7-3Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -101,11 +101,15 @@ def test_annotation_to_storage_streaming(capsys, video_path, bucket):
101101
assert 'Storage' in out
102102

103103
# It takes a few seconds before the results show up on GCS.
104-
time.sleep(3)
104+
for _ in range(10):
105+
time.sleep(3)
106+
107+
blobs_iterator = bucket.list_blobs()
108+
blobs = [blob for blob in blobs_iterator]
109+
if len(blobs):
110+
break
105111

106112
# Confirm that one output blob had been written to GCS.
107-
blobs_iterator = bucket.list_blobs()
108-
blobs = [blob for blob in blobs_iterator]
109113
assert len(blobs) == 1
110114

111115

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.