Skip to content

Commit

Permalink
chore: increased timeout for flaky service & added retry (#103)
Browse files Browse the repository at this point in the history
* chore: increased timeout for flaky service & added retry

* fixed param error

* lint
  • Loading branch information
munkhuushmgl authored and leahecole committed Sep 15, 2023
1 parent 4f93a72 commit 79cfb2f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion videointelligence/samples/analyze/beta_snippets.py
Original file line number Diff line number Diff line change
Expand Up @@ -510,7 +510,7 @@ def stream_generator():
# The default timeout is about 300 seconds.
# To process longer videos it should be set to
# larger than the length (in seconds) of the stream.
responses = client.streaming_annotate_video(requests, timeout=600)
responses = client.streaming_annotate_video(requests, timeout=900)

# Each response corresponds to about 1 second of video.
for response in responses:
Expand Down
2 changes: 2 additions & 0 deletions videointelligence/samples/analyze/beta_snippets_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,9 @@ def test_detect_shot_change_streaming(capsys, video_path):
assert "Shot" in out


# Flaky ServiceUnavailable
@pytest.mark.slow
@pytest.mark.flaky(max_runs=3, min_passes=1)
def test_track_objects_streaming(capsys, video_path):
beta_snippets.track_objects_streaming(video_path)

Expand Down

0 comments on commit 79cfb2f

Please sign in to comment.