Remove some thread join timeouts

To make the tests more deterministic we should remove the join
timeouts of the DiskAccountant and GithubGearmanWorker. Both threads
are not whitelisted and are explicitly asked to stop when shutting
down the system so we should wait for them to stop cleanly.

Change-Id: I598ebae93e92681c8aca1908d47e6d9ca754bf6d
This commit is contained in:
Tobias Henkel 2019-03-15 08:22:44 +01:00
parent 988801f6a5
commit a36239d45e
No known key found for this signature in database
GPG Key ID: 03750DEC158E5FA2
2 changed files with 2 additions and 6 deletions

View File

@ -192,9 +192,7 @@ class GithubGearmanWorker(object):
def stop(self):
self._running = False
self.gearman.stopWaitingForJobs()
# We join here to avoid whitelisting the thread -- if it takes more
# than 5s to stop in tests, there's a problem.
self.thread.join(timeout=5)
self.thread.join()
self.gearman.shutdown()

View File

@ -160,9 +160,7 @@ class DiskAccountant(object):
return
self._running = False
self.stop_event.set()
# We join here to avoid whitelisting the thread -- if it takes more
# than 5s to stop in tests, there's a problem.
self.thread.join(timeout=5)
self.thread.join()
@property
def running(self):