Skip to content

Commit b13c998

Browse files
Timed waits for acquiring a session from a session pool is only available in
Oracle 12.2 and higher.
1 parent 551204e commit b13c998

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

test/SessionPool.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,8 +68,9 @@ def testPool(self):
6868
self.assertEqual(pool.busy, 1, "busy not 1 after del")
6969
pool.getmode = cx_Oracle.SPOOL_ATTRVAL_NOWAIT
7070
self.assertEqual(pool.getmode, cx_Oracle.SPOOL_ATTRVAL_NOWAIT)
71-
pool.getmode = cx_Oracle.SPOOL_ATTRVAL_TIMEDWAIT
72-
self.assertEqual(pool.getmode, cx_Oracle.SPOOL_ATTRVAL_TIMEDWAIT)
71+
if CLIENT_VERSION >= (12, 2):
72+
pool.getmode = cx_Oracle.SPOOL_ATTRVAL_TIMEDWAIT
73+
self.assertEqual(pool.getmode, cx_Oracle.SPOOL_ATTRVAL_TIMEDWAIT)
7374
pool.stmtcachesize = 50
7475
self.assertEqual(pool.stmtcachesize, 50)
7576
pool.timeout = 10

0 commit comments

Comments
 (0)