Issue node shutdown on empty workload

Remote pytest_runtestloop requires at least 2 tests, or a test
and a shutdown command. In case of inter test locking, for
example using a file lock, the tests could deadlock, since the
shutdown command would not be enqueued, and the last test of a
worker would never finish, and would not allow another worker
to make progress.
This commit is contained in:
Jan Kasiak
2018-09-30 13:59:35 -04:00
parent 86e2fb5a5a
commit fe06f27b8b
6 changed files with 57 additions and 0 deletions

View File

@@ -306,6 +306,7 @@ class LoadScopeScheduling(object):
# Check that more work is available
if not self.workqueue:
node.shutdown()
return
self.log("Number of units waiting for node:", len(self.workqueue))