Browse Source

Fixed many more problems: tests work fine now

Yentl Van Tendeloo 8 years ago
parent
commit
91c2bd9c77
3 changed files with 5 additions and 7 deletions
  1. 2 5
      integration/utils.py
  2. 2 0
      scripts/run_local_modelverse.py
  3. 1 2
      wrappers/modelverse.py

+ 2 - 5
integration/utils.py

@@ -14,12 +14,9 @@ import random
 sys.path.append("interface/HUTN")
 sys.path.append("scripts")
 from hutn_compiler.compiler import main as do_compile
-from check_objects import to_recompile
 
 taskname = "test_task"
-parallel_push = True
 INIT_TIMEOUT = 30
-TIMEOUT = 2000
 
 try:
     import pytest
@@ -59,9 +56,9 @@ def kill(process):
         subprocess.call(["taskkill", "/F", "/T", "/PID", "%i" % process.pid])
     elif os.name == "posix":
         # Kill parents
-        subprocess.call(["pkill", "-P", "%i" % process.pid])
+        subprocess.call(["pkill", "-9", "-P", "%i" % process.pid])
         # Kill self
-        subprocess.call(["kill", "%i" % process.pid])
+        subprocess.call(["kill", "-9", "%i" % process.pid])
 
 def flush_data(address, data):
     if data:

+ 2 - 0
scripts/run_local_modelverse.py

@@ -4,6 +4,8 @@ import sys
 # sys.executable to use the same Python interpreter used to invoke this command
 if len(sys.argv) < 2:
     port = "8001"
+else:
+    port = sys.argv[1]
 
 subprocess.check_call([sys.executable, "-m", "sccd.compiler.sccdc", "-p", "threads", "server.xml"], cwd="hybrid_server")
 subprocess.call([sys.executable, "run_mvk_server.py", port], cwd="hybrid_server")

+ 1 - 2
wrappers/modelverse.py

@@ -157,7 +157,7 @@ def _handle_output(requested=None, split=None):
         raise InterfaceMismatch(value)
     
 # Main MvC operations
-def init(address_param="http://127.0.0.1:8001", timeout=10.0):
+def init(address_param="http://127.0.0.1:8001", timeout=20.0):
     """Starts up the connection to the Modelverse."""
     # return None
     # raises ConnectionError
@@ -307,7 +307,6 @@ def model_list_full():
     lst = set([])
     value = output.strip().split("\n")
     for v in value:
-        print("READ " + v)
         m, mm = v.split(":")
         m = m.strip()
         mm = mm.strip()