File tree Expand file tree Collapse file tree 3 files changed +4
-12
lines changed
google/cloud/alloydbconnector Expand file tree Collapse file tree 3 files changed +4
-12
lines changed Original file line number Diff line number Diff line change @@ -383,23 +383,14 @@ def close(self) -> None:
383383 self .close_async (), loop = self ._loop
384384 )
385385 # Will attempt to gracefully shut down tasks for 3s
386- print ("RISHABH DEBUG: before calling close_async()" )
387386 close_future .result (timeout = 3 )
388- else :
389- print ("RISHABH DEBUG: loop is not running 1" )
390387 # if background thread exists for Connector, clean it up
391388 if self ._thread .is_alive ():
392389 if self ._loop .is_running ():
393390 # stop event loop running in background thread
394- print ("RISHABH DEBUG: before calling call_soon_threadsafe()" )
395391 self ._loop .call_soon_threadsafe (self ._loop .stop )
396- else :
397- print ("RISHABH DEBUG: loop is not running 2" )
398392 # wait for thread to finish closing (i.e. loop to stop)
399- print ("RISHABH DEBUG: before calling thread.join()" )
400393 self ._thread .join ()
401- else :
402- print ("RISHABH DEBUG: thread is not alive" )
403394 self ._closed = True
404395
405396 async def close_async (self ) -> None :
Original file line number Diff line number Diff line change @@ -11,7 +11,10 @@ psycopg2-binary==2.9.9; python_version == "3.9" and sys_platform == "darwin"
1111psycopg2-binary==2.9.10; python_version != "3.9" or sys_platform != "darwin"
1212
1313pytest==8.4.0
14- pytest-asyncio==1.0.0
14+
15+ pytest-asyncio==0.26.0; python_version == "3.9" and sys_platform == "win32"
16+ pytest-asyncio==1.0.0; python_version != "3.9" or sys_platform != "win32"
17+
1518pytest-cov==6.1.1
1619pytest-aiohttp==1.1.0
1720SQLAlchemy[asyncio]==2.0.41
Original file line number Diff line number Diff line change @@ -241,8 +241,6 @@ def test_Connector_close_called_multiple_times(credentials: FakeCredentials) ->
241241 # check that connector thread is no longer running
242242 assert connector ._thread .is_alive () is False
243243 # call connector.close a second time
244- assert connector ._loop .is_running () is False
245- print ("RISHABH DEBUG: before calling close() a second time" )
246244 connector .close ()
247245
248246
You can’t perform that action at this time.
0 commit comments