Merge "Use ThreadGroup.add_timer() API correctly"

This commit is contained in:
Zuul 2019-09-27 10:21:32 +00:00 committed by Gerrit Code Review
commit beaec9809f
2 changed files with 2 additions and 2 deletions

View File

@ -219,7 +219,7 @@ class ThreadGroupManager(object):
if stack_id not in self.groups:
self.groups[stack_id] = threadgroup.ThreadGroup()
self.groups[stack_id].add_timer(cfg.CONF.periodic_interval,
func, *args, **kwargs)
func, None, *args, **kwargs)
def add_msg_queue(self, stack_id, msg_queue):
self.msg_queues[stack_id].append(msg_queue)

View File

@ -76,7 +76,7 @@ class ThreadGroupManagerTest(common.HeatTestCase):
self.assertEqual(self.tg_mock, thm.groups[stack_id])
self.tg_mock.add_timer.assert_called_with(
self.cfg_mock.CONF.periodic_interval,
self.f, *self.fargs, **self.fkwargs)
self.f, None, *self.fargs, **self.fkwargs)
def test_tgm_add_msg_queue(self):
stack_id = 'add_msg_queues_test'