|
@@ -19,6 +19,7 @@ from check_objects import to_recompile
|
|
|
|
|
|
taskname = "test_task"
|
|
|
parallel_push = True
|
|
|
+TIMEOUT = 2000
|
|
|
|
|
|
slow = pytest.mark.skipif(
|
|
|
not pytest.config.getoption("--runslow"),
|
|
@@ -154,13 +155,13 @@ def run_file(files, parameters, expected, wait=False):
|
|
|
# ... and wait for replies
|
|
|
if expected is None:
|
|
|
while 1:
|
|
|
- val = urllib2.urlopen(urllib2.Request(address, urllib.urlencode({"op": "get_output", "taskname": taskname})), timeout=240).read()
|
|
|
+ val = urllib2.urlopen(urllib2.Request(address, urllib.urlencode({"op": "get_output", "taskname": taskname})), timeout=TIMEOUT).read()
|
|
|
val = json.loads(val)
|
|
|
print(val)
|
|
|
for e in expected:
|
|
|
c = len(e) if isinstance(e, set) else 1
|
|
|
for _ in range(c):
|
|
|
- val = urllib2.urlopen(urllib2.Request(address, urllib.urlencode({"op": "get_output", "taskname": taskname})), timeout=240).read()
|
|
|
+ val = urllib2.urlopen(urllib2.Request(address, urllib.urlencode({"op": "get_output", "taskname": taskname})), timeout=TIMEOUT).read()
|
|
|
val = json.loads(val)
|
|
|
|
|
|
if proc.returncode is not None:
|
|
@@ -256,7 +257,7 @@ def run_barebone(parameters, expected, interface="0", timeout=False, wait=False,
|
|
|
# Modelverse has already terminated, which isn't a good sign!
|
|
|
return False
|
|
|
|
|
|
- val = urllib2.urlopen(urllib2.Request(address, urllib.urlencode({"op": "get_output", "taskname": taskname})), timeout=240 if not timeout else 20).read()
|
|
|
+ val = urllib2.urlopen(urllib2.Request(address, urllib.urlencode({"op": "get_output", "taskname": taskname})), timeout=TIMEOUT if not timeout else 20).read()
|
|
|
val = json.loads(val)
|
|
|
except:
|
|
|
if timeout:
|