Changeset: 07b3813b9ce5 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=07b3813b9ce5
Modified Files:
        testing/Mtest.py.in
Branch: Nov2019
Log Message:

Move all test post processing to finally clause.
This prevents us from trying to kill an already terminated server and
trying to write to an already closed file.


diffs (25 lines):

diff --git a/testing/Mtest.py.in b/testing/Mtest.py.in
--- a/testing/Mtest.py.in
+++ b/testing/Mtest.py.in
@@ -3236,8 +3236,8 @@ def DoIt(env, SERVER, CALL, TST, EXT, Te
                 fp.write('\n\n! Server not ready; skipping attempt to start 
client!\n\n')
         ClntOut.close()
         ClntErr.close()
-
-        if SERVER in ["MAL", "SQL"]:
+    finally:
+        if SERVER in ["MAL", "SQL"] and pSrvr is not None:
             if PSRVR is None and pSrvr.started:
                 pSrvr.terminate()
                 if procdebug:
@@ -3283,10 +3283,6 @@ def DoIt(env, SERVER, CALL, TST, EXT, Te
             TestErr.write(Prompt('Done.'))
             TestErr.close()
 
-    finally:
-        if PSRVR is None and pSrvr is not None and pSrvr.started:
-            pSrvr.terminate()
-
     if returncode is None and pSrvr is not None:
         returncode = pSrvr.code # can still be None
     if returncode is not None:
_______________________________________________
checkin-list mailing list
[email protected]
https://www.monetdb.org/mailman/listinfo/checkin-list

Reply via email to