Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
rework container.execute to use multiprocessing as watchdog (#50)
Workaround `docker.APIClient.exec_start` sometimes blocking indefinitely by running in a sub-process and throwing an exception if the sub-process does not complete within a given timeout. Remove the existing post-exec code which polled the value of `docker.APIClient.exec_inspect` for 15 seconds to determine if the command had completed. This is effectively performed by the new sub-process waiting. I've set the timeout to 30 seconds, up from 15, which (from experimentation) seems to be necessary to account for the extra time it takes to invoke `exec_start` within the timeout period. A future change should make this timeout configurable. This general pattern (of watchdogging the docker library code) might be useful elsewhere, in particular for any future efforts to support parallel test execution. Signed-off-by: Jonathan Dowland <[email protected]>
- Loading branch information