Changeset: 8baea6156606 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=8baea6156606
Added Files:
        sql/test/wlcr/Tests/wlc01.py
        sql/test/wlcr/Tests/wlc01.stable.err
        sql/test/wlcr/Tests/wlc01.stable.out
        sql/test/wlcr/Tests/wlc20.py
        sql/test/wlcr/Tests/wlc20.stable.err
        sql/test/wlcr/Tests/wlc20.stable.out
        sql/test/wlcr/Tests/wlc21.py
        sql/test/wlcr/Tests/wlc21.stable.err
        sql/test/wlcr/Tests/wlc21.stable.out
        sql/test/wlcr/Tests/wlc30.py
        sql/test/wlcr/Tests/wlc30.stable.err
        sql/test/wlcr/Tests/wlc30.stable.out
        sql/test/wlcr/Tests/wlr01.py
        sql/test/wlcr/Tests/wlr01.reqtests
        sql/test/wlcr/Tests/wlr20.py
        sql/test/wlcr/Tests/wlr20.reqtests
        sql/test/wlcr/Tests/wlr30.py
        sql/test/wlcr/Tests/wlr30.reqtests
Removed Files:
        sql/test/wlcr/Tests/wlcr1.py
        sql/test/wlcr/Tests/wlcr1.stable.err
        sql/test/wlcr/Tests/wlcr1.stable.out
        sql/test/wlcr/Tests/wlcr2.py
        sql/test/wlcr/Tests/wlcr2.reqtests
        sql/test/wlcr/Tests/wlcr2.stable.err
        sql/test/wlcr/Tests/wlcr2.stable.out
        sql/test/wlcr/Tests/wlcr3.py
        sql/test/wlcr/Tests/wlcr3.reqtests
        sql/test/wlcr/Tests/wlcr4.py
Modified Files:
        sql/test/wlcr/Tests/All
Branch: wlcr
Log Message:

The test scenario of multiple steps


diffs (truncated from 1081 to 300 lines):

diff --git a/sql/test/wlcr/Tests/All b/sql/test/wlcr/Tests/All
--- a/sql/test/wlcr/Tests/All
+++ b/sql/test/wlcr/Tests/All
@@ -1,4 +1,19 @@
-wlcr1
-wlcr2
-wlcr3
-wlcr4
+# This  is a scenario for continual replication
+# first create a master with some data
+wlc01
+
+# create the replica synchronized with the master
+wlr01
+
+# add two sets of tuples to the master
+wlc20
+wlc21
+
+#and automatically roll forward the replica
+wlr20
+
+# prepare an update to the master
+wlc30
+
+# roll forward to replica
+wlr30
diff --git a/sql/test/wlcr/Tests/wlc01.py b/sql/test/wlcr/Tests/wlc01.py
new file mode 100644
--- /dev/null
+++ b/sql/test/wlcr/Tests/wlc01.py
@@ -0,0 +1,44 @@
+try:
+    from MonetDBtesting import process
+except ImportError:
+    import process
+import os, sys
+
+dbfarm = os.getenv('GDK_DBFARM')
+tstdb = os.getenv('TSTDB')
+
+if not tstdb or not dbfarm:
+    print 'No TSTDB or GDK_DBFARM in environment'
+    sys.exit(1)
+
+#clean up first
+dbname = tstdb
+dbnameclone = tstdb + '-clone'
+
+if os.path.exists(os.path.join(dbfarm, dbname)):
+    import shutil
+    shutil.rmtree(os.path.join(dbfarm, dbname))
+
+if os.path.exists(os.path.join(dbfarm, dbnameclone)):
+    import shutil
+    shutil.rmtree(os.path.join(dbfarm, dbnameclone))
+
+
+s = process.server(dbname = dbname, stdin = process.PIPE, stdout = 
process.PIPE, stderr = process.PIPE)
+
+c = process.client('sql', dbname = dbname, stdin = process.PIPE, stdout = 
process.PIPE, stderr = process.PIPE)
+
+cout, cerr = c.communicate('''\
+call master();
+select 1;
+create table tmp(i int, s string);
+insert into tmp values(1,'hello'), (2,'world');
+select * from tmp;
+''')
+
+sout, serr = s.communicate()
+
+sys.stdout.write(sout)
+sys.stdout.write(cout)
+sys.stderr.write(serr)
+sys.stderr.write(cerr)
diff --git a/sql/test/wlcr/Tests/wlc01.stable.err 
b/sql/test/wlcr/Tests/wlc01.stable.err
new file mode 100644
--- /dev/null
+++ b/sql/test/wlcr/Tests/wlc01.stable.err
@@ -0,0 +1,29 @@
+stderr of test 'wlc01` in directory 'sql/test/wlcr` itself:
+
+
+# 21:28:50 >  
+# 21:28:50 >  "/usr/bin/python2" "wlc01.py" "wlc01"
+# 21:28:50 >  
+
+# builtin opt  gdk_dbpath = 
/export/scratch1/mk/wlcr//Linux/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 = 31055
+# cmdline opt  mapi_usock = /var/tmp/mtest-7935/.s.monetdb.31055
+# cmdline opt  monet_prompt = 
+# cmdline opt  gdk_dbpath = 
/export/scratch1/mk/wlcr//Linux/var/MonetDB/mTests_sql_test_wlcr
+# cmdline opt  gdk_debug = 536870922
+
+# 21:28:51 >  
+# 21:28:51 >  "Done."
+# 21:28:51 >  
+
diff --git a/sql/test/wlcr/Tests/wlc01.stable.out 
b/sql/test/wlcr/Tests/wlc01.stable.out
new file mode 100644
--- /dev/null
+++ b/sql/test/wlcr/Tests/wlc01.stable.out
@@ -0,0 +1,81 @@
+stdout of test 'wlc01` in directory 'sql/test/wlcr` itself:
+
+
+# 21:28:50 >  
+# 21:28:50 >  "/usr/bin/python2" "wlc01.py" "wlc01"
+# 21:28:50 >  
+
+# MonetDB 5 server v11.26.0
+# This is an unreleased version
+# Serving database 'mTests_sql_test_wlcr', using 8 threads
+# Compiled for x86_64-unknown-linux-gnu/64bit with 128bit integers
+# Found 15.589 GiB available main-memory.
+# Copyright (c) 1993-July 2008 CWI.
+# Copyright (c) August 2008-2017 MonetDB B.V., all rights reserved
+# Visit http://www.monetdb.org/ for further information
+# Listening for connection requests on mapi:monetdb://vienna.da.cwi.nl:31055/
+# Listening for UNIX domain connection requests on 
mapi:monetdb:///var/tmp/mtest-7935/.s.monetdb.31055
+# MonetDB/GIS module loaded
+# MonetDB/SQL module loaded
+# SQL catalog created, loading sql scripts once
+# loading sql script: 09_like.sql
+# loading sql script: 10_math.sql
+# loading sql script: 11_times.sql
+# loading sql script: 12_url.sql
+# loading sql script: 13_date.sql
+# loading sql script: 14_inet.sql
+# loading sql script: 15_querylog.sql
+# loading sql script: 16_tracelog.sql
+# loading sql script: 17_temporal.sql
+# loading sql script: 18_index.sql
+# loading sql script: 20_vacuum.sql
+# loading sql script: 21_dependency_functions.sql
+# loading sql script: 22_clients.sql
+# loading sql script: 23_skyserver.sql
+# loading sql script: 25_debug.sql
+# loading sql script: 26_sysmon.sql
+# loading sql script: 27_rejects.sql
+# loading sql script: 39_analytics.sql
+# loading sql script: 39_analytics_hge.sql
+# loading sql script: 40_geom.sql
+# loading sql script: 40_json.sql
+# loading sql script: 40_json_hge.sql
+# loading sql script: 41_md5sum.sql
+# loading sql script: 45_uuid.sql
+# loading sql script: 46_gsl.sql
+# loading sql script: 46_profiler.sql
+# loading sql script: 51_sys_schema_extension.sql
+# loading sql script: 60_wlcr.sql
+# loading sql script: 72_fits.sql
+# loading sql script: 74_netcdf.sql
+# loading sql script: 75_lidar.sql
+# loading sql script: 75_shp.sql
+# loading sql script: 75_storagemodel.sql
+# loading sql script: 80_statistics.sql
+# loading sql script: 80_udf.sql
+# loading sql script: 80_udf_hge.sql
+# loading sql script: 85_bam.sql
+# loading sql script: 90_generator.sql
+# loading sql script: 90_generator_hge.sql
+# loading sql script: 99_system.sql
+#select 1;
+% .L2 # table_name
+% L2 # name
+% tinyint # type
+% 1 # length
+[ 1    ]
+#create table tmp(i int, s string);
+#insert into tmp values(1,'hello'), (2,'world');
+[ 2    ]
+#select * from tmp;
+% sys.tmp,     sys.tmp # table_name
+% i,   s # name
+% int, clob # type
+% 1,   5 # length
+[ 1,   "hello" ]
+[ 2,   "world" ]
+
+# 21:28:51 >  
+# 21:28:51 >  "Done."
+# 21:28:51 >  
+
diff --git a/sql/test/wlcr/Tests/wlc20.py b/sql/test/wlcr/Tests/wlc20.py
new file mode 100644
--- /dev/null
+++ b/sql/test/wlcr/Tests/wlc20.py
@@ -0,0 +1,30 @@
+try:
+    from MonetDBtesting import process
+except ImportError:
+    import process
+import os, sys
+
+dbfarm = os.getenv('GDK_DBFARM')
+tstdb = os.getenv('TSTDB')
+
+if not tstdb or not dbfarm:
+    print 'No TSTDB or GDK_DBFARM in environment'
+    sys.exit(1)
+
+dbname = tstdb
+
+s = process.server(dbname = dbname, stdin = process.PIPE, stdout = 
process.PIPE, stderr = process.PIPE)
+
+c = process.client('sql', dbname = dbname, stdin = process.PIPE, stdout = 
process.PIPE, stderr = process.PIPE)
+
+cout, cerr = c.communicate('''\
+insert into tmp values(3,'blah'),(4,'bloh');
+select * from tmp;
+''')
+
+sout, serr = s.communicate()
+
+sys.stdout.write(sout)
+sys.stdout.write(cout)
+sys.stderr.write(serr)
+sys.stderr.write(cerr)
diff --git a/sql/test/wlcr/Tests/wlc20.stable.err 
b/sql/test/wlcr/Tests/wlc20.stable.err
new file mode 100644
--- /dev/null
+++ b/sql/test/wlcr/Tests/wlc20.stable.err
@@ -0,0 +1,29 @@
+stderr of test 'wlc20` in directory 'sql/test/wlcr` itself:
+
+
+# 21:28:51 >  
+# 21:28:51 >  "/usr/bin/python2" "wlc20.py" "wlc20"
+# 21:28:51 >  
+
+# builtin opt  gdk_dbpath = 
/export/scratch1/mk/wlcr//Linux/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 = 31055
+# cmdline opt  mapi_usock = /var/tmp/mtest-7935/.s.monetdb.31055
+# cmdline opt  monet_prompt = 
+# cmdline opt  gdk_dbpath = 
/export/scratch1/mk/wlcr//Linux/var/MonetDB/mTests_sql_test_wlcr
+# cmdline opt  gdk_debug = 536870922
+
+# 21:28:52 >  
+# 21:28:52 >  "Done."
+# 21:28:52 >  
+
diff --git a/sql/test/wlcr/Tests/wlc20.stable.out 
b/sql/test/wlcr/Tests/wlc20.stable.out
new file mode 100644
--- /dev/null
+++ b/sql/test/wlcr/Tests/wlc20.stable.out
@@ -0,0 +1,35 @@
+stdout of test 'wlc20` in directory 'sql/test/wlcr` itself:
+
+
+# 21:28:51 >  
+# 21:28:51 >  "/usr/bin/python2" "wlc20.py" "wlc20"
+# 21:28:51 >  
+
+# MonetDB 5 server v11.26.0
+# This is an unreleased version
+# Serving database 'mTests_sql_test_wlcr', using 8 threads
+# Compiled for x86_64-unknown-linux-gnu/64bit with 128bit integers
+# Found 15.589 GiB available main-memory.
+# Copyright (c) 1993-July 2008 CWI.
+# Copyright (c) August 2008-2017 MonetDB B.V., all rights reserved
+# Visit http://www.monetdb.org/ for further information
+# Listening for connection requests on mapi:monetdb://vienna.da.cwi.nl:31055/
+# Listening for UNIX domain connection requests on 
mapi:monetdb:///var/tmp/mtest-7935/.s.monetdb.31055
+# MonetDB/GIS module loaded
+# MonetDB/SQL module loaded
+#insert into tmp values(3,'blah'),(4,'bloh');
+[ 2    ]
+#select * from tmp;
+% sys.tmp,     sys.tmp # table_name
+% i,   s # name
+% int, clob # type
+% 1,   5 # length
+[ 1,   "hello" ]
+[ 2,   "world" ]
+[ 3,   "blah"  ]
+[ 4,   "bloh"  ]
_______________________________________________
checkin-list mailing list
[email protected]
https://www.monetdb.org/mailman/listinfo/checkin-list

Reply via email to