Fixed erorr notifications crashing the test
This commit is contained in:
parent
278fe30b02
commit
6b7fff6294
5
test.py
5
test.py
@ -193,6 +193,7 @@ class PipelineTest(DaemonTest):
|
||||
|
||||
def wait_for_result(self, jobid, handlers, timeout=5):
|
||||
resultfiles = {}
|
||||
final_result = None
|
||||
for handler in handlers:
|
||||
resultfiles = {path.join(self.notify_url,
|
||||
f"{jobid}.{handler}"): False
|
||||
@ -207,7 +208,6 @@ class PipelineTest(DaemonTest):
|
||||
else:
|
||||
self.fail(f"No result produced after {_try} seconds")
|
||||
|
||||
final_result = None
|
||||
for resultfile in resultfiles:
|
||||
with open(resultfile) as f:
|
||||
try:
|
||||
@ -220,6 +220,9 @@ class PipelineTest(DaemonTest):
|
||||
|
||||
# Validate that this is the correct resultfile
|
||||
self.assertEqual(jobid, result['jobid'])
|
||||
if result['type'] == 'error':
|
||||
final_result = result
|
||||
break
|
||||
|
||||
if result['pending'] == []:
|
||||
final_result = result
|
||||
|
Loading…
x
Reference in New Issue
Block a user