Skip to content

Commit f6d80a9

Browse files
munkhuushmglleahecole
authored andcommitted
chore: another flaky test for video beta samples (#91)
* chore: another flaky test for video beta samples * changed it to timeout
1 parent 021284e commit f6d80a9

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

videointelligence/samples/analyze/beta_snippets.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@
4545
import io
4646

4747

48-
def speech_transcription(input_uri):
48+
def speech_transcription(input_uri, timeout=180):
4949
# [START video_speech_transcription_gcs_beta]
5050
"""Transcribe speech from a video stored on GCS."""
5151
from google.cloud import videointelligence_v1p1beta1 as videointelligence
@@ -69,7 +69,7 @@ def speech_transcription(input_uri):
6969

7070
print("\nProcessing video for speech transcription.")
7171

72-
result = operation.result(timeout=180)
72+
result = operation.result(timeout)
7373

7474
# There is only one annotation_result since only
7575
# one video is processed.

videointelligence/samples/analyze/beta_snippets_test.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ def delete_bucket():
7373
@pytest.mark.slow
7474
def test_speech_transcription(capsys):
7575
beta_snippets.speech_transcription(
76-
"gs://python-docs-samples-tests/video/googlework_short.mp4"
76+
"gs://python-docs-samples-tests/video/googlework_short.mp4", timeout=240
7777
)
7878
out, _ = capsys.readouterr()
7979
assert "cultural" in out

0 commit comments

Comments
 (0)