Revision 1e6d5750 test/ganeti.jqueue_unittest.py
b/test/ganeti.jqueue_unittest.py | ||
---|---|---|
1 | 1 |
#!/usr/bin/python |
2 | 2 |
# |
3 | 3 |
|
4 |
# Copyright (C) 2010 Google Inc. |
|
4 |
# Copyright (C) 2010, 2011 Google Inc.
|
|
5 | 5 |
# |
6 | 6 |
# This program is free software; you can redistribute it and/or modify |
7 | 7 |
# it under the terms of the GNU General Public License as published by |
... | ... | |
1175 | 1175 |
|
1176 | 1176 |
self._GenericCheckJob(job) |
1177 | 1177 |
|
1178 |
# Finished jobs can't be processed any further
|
|
1179 |
self.assertRaises(errors.ProgrammerError,
|
|
1180 |
jqueue._JobProcessor(queue, opexec, job))
|
|
1178 |
# Calling the processor on a finished job should be a no-op
|
|
1179 |
self.assertTrue(jqueue._JobProcessor(queue, opexec, job)())
|
|
1180 |
self.assertRaises(IndexError, queue.GetNextUpdate)
|
|
1181 | 1181 |
|
1182 | 1182 |
|
1183 | 1183 |
class _FakeTimeoutStrategy: |
Also available in: Unified diff