-
Notifications
You must be signed in to change notification settings - Fork 88
Closed
Labels
questionFurther information is requestedFurther information is requested
Description
- What versions are you using?
Oracle Database 19c
>>> import sys
>>> import platform
>>>
>>> print("platform.platform:", platform.platform())
platform.platform: Windows-11-10.0.22631-SP0
>>> print("sys.maxsize > 2**32:", sys.maxsize > 2**32)
sys.maxsize > 2**32: True
>>> print("platform.python_version:", platform.python_version())
platform.python_version: 3.12.4
>>> import oracledb
>>> print("oracledb.__version__:", oracledb.__version__)
oracledb.__version__: 2.4.1
- Is it an error or a hang or a crash?
It's error. - What error(s) or behavior you are seeing?
Connections remain open in async version if we call .close() just after DPY-4024: call timeout of 60 ms exceeded acquired.
- Does your application call init_oracle_client()?
No, Thin
- Include a runnable Python script that shows the problem.
This test case not succeded.
async def test_5345(self):
"5345 - test connection closing just after call timeout"
for _ in range(1, 10):
conn: AsyncConnection = None
try:
conn = await test_env.get_connection_async()
conn.autocommit = False
conn.call_timeout = 60
conn.action = 'test_5345'
async with conn.cursor() as cursor:
await cursor.execute("begin dbms_lock.sleep(0.05); end;")
await conn.close()
except Exception as e:
await conn.close()
conn = None
await asyncio.sleep(5)
conn2 = await test_env.get_connection_async()
cursor2 = conn2.cursor()
await cursor2.execute("""select count(*) from v$session where action = :1""", ['test_5345'])
self.assertEqual(await cursor2.fetchone(), (0,))
Create schema as it is creted in tests. Test in sync mode don't have such a error.
def test_1146(self):
"1146 - test connection closing just after call timeout"
for _ in range(1, 10):
conn: oracledb.Connection = None
try:
conn = test_env.get_connection()
conn.autocommit = False
conn.call_timeout = 60
conn.action = 'test_1146'
with conn.cursor() as cursor:
cursor.execute("begin dbms_lock.sleep(0.05); end;")
conn.close()
except Exception as e:
conn.close()
conn = None
conn2 = test_env.get_connection()
cursor2 = conn2.cursor()
cursor2.execute("""select count(*) from v$session where action = :1""", ['test_5345'])
self.assertEqual(cursor2.fetchone(), (0,))
Metadata
Metadata
Assignees
Labels
questionFurther information is requestedFurther information is requested