Changeset: 983b8d3f87ef for MonetDB URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=983b8d3f87ef Removed Files: sql/test/BugTracker-2009/Tests/set_history_and_drop_table.SF-2607045.SQL.py sql/test/BugTracker-2009/Tests/set_history_and_drop_table.SF-2607045.stable.err sql/test/BugTracker-2009/Tests/set_history_and_drop_table.SF-2607045.stable.out Modified Files: sql/test/BugTracker-2009/Tests/All sql/test/BugTracker-2009/Tests/create_on_ro_db_crash.SF-2830238.SQL.py sql/test/BugTracker-2009/Tests/create_on_ro_db_crash.SF-2830238.stable.err sql/test/BugTracker-2009/Tests/create_on_ro_db_crash.SF-2830238.stable.out sql/test/BugTracker-2009/Tests/lost_update.SF-2790020.SQL.py sql/test/BugTracker-2009/Tests/lost_update.SF-2790020.stable.err sql/test/BugTracker-2009/Tests/lost_update.SF-2790020.stable.out sql/test/BugTracker-2009/Tests/parallel_bulk-load.SF-2771052.unpack_csv.py sql/test/BugTracker-2009/Tests/parallel_bulk-load.SF-2771052.unpack_csv.stable.out Branch: mtest Log Message:
Silencing more Python tests and removed unused set_history_and_drop_table.SF-2607045 test (it's files are now missing) diffs (truncated from 747 to 300 lines): diff --git a/sql/test/BugTracker-2009/Tests/All b/sql/test/BugTracker-2009/Tests/All --- a/sql/test/BugTracker-2009/Tests/All +++ b/sql/test/BugTracker-2009/Tests/All @@ -27,7 +27,6 @@ rollback_bug update-crash correlated-selection-bug row_number_bug.SF-2546109 -#set_history_and_drop_table.SF-2607045 not relevant anymore TypeException_having_count_distinct.SF-2494227 insert_into_done_by_procedure.SF-2607293 decimal_needs_truncation.SF-2605686 diff --git a/sql/test/BugTracker-2009/Tests/create_on_ro_db_crash.SF-2830238.SQL.py b/sql/test/BugTracker-2009/Tests/create_on_ro_db_crash.SF-2830238.SQL.py --- a/sql/test/BugTracker-2009/Tests/create_on_ro_db_crash.SF-2830238.SQL.py +++ b/sql/test/BugTracker-2009/Tests/create_on_ro_db_crash.SF-2830238.SQL.py @@ -1,4 +1,6 @@ -import os, socket, sys, tempfile +import os, socket, tempfile + +from MonetDBtesting.sqltest import SQLTestCase try: from MonetDBtesting import process except ImportError: @@ -12,15 +14,6 @@ def freeport(): return port myport = freeport() -def client(input): - c = process.client('sql', port=myport, dbname='db1', stdin=process.PIPE, stdout=process.PIPE, stderr=process.PIPE) - out, err = c.communicate(input) - sys.stdout.write(out) - sys.stderr.write(err) - -script1 = '''\ -create table t2 (a int); -''' with tempfile.TemporaryDirectory() as farm_dir: os.mkdir(os.path.join(farm_dir, 'db1')) @@ -29,15 +22,13 @@ with tempfile.TemporaryDirectory() as fa dbfarm=os.path.join(farm_dir, 'db1'), stdin=process.PIPE, stdout=process.PIPE, stderr=process.PIPE) as s: - out, err = s.communicate() - sys.stdout.write(out) - sys.stderr.write(err) + s.communicate() with process.server(mapiport=myport, dbname='db1', dbfarm=os.path.join(farm_dir, 'db1'), args=["--set", "gdk_readonly=yes"], stdin=process.PIPE, stdout=process.PIPE, stderr=process.PIPE) as s: - client(script1) - out, err = s.communicate() - sys.stdout.write(out) - sys.stderr.write(err) + with SQLTestCase() as tc: + tc.connect(username="monetdb", password="monetdb", port=myport, database='db1') + tc.execute("create table t2 (a int);").assertFailed(err_message="Schema statements cannot be executed on a readonly database.") + s.communicate() diff --git a/sql/test/BugTracker-2009/Tests/create_on_ro_db_crash.SF-2830238.stable.err b/sql/test/BugTracker-2009/Tests/create_on_ro_db_crash.SF-2830238.stable.err --- a/sql/test/BugTracker-2009/Tests/create_on_ro_db_crash.SF-2830238.stable.err +++ b/sql/test/BugTracker-2009/Tests/create_on_ro_db_crash.SF-2830238.stable.err @@ -5,61 +5,6 @@ stderr of test 'create_on_ro_db_crash.SF # 21:37:20 > /usr/bin/python create_on_ro_db_crash.SF-2830238.py create_on_ro_db_crash.SF-2830238 # 21:37:20 > -MAPI = (monetdb) /var/tmp/mtest-27483/.s.monetdb.35395 -QUERY = create table t2 (a int); -ERROR = !Schema statements cannot be executed on a readonly database. -CODE = 25006 -# builtin opt gdk_dbpath = /ufs/sjoerd/@Monet-candidate/var/monetdb5/dbfarm/demo -# builtin opt gdk_debug = 0 -# builtin opt gdk_alloc_map = no -# builtin opt gdk_vmtrim = yes -# builtin opt monet_admin = adm -# builtin opt monet_prompt = > -# builtin opt monet_welcome = yes -# builtin opt monet_mod_path = ${exec_prefix}/lib/MonetDB -# builtin opt monet_daemon = yes -# builtin opt host = localhost -# builtin opt mapi_port = 50000 -# builtin opt mapi_noheaders = no -# builtin opt mapi_debug = 0 -# builtin opt mapi_clients = 2 -# builtin opt sql_debug = 0 -# builtin opt standoff_ns = http://monetdb.cwi.nl/standoff -# builtin opt standoff_start = start -# builtin opt standoff_end = end -# config opt prefix = /ufs/niels/scratch/rc/Linux-x86_64 -# config opt config = ${prefix}/etc/monetdb5.conf -# config opt prefix = /ufs/niels/scratch/rc/Linux-x86_64 -# config opt exec_prefix = ${prefix} -# config opt gdk_dbfarm = ${prefix}/var/MonetDB5/dbfarm -# config opt gdk_dbname = demo -# config opt gdk_alloc_map = no -# config opt gdk_embedded = no -# config opt gdk_debug = 0 -# config opt monet_mod_path = ${exec_prefix}/lib/MonetDB5:${exec_prefix}/lib/MonetDB5/lib:${exec_prefix}/lib/MonetDB5/bin -# config opt monet_daemon = no -# config opt monet_welcome = yes -# config opt mero_msglog = ${prefix}/var/log/MonetDB/merovingian.log -# config opt mero_errlog = ${prefix}/var/log/MonetDB/merovingian.log -# config opt mero_pidfile = ${prefix}/var/run/MonetDB/merovingian.pid -# config opt mal_init = ${exec_prefix}/lib/MonetDB5/mal_init.mal -# config opt mal_listing = 2 -# config opt mapi_port = 50000 -# config opt mapi_autosense = false -# config opt mapi_open = false -# config opt sql_optimizer = inline,remap,evaluate,costModel,coercions,emptySet,aliases,mergetable,deadcode,constants,commonTerms,joinPath,deadcode,reduce,garbageCollector,dataflow,history,multiplex -# cmdline opt config = /ufs/niels/scratch/rc/Linux-x86_64/etc/monetdb5.conf -# cmdline opt gdk_nr_threads = 0 -# cmdline opt monet_mod_path = /ufs/niels/scratch/rc/Linux-x86_64/lib/MonetDB5:/ufs/niels/scratch/rc/Linux-x86_64/lib/MonetDB5/lib:/ufs/niels/scratch/rc/Linux-x86_64/lib/MonetDB5/bin -# cmdline opt gdk_dbfarm = /ufs/niels/scratch/rc/Linux-x86_64/var/MonetDB5/dbfarm -# cmdline opt mapi_open = true -# cmdline opt xrpc_open = true -# cmdline opt mapi_port = 39382 -# cmdline opt xrpc_port = 41903 -# cmdline opt monet_prompt = -# cmdline opt gdk_readonly = yes -#warning: please don't forget to set your vault key! -#(see /ufs/niels/scratch/rc/Linux-x86_64/etc/monetdb5.conf) # 21:37:20 > # 21:37:20 > Done. diff --git a/sql/test/BugTracker-2009/Tests/create_on_ro_db_crash.SF-2830238.stable.out b/sql/test/BugTracker-2009/Tests/create_on_ro_db_crash.SF-2830238.stable.out --- a/sql/test/BugTracker-2009/Tests/create_on_ro_db_crash.SF-2830238.stable.out +++ b/sql/test/BugTracker-2009/Tests/create_on_ro_db_crash.SF-2830238.stable.out @@ -5,15 +5,6 @@ stdout of test 'create_on_ro_db_crash.SF # 21:37:20 > /usr/bin/python create_on_ro_db_crash.SF-2830238.py create_on_ro_db_crash.SF-2830238 # 21:37:20 > -# MonetDB server v5.14.0, based on kernel v1.32.0 -# Serving database 'demo', using 4 threads -# Compiled for x86_64-unknown-linux-gnu/64bit with 64bit OIDs dynamically linked -# Copyright (c) 1993-July 2008 CWI. -# Copyright (c) August 2008-2009 MonetDB B.V., all rights reserved -# Visit http://monetdb.cwi.nl/ for further information -# Listening for connection requests on mapi:monetdb://alf.ins.cwi.nl:39382/ -# MonetDB/SQL module v2.32.0 loaded - # 21:37:20 > # 21:37:20 > Done. diff --git a/sql/test/BugTracker-2009/Tests/lost_update.SF-2790020.SQL.py b/sql/test/BugTracker-2009/Tests/lost_update.SF-2790020.SQL.py --- a/sql/test/BugTracker-2009/Tests/lost_update.SF-2790020.SQL.py +++ b/sql/test/BugTracker-2009/Tests/lost_update.SF-2790020.SQL.py @@ -1,5 +1,6 @@ -import sys, os, socket, sys, tempfile +import os, socket, tempfile +from MonetDBtesting.sqltest import SQLTestCase try: from MonetDBtesting import process except ImportError: @@ -20,61 +21,47 @@ class server(process.server): stdout=process.PIPE, stderr=process.PIPE) def server_stop(self): - out, err = self.communicate() - sys.stdout.write(out) - sys.stderr.write(err) - -def client(input): - with process.client('sql', port=myport, dbname='db1', stdin=process.PIPE, - stdout=process.PIPE, stderr=process.PIPE) as c: - out, err = c.communicate(input) - sys.stdout.write(out) - sys.stderr.write(err) - -script1 = '''\ -create table lost_update_t2 (a int); -insert into lost_update_t2 values (1); -update lost_update_t2 set a = 2; -''' -script2 = '''\ -update lost_update_t2 set a = 3; -create table lost_update_t1 (a int); -insert into lost_update_t1 values (1); -insert into lost_update_t1 (select * from lost_update_t1); -insert into lost_update_t1 (select * from lost_update_t1); -insert into lost_update_t1 (select * from lost_update_t1); -insert into lost_update_t1 (select * from lost_update_t1); -insert into lost_update_t1 (select * from lost_update_t1); -insert into lost_update_t1 (select * from lost_update_t1); -insert into lost_update_t1 (select * from lost_update_t1); -insert into lost_update_t1 (select * from lost_update_t1); -insert into lost_update_t1 (select * from lost_update_t1); -insert into lost_update_t1 (select * from lost_update_t1); -insert into lost_update_t1 (select * from lost_update_t1); -update lost_update_t1 set a = 2; -call sys.flush_log(); -''' -script3 = '''\ -select a from lost_update_t2; -''' -cleanup = '''\ -drop table lost_update_t1; -drop table lost_update_t2; -''' + self.communicate() myport = freeport() with tempfile.TemporaryDirectory() as farm_dir: os.mkdir(os.path.join(farm_dir, 'db1')) with server() as s: - client(script1) - s.server_stop() - with server() as s: - client(script2) + with SQLTestCase() as tc: + tc.connect(username="monetdb", password="monetdb", port=myport, database="db1") + tc.execute("create table lost_update_t2 (a int);").assertSucceeded() + tc.execute("insert into lost_update_t2 values (1);").assertSucceeded().assertRowCount(1) + tc.execute("update lost_update_t2 set a = 2;").assertSucceeded().assertRowCount(1) s.server_stop() with server() as s: - client(script3) + with SQLTestCase() as tc: + tc.connect(username="monetdb", password="monetdb", port=myport, database="db1") + tc.execute("update lost_update_t2 set a = 3;").assertSucceeded().assertRowCount(1) + tc.execute("create table lost_update_t1 (a int);").assertSucceeded() + tc.execute("insert into lost_update_t1 values (1);").assertSucceeded().assertRowCount(1) + tc.execute("insert into lost_update_t1 (select * from lost_update_t1);").assertSucceeded().assertRowCount(1) + tc.execute("insert into lost_update_t1 (select * from lost_update_t1);").assertSucceeded().assertRowCount(2) + tc.execute("insert into lost_update_t1 (select * from lost_update_t1);").assertSucceeded().assertRowCount(4) + tc.execute("insert into lost_update_t1 (select * from lost_update_t1);").assertSucceeded().assertRowCount(8) + tc.execute("insert into lost_update_t1 (select * from lost_update_t1);").assertSucceeded().assertRowCount(16) + tc.execute("insert into lost_update_t1 (select * from lost_update_t1);").assertSucceeded().assertRowCount(32) + tc.execute("insert into lost_update_t1 (select * from lost_update_t1);").assertSucceeded().assertRowCount(64) + tc.execute("insert into lost_update_t1 (select * from lost_update_t1);").assertSucceeded().assertRowCount(128) + tc.execute("insert into lost_update_t1 (select * from lost_update_t1);").assertSucceeded().assertRowCount(256) + tc.execute("insert into lost_update_t1 (select * from lost_update_t1);").assertSucceeded().assertRowCount(512) + tc.execute("insert into lost_update_t1 (select * from lost_update_t1);").assertSucceeded().assertRowCount(1024) + tc.execute("update lost_update_t1 set a = 2;").assertSucceeded().assertRowCount(2048) + tc.execute("call sys.flush_log();").assertSucceeded() s.server_stop() with server() as s: - client(cleanup) + with SQLTestCase() as tc: + tc.connect(username="monetdb", password="monetdb", port=myport, database="db1") + tc.execute("select a from lost_update_t2;").assertSucceeded().assertRowCount(1).assertDataResultMatch([(3,)]) s.server_stop() + with server() as s: + with SQLTestCase() as tc: + tc.connect(username="monetdb", password="monetdb", port=myport, database="db1") + tc.execute("drop table lost_update_t1;").assertSucceeded() + tc.execute("drop table lost_update_t2;").assertSucceeded() + s.server_stop() diff --git a/sql/test/BugTracker-2009/Tests/lost_update.SF-2790020.stable.err b/sql/test/BugTracker-2009/Tests/lost_update.SF-2790020.stable.err --- a/sql/test/BugTracker-2009/Tests/lost_update.SF-2790020.stable.err +++ b/sql/test/BugTracker-2009/Tests/lost_update.SF-2790020.stable.err @@ -5,242 +5,6 @@ stderr of test 'lost_update.SF-2790020` # 14:42:32 > /usr/bin/python lost_update.SF-2790020.py lost_update.SF-2790020 # 14:42:32 > -# builtin opt gdk_arch = 64bitx86_64-unknown-linux-gnu -# builtin opt gdk_version = 1.30.0 -# builtin opt prefix = /ufs/sjoerd/Monet-virgin-stable -# builtin opt exec_prefix = ${prefix} -# builtin opt gdk_dbname = tst -# builtin opt gdk_dbfarm = ${prefix}/var/MonetDB -# builtin opt gdk_debug = 8 -# builtin opt gdk_alloc_map = yes -# builtin opt gdk_vmtrim = yes -# builtin opt monet_admin = adm -# builtin opt monet_prompt = > -# builtin opt monet_welcome = yes -# builtin opt monet_mod_path = ${prefix}/lib64/MonetDB -# builtin opt monet_daemon = yes -# builtin opt host = localhost -# builtin opt mapi_port = 50000 -# builtin opt mapi_noheaders = no -# builtin opt mapi_debug = 0 -# builtin opt mapi_clients = 2 -# builtin opt sql_debug = 0 -# builtin opt sql_logdir = sql_logs -# builtin opt xquery_logdir = xquery_logs -# builtin opt standoff_ns = http://monetdb.cwi.nl/standoff -# builtin opt standoff_start = start -# builtin opt standoff_end = end -# config opt prefix = /ufs/sjoerd/Monet-virgin-stable -# config opt config = ${prefix}/etc/monetdb5.conf -# config opt prefix = /ufs/sjoerd/Monet-virgin-stable -# config opt exec_prefix = ${prefix} -# config opt gdk_dbfarm = ${prefix}/var/MonetDB5/dbfarm -# config opt gdk_dbname = demo -# config opt gdk_alloc_map = no -# config opt gdk_embedded = no -# config opt gdk_debug = 0 -# config opt monet_mod_path = ${prefix}/lib64/MonetDB5:${prefix}/lib64/MonetDB5/lib:${prefix}/lib64/MonetDB5/bin -# config opt monet_daemon = no -# config opt monet_welcome = yes -# config opt mero_msglog = ${prefix}/var/log/MonetDB/merovingian.log -# config opt mero_errlog = ${prefix}/var/log/MonetDB/merovingian.log -# config opt mero_pidfile = ${prefix}/var/run/MonetDB/merovingian.pid -# config opt mero_exittimeout = 7 -# config opt mero_doproxy = yes -# config opt mero_discoveryttl = 600 -# config opt mal_init = ${prefix}/lib64/MonetDB5/mal_init.mal _______________________________________________ checkin-list mailing list checkin-list@monetdb.org https://www.monetdb.org/mailman/listinfo/checkin-list