]> review.fuel-infra Code Review - openstack-build/heat-build.git/commitdiff
Remove unrelated tracebacks from test output
authorThomas Herve <therve@gmail.com>
Wed, 22 May 2013 08:23:50 +0000 (10:23 +0200)
committerThomas Herve <therve@gmail.com>
Wed, 22 May 2013 08:23:50 +0000 (10:23 +0200)
This mocks some calls the ThreadGroup when testing update and delete of
the stack, resulting in tracebacks when the threads randomly run later
on in the test suite.

Change-Id: Ia1a376933c2e25b6cf0fe6a26f47e381cbb1a55e
Fixes: bug #1182285
heat/tests/test_engine_service.py

index c259155ddedf49c036b0a46c1ebd0b4a4fd8b7d6..c92a3d331602fb79cf39a95448ad70f7dd96d071 100644 (file)
@@ -293,6 +293,8 @@ class stackServiceCreateUpdateDeleteTest(HeatTestCase):
 
         parser.Stack.load(self.ctx, stack=s).AndReturn(stack)
 
+        self.man.tg = DummyThreadGroup()
+
         self.m.ReplayAll()
 
         self.assertEqual(self.man.delete_stack(self.ctx, stack.identifier()),
@@ -338,6 +340,9 @@ class stackServiceCreateUpdateDeleteTest(HeatTestCase):
         self.m.StubOutWithMock(stack, 'validate')
         stack.validate().AndReturn(None)
 
+        self.m.StubOutWithMock(threadgroup, 'ThreadGroup')
+        threadgroup.ThreadGroup().AndReturn(DummyThreadGroup())
+
         self.m.ReplayAll()
 
         result = self.man.update_stack(self.ctx, old_stack.identifier(),