Update of /cvsroot/monetdb/sql/src/test/BugTracker/Tests
In directory 
23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv22326/src/test/BugTracker/Tests

Modified Files:
      Tag: Nov2009
        connect_crash.SF-1436626.py 
Log Message:
propagated changes of Friday Oct 09 2009
from the Aug2009 branch to the Nov2009 branch

  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  2009/10/09 - sjoerd:
          src/test/BugTracker/Tests/connect_crash.SF-1436626.py,1.5.8.1
  Use the subprocess module to start processes with pipes.
  This seems to fix the lack of output on Windows.
  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


Index: connect_crash.SF-1436626.py
===================================================================
RCS file: 
/cvsroot/monetdb/sql/src/test/BugTracker/Tests/connect_crash.SF-1436626.py,v
retrieving revision 1.5
retrieving revision 1.5.10.1
diff -u -d -r1.5 -r1.5.10.1
--- connect_crash.SF-1436626.py 29 Oct 2008 18:51:58 -0000      1.5
+++ connect_crash.SF-1436626.py 9 Oct 2009 08:52:29 -0000       1.5.10.1
@@ -1,13 +1,13 @@
-import os, time
+import subprocess, os, time
 
 def main():
     srvcmd = '%s --dbname "%s" --dbinit "include sql;"' % 
(os.getenv('MSERVER'),os.getenv('TSTDB'))
-    srv = os.popen(srvcmd, 'w')
+    srv = subprocess.Popen(srvcmd, shell = True, stdin = subprocess.PIPE)
     time.sleep(10)                      # give server time to start
     cltcmd = os.getenv('SQL_CLIENT')
-    clt = os.popen(cltcmd, 'w')
-    clt.write('select 1;\n')
-    clt.close()
-    srv.close()
+    clt = subprocess.Popen(cltcmd, shell = True, stdin = subprocess.PIPE)
+    clt.stdin.write('select 1;\n')
+    clt.communicate()
+    srv.communicate()
 
 main()


------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) 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/devconference
_______________________________________________
Monetdb-sql-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/monetdb-sql-checkins

Reply via email to