Fix randomly failed unit test
This test is calling cleanup method that uses publish/consume approach. Threads created by this method may be completed in any order and test is failing because of wrong order of calls. Fixed by ignoring order of calls. Change-Id: Id7344d1a52c0757184bf1793510fe60cc5a78ce2
This commit is contained in:
parent
12b87c5d4d
commit
44c5bd28bb
@ -117,7 +117,8 @@ class RoleGeneratorTestCase(test.TestCase):
|
||||
mock.call("u1", "r2", tenant="t1"),
|
||||
mock.call("u2", "r2", tenant="t2")
|
||||
]
|
||||
fc.keystone().roles.add_user_role.assert_has_calls(calls)
|
||||
fc.keystone().roles.add_user_role.assert_has_calls(calls,
|
||||
any_order=True)
|
||||
self.assertEqual(
|
||||
4, fc.keystone().roles.add_user_role.call_count)
|
||||
self.assertEqual(
|
||||
|
Loading…
x
Reference in New Issue
Block a user