You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is part of fixing the failed tests in
#19545
The async tests previously used many invocations of `asyncio.run`, which
likely caused issues with event loop management. The documentation for
`asyncio.run` states:
> This function cannot be called when another asyncio event loop is
running in the same thread. ...
> This function should be used as a main entry point for asyncio
programs, and should ideally only be called once.
Calling `asyncio.run` multiple times could cause the test processes to
hang for strange event loop reasons. This commit converts most test
cases to be run in a single event loop managed by the default driver,
which is now async aware.
Not all tests could be converted, e.g. the test that runs an async
function in a sync context. However, the test suite does succeed with
these changes, and these tests can be further modified if needed.
0 commit comments