Commit 93d27cba authored by Mukund Sivaraman's avatar Mukund Sivaraman
Browse files

[2353] Check BoB.components_to_restart as a list

parent 8a966b8d
......@@ -1496,9 +1496,9 @@ class TestBossComponents(unittest.TestCase):
bob.reap_children()
if runnable and is_running and not failed:
self.assertTrue(bob.components_to_restart)
self.assertTrue(component in bob.components_to_restart)
else:
self.assertFalse(bob.components_to_restart)
self.assertEqual([], bob.components_to_restart)
def test_reap_children(self):
'''Test that children are queued to be restarted when they ask for it.'''
......@@ -1526,7 +1526,7 @@ class TestBossComponents(unittest.TestCase):
bob.components_to_restart = []
# this should do nothing as the pid is unknown
bob.reap_children()
self.assertFalse(bob.components_to_restart)
self.assertEqual([], bob.components_to_restart)
# case where bob._get_process_exit_status() raises OSError with
# errno.ECHILD
......@@ -1535,7 +1535,7 @@ class TestBossComponents(unittest.TestCase):
bob.components_to_restart = []
# this should catch and handle the OSError
bob.reap_children()
self.assertFalse(bob.components_to_restart)
self.assertEqual([], bob.components_to_restart)
# case where bob._get_process_exit_status() raises OSError with
# errno other than ECHILD
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment