Commit 66bd7445 changed the semantics of _JobProcessor on finished
jobs, and updated the related unittests in the 2.4 branch. It was then
merged to master, however on master there was an additional test for
this case, which was not updated.
---
 test/ganeti.jqueue_unittest.py |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/test/ganeti.jqueue_unittest.py b/test/ganeti.jqueue_unittest.py
index 96504a1..a0dd025 100755
--- a/test/ganeti.jqueue_unittest.py
+++ b/test/ganeti.jqueue_unittest.py
@@ -1,7 +1,7 @@
 #!/usr/bin/python
 #
 
-# Copyright (C) 2010 Google Inc.
+# Copyright (C) 2010, 2011 Google Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -1175,9 +1175,9 @@ class TestJobProcessor(unittest.TestCase, 
_JobProcessorTestUtils):
 
     self._GenericCheckJob(job)
 
-    # Finished jobs can't be processed any further
-    self.assertRaises(errors.ProgrammerError,
-                      jqueue._JobProcessor(queue, opexec, job))
+    # Calling the processor on a finished job should be a no-op
+    self.assertTrue(jqueue._JobProcessor(queue, opexec, job)())
+    self.assertRaises(IndexError, queue.GetNextUpdate)
 
 
 class _FakeTimeoutStrategy:
-- 
1.7.3.1

Reply via email to