Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add flaky test diagnostic script and fix flaky test #734

Merged
merged 2 commits into from Sep 29, 2021

Conversation

nicain
Copy link
Contributor

@nicain nicain commented Sep 29, 2021

Fixes ##580

@product-auto-label product-auto-label bot added the api: aiplatform Issues related to the AI Platform API. label Sep 29, 2021
@google-cla google-cla bot added the cla: yes This human has signed the Contributor License Agreement. label Sep 29, 2021

def flaky_test_diagnostic(file_name, test_name, N=20):

import pytest
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the only non-standard-library dependency for this helper function, so I am hiding the import in here so that pytest does not become a dependency for the whole module. I can also inject the module as an arg, or not worry about pytest as a dependency of the module at put it top-level.

@@ -34,6 +34,9 @@ def teardown(teardown_training_pipeline):

def test_ucaip_generated_create_training_pipeline_sample(capsys, shared_state):

# The return of the cancellation can be flaky; max of 20 runs was 215 sec.
shared_state["cancel_batch_prediction_job_timeout"] = 300
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Max execution time was 215 seconds out of 20 runs xref: #580 (comment)

@nicain nicain force-pushed the issue/580 branch 2 times, most recently from 26679e9 to c5afe2c Compare September 29, 2021 20:22
@nicain nicain marked this pull request as ready for review September 29, 2021 20:36
@nicain nicain requested review from a team as code owners September 29, 2021 20:36
@nicain nicain requested a review from parthea September 29, 2021 20:36
Copy link
Contributor

@vinnysenthil vinnysenthil left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good - thanks Nick!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: aiplatform Issues related to the AI Platform API. cla: yes This human has signed the Contributor License Agreement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants