Thanks to visit codestin.com
Credit goes to github.com

Skip to content

test: reduced time filter length in system tests #161

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

Merged
merged 10 commits into from
Jan 26, 2021

Conversation

daniel-sanche
Copy link
Contributor

@daniel-sanche daniel-sanche commented Jan 25, 2021

CI system tests have been failing for a week now. It looks like a rogue service has been flooding the test project with logs, which made our tests timeout

We fixed the problem on the project side, but I'm also introducing a change here to only query the last 10 minutes of logs. This should avoid similar problems from breaking our tests in the future

@product-auto-label product-auto-label bot added the api: logging Issues related to the googleapis/python-logging API. label Jan 25, 2021
@google-cla google-cla bot added the cla: yes This human has signed the Contributor License Agreement. label Jan 25, 2021
@daniel-sanche daniel-sanche changed the title [DRAFT] fix: added initial delay and backoff [DRAFT] fix: reduced time filter length in system tests Jan 26, 2021
@daniel-sanche daniel-sanche changed the title [DRAFT] fix: reduced time filter length in system tests fix: reduced time filter length in system tests Jan 26, 2021
@daniel-sanche daniel-sanche marked this pull request as ready for review January 26, 2021 23:35
@daniel-sanche daniel-sanche requested review from a team as code owners January 26, 2021 23:35
:rtype: list
:returns: List of all entries consumed.
"""
return list(logger.list_entries())
return list(logger.list_entries(filter_=_time_filter))

Choose a reason for hiding this comment

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

nit: this looks really ugly. Is it a python convention to name variables with underscores as both the prefix and suffix? At least, maybe worth having a space before and after "=" for clarity.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

filter_ is used because fitler is a keyword (I think it's part of the code generation process). Prefix underscores are more standard for internal variables.

Unfortunately we can't add spaces because it wouldn't be accepted by the linter. I think since this is all test code it should be fine though

@busunkim96
Copy link
Contributor

Anything labeled as a fix, feat, or doc gets rolled up to the changelog by release-please. I'd recommend using test: for this PR.

@daniel-sanche daniel-sanche changed the title fix: reduced time filter length in system tests test: reduced time filter length in system tests Jan 26, 2021
@daniel-sanche
Copy link
Contributor Author

Anything labeled as a fix, feat, or doc gets rolled up to the changelog by release-please. I'd recommend using test: for this PR.

Good point. Switched to test:

@daniel-sanche daniel-sanche merged commit b7fd0ed into master Jan 26, 2021
@daniel-sanche daniel-sanche deleted the fix-system-tests branch January 26, 2021 23:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: logging Issues related to the googleapis/python-logging API. cla: yes This human has signed the Contributor License Agreement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants