Skip to content

Commit

Permalink
test: handle connection error to pass the tests (no cuebot available …
Browse files Browse the repository at this point in the history
…during CI)
  • Loading branch information
KernAttila committed Sep 21, 2024
1 parent 82e98f1 commit 06368cc
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
7 changes: 6 additions & 1 deletion cuesubmit/cuesubmit/Util.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,12 @@ def getLimits():

def getServices():
"""Returns a list of service names from cuebot."""
return [service.name() for service in opencue.api.getDefaultServices()]
try:
services = opencue.api.getDefaultServices()
except opencue.exception.ConnectionException:
return []
else:
return [service.name() for service in services]


def getServiceOption(serviceName, option):
Expand Down
4 changes: 4 additions & 0 deletions cuesubmit/tests/Submission_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
'layerType': cuesubmit.JobTypes.JobTypes.MAYA,
'cmd': {'camera': 'renderCam', 'mayaFile': '/path/to/scene.ma'},
'layerRange': '1-5',
'overrideCores': True,
'cores': '6',
'services': ['maya', 'foo'],
}
Expand All @@ -45,6 +46,7 @@
'layerType': cuesubmit.JobTypes.JobTypes.NUKE,
'cmd': {'writeNodes': 'Write1,Write2', 'nukeFile': '/path/to/script.nk'},
'layerRange': '17-124',
'overrideCores': False,
'cores': '1',
'services': ['nuke'],
}
Expand All @@ -56,6 +58,7 @@
'blenderFile': '/path/to/scene.blend',
'outputFormat': 'PNG'},
'layerRange': '3-9',
'overrideCores': True,
'cores': '2',
'services': ['blender']
}
Expand All @@ -66,6 +69,7 @@
'cmd': {'outputPath': '/path/to/output',
'blenderFile': '/path/to/scene.blend',
'outputFormat': 'PNG'},
'overrideCores': True,
'cores': '2',
'services': ['blender']
}
Expand Down

0 comments on commit 06368cc

Please sign in to comment.