Merge pull request #53953 from Ch3LL/improve_git_test

Send SIGTERM to webserver in teardown of gitfs tests
This commit is contained in:
Daniel Wozniak 2019-07-25 14:12:41 -07:00 committed by GitHub
commit cc1cda1099
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -653,7 +653,10 @@ class GitPillarHTTPTestBase(GitPillarTestBase, WebserverMixin):
for proc in (cls.case.nginx_proc, cls.case.uwsgi_proc):
if proc is not None:
try:
proc.send_signal(signal.SIGQUIT)
proc.send_signal(signal.SIGTERM)
time.sleep(1)
if proc.is_running():
proc.send_signal(signal.SIGKILL)
except psutil.NoSuchProcess:
pass
shutil.rmtree(cls.root_dir, ignore_errors=True)