Changeset: 1949c318ec40 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB/rev/1949c318ec40 Added Files: sql/test/BugTracker-2021/Tests/shutdown-force.Bug-7167.SQL.py Modified Files: sql/test/BugTracker-2021/Tests/All Branch: Jul2021 Log Message:
Added test for bug #7167 diffs (39 lines): diff --git a/sql/test/BugTracker-2021/Tests/All b/sql/test/BugTracker-2021/Tests/All --- a/sql/test/BugTracker-2021/Tests/All +++ b/sql/test/BugTracker-2021/Tests/All @@ -24,3 +24,4 @@ sum-union.Bug-7147 distinct-union.Bug-7148 HAVE_LIBPY3?python-aggregates-empty.Bug-7158 remote-join-idxs.Bug-7165 +shutdown-force.Bug-7167 diff --git a/sql/test/BugTracker-2021/Tests/shutdown-force.Bug-7167.SQL.py b/sql/test/BugTracker-2021/Tests/shutdown-force.Bug-7167.SQL.py new file mode 100644 --- /dev/null +++ b/sql/test/BugTracker-2021/Tests/shutdown-force.Bug-7167.SQL.py @@ -0,0 +1,26 @@ +import os, socket, tempfile, sys + +from MonetDBtesting.sqltest import SQLTestCase +try: + from MonetDBtesting import process +except ImportError: + import process + +def freeport(): + sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM) + sock.bind(('', 0)) + port = sock.getsockname()[1] + sock.close() + return port + +myport = freeport() + +with tempfile.TemporaryDirectory() as farm_dir: + os.mkdir(os.path.join(farm_dir, 'db1')) + with process.server(mapiport=myport, dbname='db1', dbfarm=os.path.join(farm_dir, 'db1'), + stdin=process.PIPE, stdout=process.PIPE, stderr=process.PIPE) as srv: + with SQLTestCase() as tc: + tc.connect(username="monetdb", password="monetdb", port=myport, database='db1') + tc.execute("call sys.shutdown(1, true);") + out, err = srv.communicate() + sys.stderr.write(err) _______________________________________________ checkin-list mailing list checkin-list@monetdb.org https://www.monetdb.org/mailman/listinfo/checkin-list