Skip to content

Commit

Permalink
test: add retries to automl language test (#8870)
Browse files Browse the repository at this point in the history
  • Loading branch information
kweinmeister authored Jan 5, 2023
1 parent ee28639 commit 32c74e3
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions automl/snippets/language_entity_extraction_predict_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@

import os

import backoff
from google.api_core.exceptions import InternalServerError
from google.api_core.exceptions import ServiceUnavailable
from google.cloud import automl
import pytest

Expand All @@ -35,6 +38,7 @@ def verify_model_state():
response.result()


@backoff.on_exception(backoff.expo, (InternalServerError, ServiceUnavailable), max_tries=3)
def test_predict(capsys, verify_model_state):
verify_model_state
text = (
Expand Down

0 comments on commit 32c74e3

Please sign in to comment.