Merge "Fix race in test_handler_poll_session_expired"

This commit is contained in:
Zuul 2019-04-08 17:21:36 +00:00 committed by Gerrit Code Review
commit 330218b80e
1 changed files with 8 additions and 2 deletions

View File

@ -1760,8 +1760,14 @@ class TestLauncher(tests.DBTestCase):
# time through poll() should handle removing the request handler.
# And our mock side effect should ensure it does not re-enter
# request handling before we check it.
self.assertEqual(0, len(
pool._pool_threads["fake-provider-main"].request_handlers))
for _ in iterate_timeout(10, Exception,
'request_handlers to reach zero count'):
try:
self.assertEqual(0, len(
pool._pool_threads["fake-provider-main"].request_handlers))
break
except AssertionError:
pass
def test_exception_causing_decline_of_paused_request(self):
"""