Skip to content

Commit

Permalink
chore: another flaky test for video beta samples (#91)
Browse files Browse the repository at this point in the history
* chore: another flaky test for video beta samples

* changed it to timeout
  • Loading branch information
munkhuushmgl authored Dec 21, 2020
1 parent ba875f2 commit ac8b1c3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
import io


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

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

result = operation.result(timeout=180)
result = operation.result(timeout)

# There is only one annotation_result since only
# one video is processed.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ def delete_bucket():
@pytest.mark.slow
def test_speech_transcription(capsys):
beta_snippets.speech_transcription(
"gs://python-docs-samples-tests/video/googlework_short.mp4"
"gs://python-docs-samples-tests/video/googlework_short.mp4", timeout=240
)
out, _ = capsys.readouterr()
assert "cultural" in out
Expand Down

0 comments on commit ac8b1c3

Please sign in to comment.