Increase event timeouts in git tests

We've seen some test failures in the git tests
(e.g. test_config_refreshed) where we ran into a timeout of one second
to wait for a specific event in the scheduler. However within one
second and a busy system this can lead to test failures. Raise that
timeout to stabilize those test cases.

[1] Trace:
Traceback (most recent call last):
  File "/home/zuul/src/git.openstack.org/openstack-infra/zuul/tests/unit/test_git_driver.py", line 118, in test_config_refreshed
    self.waitForEvent(count)
  File "/home/zuul/src/git.openstack.org/openstack-infra/zuul/tests/unit/test_git_driver.py", line 147, in waitForEvent
    raise Exception("Timeout waiting for event")
Exception: Timeout waiting for event

Change-Id: I615084b976dd01f1c4732478760eaff5ec5cdac7
This commit is contained in:
Tobias Henkel 2019-03-23 14:52:13 +01:00
parent cac0a6c9ef
commit d75467e625
No known key found for this signature in database
GPG Key ID: 03750DEC158E5FA2
1 changed files with 1 additions and 1 deletions

View File

@ -139,7 +139,7 @@ class TestGitDriver(ZuulTestCase):
def waitForEvent(self, initial_count=0):
delay = 0.1
max_delay = 1
max_delay = 5
while self.git_connection.watcher_thread._event_count <= initial_count:
time.sleep(delay)
max_delay -= delay