Skip to content

Commit

Permalink
vision: increase timeout for tests [(#3383)](GoogleCloudPlatform/pyth…
Browse files Browse the repository at this point in the history
  • Loading branch information
nnegrey authored Apr 14, 2020
1 parent a0a7076 commit ebf8ebf
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ def purge_products_in_product_set(
# If force is not set to True, the service raises an exception.
force=force)

operation.result(timeout=120)
operation.result(timeout=300)

print('Deleted products in product set.')
# [END vision_product_search_purge_products_in_product_set]
Expand Down
2 changes: 1 addition & 1 deletion samples/snippets/product_search/product_management.py
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ def purge_orphan_products(project_id, location, force):
# If force is not set to True, the service raises an exception.
force=force)

operation.result(timeout=120)
operation.result(timeout=300)

print('Orphan products deleted.')
# [END vision_product_search_purge_orphan_products]
Expand Down
2 changes: 2 additions & 0 deletions samples/snippets/product_search/product_search_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
# limitations under the License.

import os
from flaky import flaky

from product_search import get_similar_products_file, get_similar_products_uri

Expand All @@ -30,6 +31,7 @@
FILTER = 'style=womens'


@flaky(max_runs=5, min_passes=1)
def test_get_similar_products_file(capsys):
get_similar_products_file(
PROJECT_ID, LOCATION, PRODUCT_SET_ID, PRODUCT_CATEGORY, FILE_PATH_1,
Expand Down
1 change: 1 addition & 0 deletions samples/snippets/product_search/requirements-test.txt
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
pytest==5.3.2
flaky==3.6.1

0 comments on commit ebf8ebf

Please sign in to comment.