Rename OpTestJobqueue and LUTestJobqueue
authorIustin Pop <iustin@google.com>
Sat, 15 Jan 2011 12:07:20 +0000 (13:07 +0100)
committerIustin Pop <iustin@google.com>
Tue, 18 Jan 2011 11:47:15 +0000 (12:47 +0100)
Signed-off-by: Iustin Pop <iustin@google.com>
Reviewed-by: RenĂ© Nussbaumer <rn@google.com>
Reviewed-by: Michael Hanselmann <hansmi@google.com>

lib/client/gnt_debug.py
lib/cmdlib.py
lib/opcodes.py
test/ganeti.cmdlib_unittest.py

index 37eeed5..39ee043 100644 (file)
@@ -1,7 +1,7 @@
 #
 #
 
-# Copyright (C) 2006, 2007, 2010 Google Inc.
+# Copyright (C) 2006, 2007, 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
@@ -350,14 +350,14 @@ def TestJobqueue(opts, _):
     if mode == TM_PARTFAIL:
       ToStdout("Testing partial job failure")
       ops = [
-        opcodes.OpTestJobqueue(notify_waitlock=True, notify_exec=True,
-                               log_messages=test_messages, fail=False),
-        opcodes.OpTestJobqueue(notify_waitlock=True, notify_exec=True,
-                               log_messages=test_messages, fail=False),
-        opcodes.OpTestJobqueue(notify_waitlock=True, notify_exec=True,
-                               log_messages=test_messages, fail=True),
-        opcodes.OpTestJobqueue(notify_waitlock=True, notify_exec=True,
-                               log_messages=test_messages, fail=False),
+        opcodes.OpTestJqueue(notify_waitlock=True, notify_exec=True,
+                             log_messages=test_messages, fail=False),
+        opcodes.OpTestJqueue(notify_waitlock=True, notify_exec=True,
+                             log_messages=test_messages, fail=False),
+        opcodes.OpTestJqueue(notify_waitlock=True, notify_exec=True,
+                             log_messages=test_messages, fail=True),
+        opcodes.OpTestJqueue(notify_waitlock=True, notify_exec=True,
+                             log_messages=test_messages, fail=False),
         ]
       expect_messages = 3 * [test_messages]
       expect_opstatus = [
@@ -370,10 +370,10 @@ def TestJobqueue(opts, _):
     elif mode == TM_MULTISUCCESS:
       ToStdout("Testing multiple successful opcodes")
       ops = [
-        opcodes.OpTestJobqueue(notify_waitlock=True, notify_exec=True,
-                               log_messages=test_messages, fail=False),
-        opcodes.OpTestJobqueue(notify_waitlock=True, notify_exec=True,
-                               log_messages=test_messages, fail=False),
+        opcodes.OpTestJqueue(notify_waitlock=True, notify_exec=True,
+                             log_messages=test_messages, fail=False),
+        opcodes.OpTestJqueue(notify_waitlock=True, notify_exec=True,
+                             log_messages=test_messages, fail=False),
         ]
       expect_messages = 2 * [test_messages]
       expect_opstatus = [
@@ -392,10 +392,10 @@ def TestJobqueue(opts, _):
         raise errors.ProgrammerError("Unknown test mode %s" % mode)
 
       ops = [
-        opcodes.OpTestJobqueue(notify_waitlock=True,
-                               notify_exec=True,
-                               log_messages=test_messages,
-                               fail=fail)
+        opcodes.OpTestJqueue(notify_waitlock=True,
+                             notify_exec=True,
+                             log_messages=test_messages,
+                             fail=fail)
         ]
       expect_messages = [test_messages]
       expect_resultlen = 1
index fdb7860..8bd6d64 100644 (file)
@@ -10582,7 +10582,7 @@ class LUTestDelay(NoHooksLU):
         self._TestDelay()
 
 
-class LUTestJobqueue(NoHooksLU):
+class LUTestJqueue(NoHooksLU):
   """Utility LU to test some aspects of the job queue.
 
   """
index 85268a9..1d3179c 100644 (file)
@@ -1262,7 +1262,7 @@ class OpTestAllocator(OpCode):
     ]
 
 
-class OpTestJobqueue(OpCode):
+class OpTestJqueue(OpCode):
   """Utility opcode to test some aspects of the job queue.
 
   """
index 65a08fe..2341789 100755 (executable)
@@ -133,9 +133,9 @@ class TestIAllocatorChecks(testutils.GanetiTestCase):
     self.assertRaises(errors.OpPrereqError, c_i)
 
 
-class TestLUTestJobqueue(unittest.TestCase):
+class TestLUTestJqueue(unittest.TestCase):
   def test(self):
-    self.assert_(cmdlib.LUTestJobqueue._CLIENT_CONNECT_TIMEOUT <
+    self.assert_(cmdlib.LUTestJqueue._CLIENT_CONNECT_TIMEOUT <
                  (luxi.WFJC_TIMEOUT * 0.75),
                  msg=("Client timeout too high, might not notice bugs"
                       " in WaitForJobChange"))