-
Notifications
You must be signed in to change notification settings - Fork 6
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
integration/conftest: try to set event_loop on failure #851
Conversation
yield loop | ||
loop.close() | ||
except Exception as e: # pylint: disable=broad-except | ||
if "there is no current event loop in thread" in str(e): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would it be useful to log that this happened before the extra handling just in case for troubleshooting?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sounds good, i'll add a log line!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good findings! I saw this error before too. Would be great if this can prevent that from happening again.
Description
There's a bunch of errors of the form
RuntimeError: There is no current event loop in thread 'Dummy-1'.
that pop up once in a while on failing integration tests.Example: https://github.com/featurebyte/featurebyte/actions/runs/4320831275/jobs/7541472752
Some googling suggests we can try to avoid this by having some extra handling around the event loop fixture.
Related links
I don't think this necessarily solves the underlying issue, but figured it might be worth a try to try to make a short-term patch to alleviate some flaky integration tests.
Related Issue
Type of Change
Label this pull request to place it under the correct category in Release Notes:
enhancement
,feature
bug
,refactoring
,bugfix
,fix
build
,ci
,testing
breaking
documentation
dependencies
Checklist
CODE_OF_CONDUCT.md
andCONTRIBUTING.md
guides.