basic unit test for kojid main
This commit is contained in:
parent
65758fea93
commit
2a66fe2a34
2 changed files with 185 additions and 2 deletions
|
|
@ -171,12 +171,12 @@ def main(options, session):
|
|||
logger.error('Session expired')
|
||||
exit_code = 1
|
||||
break
|
||||
except koji.RetryError:
|
||||
raise
|
||||
except koji.AuthError:
|
||||
logger.error('Authentication error')
|
||||
exit_code = 1
|
||||
break
|
||||
except koji.RetryError:
|
||||
raise
|
||||
except Exception:
|
||||
# XXX - this is a little extreme
|
||||
# log the exception and continue
|
||||
|
|
@ -187,6 +187,7 @@ def main(options, session):
|
|||
# Only sleep if we didn't take a task, otherwise retry immediately.
|
||||
# The load-balancing code in getNextTask() will prevent a single builder
|
||||
# from getting overloaded.
|
||||
logger.debug('Sleeping for %s', options.sleeptime)
|
||||
time.sleep(options.sleeptime)
|
||||
except (SystemExit, KeyboardInterrupt):
|
||||
logger.warning("Exiting")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue