Changeset: 9926191dc035 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=9926191dc035
Added Files:
sql/test/2-phase-commit/Tests/TwoPrecommits.stable.err
sql/test/2-phase-commit/Tests/TwoPrecommits.stable.out
sql/test/2-phase-commit/Tests/cleanup.sql
sql/test/2-phase-commit/Tests/cleanup.stable.err
sql/test/2-phase-commit/Tests/cleanup.stable.out
Modified Files:
sql/test/2-phase-commit/Tests/All
sql/test/2-phase-commit/Tests/TwoPrecommits.SQL.py
Branch: 2PC
Log Message:
Extended the tests a bit:
- added a test cleanup.sql at the end of the tests
- extended TwoPrecommits with a concurrent read-only transaction, which is
expected to succeed.
diffs (196 lines):
diff --git a/sql/test/2-phase-commit/Tests/All
b/sql/test/2-phase-commit/Tests/All
--- a/sql/test/2-phase-commit/Tests/All
+++ b/sql/test/2-phase-commit/Tests/All
@@ -29,3 +29,4 @@ PersistBeforePrecommit-2
PersistBeforePrecommitWithRollback-1
PersistBeforePrecommitWithRollback-2
TwoPrecommits
+cleanup
diff --git a/sql/test/2-phase-commit/Tests/TwoPrecommits.SQL.py
b/sql/test/2-phase-commit/Tests/TwoPrecommits.SQL.py
--- a/sql/test/2-phase-commit/Tests/TwoPrecommits.SQL.py
+++ b/sql/test/2-phase-commit/Tests/TwoPrecommits.SQL.py
@@ -34,15 +34,23 @@ run(c1, 'INSERT INTO htmtest VALUES (4,
c2 = connect(False)
run(c2, 'INSERT INTO htmtest VALUES (5, 50)')
-#c3 = connect(False)
-#run(c3, 'INSERT INTO htmtest VALUES (6, 60)')
+c3 = connect(False)
+run(c3, 'SELECT * FROM htmtest')
run(c2, 'CALL precommit(2)')
try:
run(c1, 'CALL precommit(1)')
except:
print "precommit failed\n"
-#run(c3, 'CALL precommit(3)')
+
+try:
+ run(c3, 'CALL precommit(3)')
+except:
+ print "precommit read-only transaction failed\n"
+try:
+ run(c3, 'CALL persistcommit(3)')
+except:
+ print "persistcommit read-only transaction failed\n"
try:
run(c1, 'CALL persistcommit(1)')
diff --git a/sql/test/2-phase-commit/Tests/TwoPrecommits.stable.err
b/sql/test/2-phase-commit/Tests/TwoPrecommits.stable.err
new file mode 100644
--- /dev/null
+++ b/sql/test/2-phase-commit/Tests/TwoPrecommits.stable.err
@@ -0,0 +1,33 @@
+stderr of test 'TwoPrecommits` in directory 'sql/test/2-phase-commit` itself:
+
+
+# 10:38:36 >
+# 10:38:36 > "mserver5" "--debug=10" "--set" "gdk_nr_threads=0" "--set"
"mapi_open=true" "--set" "mapi_port=34670" "--set"
"mapi_usock=/var/tmp/mtest-24164/.s.monetdb.34670" "--set" "monet_prompt="
"--forcemito"
"--dbpath=/Users/jennie/scratch/monet-install/htm/debug/var/MonetDB/mTests_sql_test_2-phase-commit"
+# 10:38:36 >
+
+# builtin opt gdk_dbpath =
/Users/jennie/scratch/monet-install/htm/debug/var/monetdb5/dbfarm/demo
+# builtin opt gdk_debug = 0
+# builtin opt gdk_vmtrim = no
+# builtin opt monet_prompt = >
+# builtin opt monet_daemon = no
+# builtin opt mapi_port = 50000
+# builtin opt mapi_open = false
+# builtin opt mapi_autosense = false
+# builtin opt sql_optimizer = default_pipe
+# builtin opt sql_debug = 0
+# cmdline opt gdk_nr_threads = 0
+# cmdline opt mapi_open = true
+# cmdline opt mapi_port = 34670
+# cmdline opt mapi_usock = /var/tmp/mtest-24164/.s.monetdb.34670
+# cmdline opt monet_prompt =
+# cmdline opt gdk_dbpath =
/Users/jennie/scratch/monet-install/htm/debug/var/MonetDB/mTests_sql_test_2-phase-commit
+# cmdline opt gdk_debug = 536870922
+
+# 10:38:36 >
+# 10:38:36 > "/usr/local/opt/python/bin/python2.7" "TwoPrecommits.SQL.py"
"TwoPrecommits"
+# 10:38:36 >
+
+# 10:38:36 >
+# 10:38:36 > "Done."
+# 10:38:36 >
+
diff --git a/sql/test/2-phase-commit/Tests/TwoPrecommits.stable.out
b/sql/test/2-phase-commit/Tests/TwoPrecommits.stable.out
new file mode 100644
--- /dev/null
+++ b/sql/test/2-phase-commit/Tests/TwoPrecommits.stable.out
@@ -0,0 +1,33 @@
+stdout of test 'TwoPrecommits` in directory 'sql/test/2-phase-commit` itself:
+
+
+# 10:38:36 >
+# 10:38:36 > "mserver5" "--debug=10" "--set" "gdk_nr_threads=0" "--set"
"mapi_open=true" "--set" "mapi_port=34670" "--set"
"mapi_usock=/var/tmp/mtest-24164/.s.monetdb.34670" "--set" "monet_prompt="
"--forcemito"
"--dbpath=/Users/jennie/scratch/monet-install/htm/debug/var/MonetDB/mTests_sql_test_2-phase-commit"
+# 10:38:36 >
+
+# MonetDB 5 server v11.24.0
+# This is an unreleased version
+# Serving database 'mTests_sql_test_2-phase-commit', using 4 threads
+# Compiled for x86_64-apple-darwin15.6.0/64bit with 128bit integers
+# Found 16.000 GiB available main-memory.
+# Copyright (c) 1993-July 2008 CWI.
+# Copyright (c) August 2008-2016 MonetDB B.V., all rights reserved
+# Visit http://www.monetdb.org/ for further information
+# Listening for connection requests on mapi:monetdb://guests-3-234.imdea:34670/
+# Listening for UNIX domain connection requests on
mapi:monetdb:///var/tmp/mtest-24164/.s.monetdb.34670
+# MonetDB/GIS module loaded
+# MonetDB/SQL module loaded
+
+Ready.
+
+# 10:38:36 >
+# 10:38:36 > "/usr/local/opt/python/bin/python2.7" "TwoPrecommits.SQL.py"
"TwoPrecommits"
+# 10:38:36 >
+
+TODO: added expected output here
+
+
+# 10:38:36 >
+# 10:38:36 > "Done."
+# 10:38:36 >
+
diff --git a/sql/test/2-phase-commit/Tests/cleanup.sql
b/sql/test/2-phase-commit/Tests/cleanup.sql
new file mode 100644
--- /dev/null
+++ b/sql/test/2-phase-commit/Tests/cleanup.sql
@@ -0,0 +1,1 @@
+DROP TABLE htmtest;
diff --git a/sql/test/2-phase-commit/Tests/cleanup.stable.err
b/sql/test/2-phase-commit/Tests/cleanup.stable.err
new file mode 100644
--- /dev/null
+++ b/sql/test/2-phase-commit/Tests/cleanup.stable.err
@@ -0,0 +1,34 @@
+stderr of test 'cleanup` in directory 'sql/test/2-phase-commit` itself:
+
+
+# 10:38:00 >
+# 10:38:00 > "mserver5" "--debug=10" "--set" "gdk_nr_threads=0" "--set"
"mapi_open=true" "--set" "mapi_port=30219" "--set"
"mapi_usock=/var/tmp/mtest-24116/.s.monetdb.30219" "--set" "monet_prompt="
"--forcemito"
"--dbpath=/Users/jennie/scratch/monet-install/htm/debug/var/MonetDB/mTests_sql_test_2-phase-commit"
+# 10:38:00 >
+
+# builtin opt gdk_dbpath =
/Users/jennie/scratch/monet-install/htm/debug/var/monetdb5/dbfarm/demo
+# builtin opt gdk_debug = 0
+# builtin opt gdk_vmtrim = no
+# builtin opt monet_prompt = >
+# builtin opt monet_daemon = no
+# builtin opt mapi_port = 50000
+# builtin opt mapi_open = false
+# builtin opt mapi_autosense = false
+# builtin opt sql_optimizer = default_pipe
+# builtin opt sql_debug = 0
+# cmdline opt gdk_nr_threads = 0
+# cmdline opt mapi_open = true
+# cmdline opt mapi_port = 30219
+# cmdline opt mapi_usock = /var/tmp/mtest-24116/.s.monetdb.30219
+# cmdline opt monet_prompt =
+# cmdline opt gdk_dbpath =
/Users/jennie/scratch/monet-install/htm/debug/var/MonetDB/mTests_sql_test_2-phase-commit
+# cmdline opt gdk_debug = 536870922
+
+# 10:38:00 >
+# 10:38:00 > "mclient" "-lsql" "-ftest" "-Eutf-8" "-i" "-e"
"--host=/var/tmp/mtest-24116" "--port=30219"
+# 10:38:00 >
+
+
+# 10:38:00 >
+# 10:38:00 > "Done."
+# 10:38:00 >
+
diff --git a/sql/test/2-phase-commit/Tests/cleanup.stable.out
b/sql/test/2-phase-commit/Tests/cleanup.stable.out
new file mode 100644
--- /dev/null
+++ b/sql/test/2-phase-commit/Tests/cleanup.stable.out
@@ -0,0 +1,32 @@
+stdout of test 'cleanup` in directory 'sql/test/2-phase-commit` itself:
+
+
+# 10:38:00 >
+# 10:38:00 > "mserver5" "--debug=10" "--set" "gdk_nr_threads=0" "--set"
"mapi_open=true" "--set" "mapi_port=30219" "--set"
"mapi_usock=/var/tmp/mtest-24116/.s.monetdb.30219" "--set" "monet_prompt="
"--forcemito"
"--dbpath=/Users/jennie/scratch/monet-install/htm/debug/var/MonetDB/mTests_sql_test_2-phase-commit"
+# 10:38:00 >
+
+# MonetDB 5 server v11.24.0
+# This is an unreleased version
+# Serving database 'mTests_sql_test_2-phase-commit', using 4 threads
+# Compiled for x86_64-apple-darwin15.6.0/64bit with 128bit integers
+# Found 16.000 GiB available main-memory.
+# Copyright (c) 1993-July 2008 CWI.
+# Copyright (c) August 2008-2016 MonetDB B.V., all rights reserved
+# Visit http://www.monetdb.org/ for further information
+# Listening for connection requests on mapi:monetdb://guests-3-234.imdea:30219/
+# Listening for UNIX domain connection requests on
mapi:monetdb:///var/tmp/mtest-24116/.s.monetdb.30219
+# MonetDB/GIS module loaded
+# MonetDB/SQL module loaded
+
+Ready.
+
+# 10:38:00 >
+# 10:38:00 > "mclient" "-lsql" "-ftest" "-Eutf-8" "-i" "-e"
"--host=/var/tmp/mtest-24116" "--port=30219"
+# 10:38:00 >
+
+#DROP TABLE htmtest;
+
+# 10:38:00 >
+# 10:38:00 > "Done."
+# 10:38:00 >
+
_______________________________________________
checkin-list mailing list
[email protected]
https://www.monetdb.org/mailman/listinfo/checkin-list