From: Iustin Pop Date: Sat, 15 Jan 2011 12:07:20 +0000 (+0100) Subject: Rename OpTestJobqueue and LUTestJobqueue X-Git-Tag: v2.4.0rc1~74 X-Git-Url: https://code.grnet.gr/git/ganeti-local/commitdiff_plain/b469eb4d7e729a7c27b471797001b932d4644f96?hp=d1602edce5713284c59d7949818cec17da26e32b Rename OpTestJobqueue and LUTestJobqueue Signed-off-by: Iustin Pop Reviewed-by: René Nussbaumer Reviewed-by: Michael Hanselmann --- diff --git a/lib/client/gnt_debug.py b/lib/client/gnt_debug.py index 37eeed5..39ee043 100644 --- a/lib/client/gnt_debug.py +++ b/lib/client/gnt_debug.py @@ -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 diff --git a/lib/cmdlib.py b/lib/cmdlib.py index fdb7860..8bd6d64 100644 --- a/lib/cmdlib.py +++ b/lib/cmdlib.py @@ -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. """ diff --git a/lib/opcodes.py b/lib/opcodes.py index 85268a9..1d3179c 100644 --- a/lib/opcodes.py +++ b/lib/opcodes.py @@ -1262,7 +1262,7 @@ class OpTestAllocator(OpCode): ] -class OpTestJobqueue(OpCode): +class OpTestJqueue(OpCode): """Utility opcode to test some aspects of the job queue. """ diff --git a/test/ganeti.cmdlib_unittest.py b/test/ganeti.cmdlib_unittest.py index 65a08fe..2341789 100755 --- a/test/ganeti.cmdlib_unittest.py +++ b/test/ganeti.cmdlib_unittest.py @@ -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"))