File tree Expand file tree Collapse file tree
packages/google-auth/tests/transport/aio Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1096,17 +1096,17 @@ async def test_request_cancellation_propagates_and_leaves_mtls_init_running(self
10961096 session = sessions .AsyncAuthorizedSession (mock_creds )
10971097 init_started = asyncio .Event ()
10981098 init_can_finish = asyncio .Event ()
1099+
10991100 async def slow_mtls_init ():
11001101 init_started .set ()
11011102 await init_can_finish .wait ()
11021103 session ._is_mtls = True
1104+
11031105 # Simulate an in-progress mTLS initialization task
11041106 mtls_task = asyncio .create_task (slow_mtls_init ())
11051107 session ._mtls_init_task = mtls_task
11061108 # Launch an in-flight request that awaits the shielded mTLS task
1107- req_task = asyncio .create_task (
1108- session .request ("GET" , "https://example.com" )
1109- )
1109+ req_task = asyncio .create_task (session .request ("GET" , "https://example.com" ))
11101110 # Ensure the mTLS task has started and the request is waiting on it
11111111 await init_started .wait ()
11121112 # Yield to event loop to guarantee session.request has reached await asyncio.shield(...)
You can’t perform that action at this time.
0 commit comments