Skip to content

Commit 9987c42

Browse files
authored
swap out timeout for flaky (GoogleCloudPlatform#6539)
## Description We were seeing flaky test failures that I believe are just a quirk of having a long running service. Given that we have an overall test timeout in kokoro of 30 min, I felt that removing this timeout was appropriate and adding a flaky check is a better way to ensure these tests passing. Fixes GoogleCloudPlatform#6478 Fixes GoogleCloudPlatform#6469 Note: It's a good idea to open an issue first for discussion. ## Checklist - [x] I have followed [Sample Guidelines from AUTHORING_GUIDE.MD](https://github.com/GoogleCloudPlatform/python-docs-samples/blob/master/AUTHORING_GUIDE.md) - [x] README is updated to include [all relevant information](https://github.com/GoogleCloudPlatform/python-docs-samples/blob/master/AUTHORING_GUIDE.md#readme-file) - [ ] **Tests** pass: `nox -s py-3.6` (see [Test Environment Setup](https://github.com/GoogleCloudPlatform/python-docs-samples/blob/master/AUTHORING_GUIDE.md#test-environment-setup)) - [x] **Lint** pass: `nox -s lint` (see [Test Environment Setup](https://github.com/GoogleCloudPlatform/python-docs-samples/blob/master/AUTHORING_GUIDE.md#test-environment-setup)) - [ ] These samples need a new **API enabled** in testing projects to pass (let us know which ones) - [ ] These samples need a new/updated **env vars** in testing projects set to pass (let us know which ones) - [x] Please **merge** this PR for me once it is approved. - [ ] This sample adds a new sample directory, and I updated the [CODEOWNERS file](https://github.com/GoogleCloudPlatform/python-docs-samples/blob/master/.github/CODEOWNERS) with the codeowners for this sample
1 parent dbec5ef commit 9987c42

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
pytest==6.2.4
2-
pytest-timeout==1.4.2
2+
flaky==3.7.0

data-science-onramp/vertex-ai/sklearn_test.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ def setup_teardown(
8282
aip_job_client.delete_custom_job(name=shared_state["model_name"]).result()
8383

8484

85-
@pytest.mark.timeout(1800)
85+
@pytest.mark.flaky(max_runs=3, min_passes=1)
8686
def test_sklearn(
8787
setup_teardown: Tuple[storage.bucket.Bucket, aip.JobServiceClient],
8888
shared_state: dict,

data-science-onramp/vertex-ai/tfkeras_test.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ def setup_teardown(
8383
aip_job_client.delete_custom_job(name=shared_state["model_name"]).result()
8484

8585

86-
@pytest.mark.timeout(1800)
86+
@pytest.mark.flaky(max_runs=3, min_passes=1)
8787
def test_tfkeras(
8888
setup_teardown: Tuple[storage.bucket.Bucket, aip.JobServiceClient],
8989
shared_state: dict,

0 commit comments

Comments
 (0)