Skip to content

Commit

Permalink
The attribute connection.dbop is only valid with Oracle 12.1 and higher.
Browse files Browse the repository at this point in the history
  • Loading branch information
anthony-tuininga committed Jan 11, 2018
1 parent ef60884 commit 6a99860
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions test/Connection.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,10 @@ def testAllArgs(self):
def testAttributes(self):
"test connection end-to-end tracing attributes"
connection = cx_Oracle.connect(USERNAME, PASSWORD, TNSENTRY)
self.__VerifyAttributes(connection, "dbop", "cx_OracleTest_DBOP",
"select dbop_name from v$sql_monitor "
"where sid = sys_context('userenv', 'sid')")
if CLIENT_VERSION >= (12, 1):
self.__VerifyAttributes(connection, "dbop", "cx_OracleTest_DBOP",
"select dbop_name from v$sql_monitor "
"where sid = sys_context('userenv', 'sid')")
self.__VerifyAttributes(connection, "action", "cx_OracleTest_Action",
"select sys_context('userenv', 'action') from dual")
self.__VerifyAttributes(connection, "module", "cx_OracleTest_Module",
Expand Down

0 comments on commit 6a99860

Please sign in to comment.