From 5d8d2e98ee8004cb009f4bd419fbd8cd5757aaa2 Mon Sep 17 00:00:00 2001 From: Alistair Coles Date: Fri, 23 Oct 2015 16:38:24 +0100 Subject: [PATCH] Minor improvement to updater unit tests Follow up for change I7c57bba053711a27d3802efe6f2a0bf53483a54f The current tests won't prevent this kind of regression in the updaters' __init__ methods: self.node_timeout = int(float(conf.get('node_timeout', 10))) so this makes them a little tighter. Change-Id: I60bd79ac392deb1e8a108357d48474dddd9028c1 --- test/unit/container/test_updater.py | 4 ++-- test/unit/obj/test_updater.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/test/unit/container/test_updater.py b/test/unit/container/test_updater.py index 74d030912f..20a898b359 100644 --- a/test/unit/container/test_updater.py +++ b/test/unit/container/test_updater.py @@ -64,14 +64,14 @@ class TestContainerUpdater(unittest.TestCase): 'swift_dir': self.testdir, 'interval': '1', 'concurrency': '2', - 'node_timeout': '5.', + 'node_timeout': '5.5', }) self.assertTrue(hasattr(cu, 'logger')) self.assertTrue(cu.logger is not None) self.assertEqual(cu.devices, self.devices_dir) self.assertEqual(cu.interval, 1) self.assertEqual(cu.concurrency, 2) - self.assertEqual(cu.node_timeout, 5.) + self.assertEqual(cu.node_timeout, 5.5) self.assertTrue(cu.get_account_ring() is not None) @mock.patch.object(container_updater, 'ismount') diff --git a/test/unit/obj/test_updater.py b/test/unit/obj/test_updater.py index db84dbac14..3900bf4944 100644 --- a/test/unit/obj/test_updater.py +++ b/test/unit/obj/test_updater.py @@ -84,13 +84,13 @@ class TestObjectUpdater(unittest.TestCase): 'swift_dir': self.testdir, 'interval': '1', 'concurrency': '2', - 'node_timeout': '5.'}) + 'node_timeout': '5.5'}) self.assertTrue(hasattr(cu, 'logger')) self.assertTrue(cu.logger is not None) self.assertEqual(cu.devices, self.devices_dir) self.assertEqual(cu.interval, 1) self.assertEqual(cu.concurrency, 2) - self.assertEqual(cu.node_timeout, 5.) + self.assertEqual(cu.node_timeout, 5.5) self.assertTrue(cu.get_container_ring() is not None) @mock.patch('os.listdir')