diff options
author | James E. Blair <jeblair@redhat.com> | 2018-01-17 07:57:54 -0800 |
---|---|---|
committer | James E. Blair <jeblair@redhat.com> | 2018-01-17 09:53:18 -0800 |
commit | 185b970bad464037d68d19127b2b5ba076630b0b (patch) | |
tree | 62f149bee9e18a497c8b37c5dfb9c1ed9c26fef3 /zuul/driver/git | |
parent | 168a94117b30d9fbf79374c6f6c52be88bc5b8d7 (diff) | |
download | zuul-185b970bad464037d68d19127b2b5ba076630b0b.tar.gz |
Stabilize git driver tests
These tests relied on sleeps which can cause races when running
the full test suite in parallel. Instead, wait for the events
we know will happen to happen.
Also remove the dependency on yarl now that aiohttp has made a
release which works with yarl 1.0 (however, it does not work with
<1.0 which is why this needs to be combined with this change to
fix tests).
Change-Id: Ib1c626cdd3f083dd1d23a3c6547bd7163b66567e
Diffstat (limited to 'zuul/driver/git')
-rw-r--r-- | zuul/driver/git/gitconnection.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/zuul/driver/git/gitconnection.py b/zuul/driver/git/gitconnection.py index 03b24cadc..1886cfcca 100644 --- a/zuul/driver/git/gitconnection.py +++ b/zuul/driver/git/gitconnection.py @@ -38,6 +38,8 @@ class GitWatcher(threading.Thread): self.poll_delay = poll_delay self._stopped = False self.projects_refs = self.git_connection.projects_refs + # This is used by the test framework + self._event_count = 0 def compareRefs(self, project, refs): partial_events = [] @@ -112,6 +114,7 @@ class GitWatcher(threading.Thread): self.git_connection.logEvent(event) # Pass the event to the scheduler self.git_connection.sched.addEvent(event) + self._event_count += 1 except Exception as e: self.log.debug("Unexpected issue in _run loop: %s" % str(e)) |