diff options
author | Lucas Alvares Gomes <lucasagomes@gmail.com> | 2015-09-15 16:28:00 +0100 |
---|---|---|
committer | Lucas Alvares Gomes <lucasagomes@gmail.com> | 2015-09-15 16:31:05 +0100 |
commit | 0dc3c9256d4442b8f4c991d56bb84e7e55956434 (patch) | |
tree | 2614cc1ce20bbdef5956788361079a08afdc8455 | |
parent | f38cfb1ee2011d65bbef02ecd5941a88339f20ed (diff) | |
download | ironic-0dc3c9256d4442b8f4c991d56bb84e7e55956434.tar.gz |
Fix iBoot test__switch_retries test to not waste time sleeping
The test "test__switch_retries" for the iBoot driver takes more than 2
seconds to run, it's spending time sleeping between one retry and
another. This patch fix the problem by setting the "retry_interval" to 0
seconds. To be safe, the "max_retries" is also set to 0 on the SetUp()
method of the test class, testing willing to verify the retry can
overwrite those within the test function scope.
Closes-Bug: #1496026
Change-Id: Ic735baa532353b4ab0bec0c704b5c11b612433fd
-rw-r--r-- | ironic/tests/drivers/test_iboot.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/ironic/tests/drivers/test_iboot.py b/ironic/tests/drivers/test_iboot.py index 0b1c9ed7d..370cd2e11 100644 --- a/ironic/tests/drivers/test_iboot.py +++ b/ironic/tests/drivers/test_iboot.py @@ -257,6 +257,8 @@ class IBootDriverTestCase(db_base.DbTestCase): def setUp(self): super(IBootDriverTestCase, self).setUp() + self.config(max_retry=0, group='iboot') + self.config(retry_interval=0, group='iboot') mgr_utils.mock_the_extension_manager(driver='fake_iboot') self.driver = driver_factory.get_driver('fake_iboot') self.node = obj_utils.create_test_node( |