Changeset: f8838596f8c9 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB/rev/f8838596f8c9 Modified Files: sql/odbc/tests/Tests/ODBCconnect.py Branch: Aug2024 Log Message:
Test that settings do not leak into next connection when a handle is reused diffs (41 lines): diff --git a/sql/odbc/tests/Tests/ODBCconnect.py b/sql/odbc/tests/Tests/ODBCconnect.py --- a/sql/odbc/tests/Tests/ODBCconnect.py +++ b/sql/odbc/tests/Tests/ODBCconnect.py @@ -15,6 +15,7 @@ import atexit import os +import shlex import subprocess import sys @@ -37,7 +38,7 @@ class Execution: self.checks = [] def report(self): - parts = [f'COMMAND: {self.cmd}', + parts = [f'COMMAND: {shlex.join(self.cmd)}', f'EXIT CODE: {self.proc.returncode}', ''] if self.proc.stdout: parts += [ @@ -201,6 +202,20 @@ ex.expect('OK') # connect succee ex.expect('RESULT') # rollback succeeds ex.end() +# test that configuration does not leak to next connection when handle is reused +ex = Execution('-d', + '-q', 'select remark from sys.sessions where sessionid = current_sessionid()', + f'DSN={dsn};Client Remark=banana', + f'DSN={dsn}' +) +ex.expect('OK') +ex.expect('RESULT') +ex.expect('- banana;') # as set by Client Remark property +ex.expect('OK') +ex.expect('RESULT') +ex.expect('- ;') # this connection did not have a Client Remark +ex.end() + # Test browsing _______________________________________________ checkin-list mailing list -- checkin-list@monetdb.org To unsubscribe send an email to checkin-list-le...@monetdb.org