Changeset: caeebd82ac64 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=caeebd82ac64
Modified Files:
        sql/test/testdb-reload/Tests/reload.py
        testing/process.py
Branch: Apr2019
Log Message:

Don't produce output that we don't use.
This prevents a hang on our Windows 2012R2 system.


diffs (48 lines):

diff --git a/sql/test/testdb-reload/Tests/reload.py 
b/sql/test/testdb-reload/Tests/reload.py
--- a/sql/test/testdb-reload/Tests/reload.py
+++ b/sql/test/testdb-reload/Tests/reload.py
@@ -38,8 +38,8 @@ c1 = process.client(lang='sql',
                     server=s1,
                     args=[os.path.join(tstsrcdir, os.pardir, os.pardir, 
'testdb', 'Tests', 'load.sql')],
                     stdin=process.PIPE,
-                    stdout=process.PIPE,
-                    stderr=process.PIPE)
+                    stdout=process.DEVNULL,
+                    stderr=process.DEVNULL)
 c1out, c1err = c1.communicate()
 # start the second server
 s2 = process.server(dbname=tstdb2,
@@ -52,13 +52,13 @@ d1 = process.client(lang='sqldump',
                     server=s1,
                     stdin=process.PIPE,
                     stdout='PIPE',
-                    stderr=process.PIPE)
+                    stderr=process.DEVNULL)
 # and pipe it straight into the second server
 c2 = process.client(lang='sql',
                     server=s2,
                     stdin=d1.stdout,
-                    stdout=process.PIPE,
-                    stderr=process.PIPE)
+                    stdout=process.DEVNULL,
+                    stderr=process.DEVNULL)
 d1.stdout.close()
 d1.stdout = None
 c2out, c2err = c2.communicate()
diff --git a/testing/process.py b/testing/process.py
--- a/testing/process.py
+++ b/testing/process.py
@@ -19,8 +19,11 @@ else:
     import queue
 
 from subprocess import PIPE
-
-__all__ = ['PIPE', 'Popen', 'client', 'server']
+try:
+    from subprocess import DEVNULL
+except ImportError:
+    DEVNULL = os.open(os.devnull, os.O_RDWR)
+__all__ = ['PIPE', 'DEVNULL', 'Popen', 'client', 'server']
 
 verbose = False
 
_______________________________________________
checkin-list mailing list
checkin-list@monetdb.org
https://www.monetdb.org/mailman/listinfo/checkin-list

Reply via email to