Skip to content

Commit 79cfb2f

Browse files
munkhuushmglleahecole
authored andcommitted
chore: increased timeout for flaky service & added retry (#103)
* chore: increased timeout for flaky service & added retry * fixed param error * lint
1 parent 4f93a72 commit 79cfb2f

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

videointelligence/samples/analyze/beta_snippets.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -510,7 +510,7 @@ def stream_generator():
510510
# The default timeout is about 300 seconds.
511511
# To process longer videos it should be set to
512512
# larger than the length (in seconds) of the stream.
513-
responses = client.streaming_annotate_video(requests, timeout=600)
513+
responses = client.streaming_annotate_video(requests, timeout=900)
514514

515515
# Each response corresponds to about 1 second of video.
516516
for response in responses:

videointelligence/samples/analyze/beta_snippets_test.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,9 @@ def test_detect_shot_change_streaming(capsys, video_path):
9595
assert "Shot" in out
9696

9797

98+
# Flaky ServiceUnavailable
9899
@pytest.mark.slow
100+
@pytest.mark.flaky(max_runs=3, min_passes=1)
99101
def test_track_objects_streaming(capsys, video_path):
100102
beta_snippets.track_objects_streaming(video_path)
101103

0 commit comments

Comments
 (0)