Skip to content

Commit 047afc9

Browse files
committed
test(oauth): require concurrent refresh lock contention
1 parent c180fac commit 047afc9

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

tests/client/test_auth.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2179,6 +2179,9 @@ async def drive_flow_b() -> None:
21792179

21802180
async with anyio.create_task_group() as task_group:
21812181
task_group.start_soon(drive_flow_b)
2182+
with anyio.fail_after(5):
2183+
while oauth_provider.context.flow_lock.statistics().tasks_waiting == 0:
2184+
await anyio.sleep(0)
21822185

21832186
refresh_response = httpx.Response(
21842187
200,

0 commit comments

Comments
 (0)