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
Fix OAuth auth flow tests to properly close async generators
The retry logic fix in PR-1206 moved the final request yield inside the OAuth
flow block, which now correctly retries requests after OAuth completion.
However, the existing tests didn't expect this final yield and would exit
the generator early, causing a GeneratorExit exception while the async lock
was still held. This resulted in RuntimeError: The current task is not
holding this lock.
Fix by properly closing the generators in both failing tests:
- test_oauth_discovery_fallback_conditions
- test_auth_flow_with_no_tokens
Both tests now send a final success response to properly complete the
auth flow generator and prevent the lock release error.
0 commit comments