feat: add flaky test diagnostic script and fix flaky test#734
Merged
nicain merged 2 commits intogoogleapis:mainfrom Sep 29, 2021
Merged
feat: add flaky test diagnostic script and fix flaky test#734nicain merged 2 commits intogoogleapis:mainfrom
nicain merged 2 commits intogoogleapis:mainfrom
Conversation
nicain
commented
Sep 29, 2021
samples/snippets/helpers.py
Outdated
|
|
||
| def flaky_test_diagnostic(file_name, test_name, N=20): | ||
|
|
||
| import pytest |
Contributor
Author
There was a problem hiding this comment.
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.
nicain
commented
Sep 29, 2021
| 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 |
Contributor
Author
There was a problem hiding this comment.
Max execution time was 215 seconds out of 20 runs xref: #580 (comment)
26679e9 to
c5afe2c
Compare
vinnysenthil
approved these changes
Sep 29, 2021
Contributor
vinnysenthil
left a comment
There was a problem hiding this comment.
Looks good - thanks Nick!
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes ##580