Update of /cvsroot/monetdb/sql/src/test/BugTracker-2009/Tests
In directory
23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv16938/src/test/BugTracker-2009/Tests
Added Files:
create_on_ro_db_crash.SF-2830238.py
Log Message:
propagated changes of Sunday Sep 20 2009 - Monday Sep 21 2009
from the Aug2009 branch to the development trunk
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2009/09/20 - nielsnes:
src/test/BugTracker-2009/Tests/create_on_ro_db_crash.SF-2830238.py,1.1.2.1
protect against schema changes in readonly mode.
added test
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
--- NEW FILE: create_on_ro_db_crash.SF-2830238.py ---
import sys
import os
import time
try:
import subprocess
except ImportError:
# use private copy for old Python versions
import MonetDBtesting.subprocess26 as subprocess
def server():
s = subprocess.Popen("%s --dbinit='include sql;' --set gdk_readonly=yes" %
os.getenv('MSERVER'),
shell = True,
stdin = subprocess.PIPE,
stdout = subprocess.PIPE,
stderr = subprocess.PIPE)
s.stdin.write('\nio.printf("\\nReady.\\n");\n')
s.stdin.flush()
while True:
ln = s.stdout.readline()
if not ln:
print 'Unexpected EOF from server'
sys.exit(1)
sys.stdout.write(ln)
if 'Ready' in ln:
break
return s
def client():
c = subprocess.Popen("%s" % os.getenv('SQL_CLIENT'),
shell = True,
stdin = subprocess.PIPE,
stdout = subprocess.PIPE,
stderr = subprocess.PIPE)
return c
script1 = '''\
create table t2 (a int);
'''
def main():
s = server()
c = client()
o, e = c.communicate(script1)
sys.stdout.write(o)
sys.stderr.write(e)
o, e = s.communicate()
sys.stdout.write(o)
sys.stderr.write(e)
if __name__ == '__main__':
main()
------------------------------------------------------------------------------
Come build with us! The BlackBerry® Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9-12, 2009. Register now!
http://p.sf.net/sfu/devconf
_______________________________________________
Monetdb-sql-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/monetdb-sql-checkins