1
0
Fork 0
mirror of https://github.com/Kozea/Radicale.git synced 2025-08-01 18:18:31 +00:00

Exit immediately after cleanup when signal is received

Waiting for clients introduces the risk that we exceed some timeout (e.g. from systemd) and get killed instead.
This commit is contained in:
Unrud 2020-08-31 13:54:47 +02:00
parent e7a5d03dc2
commit f570bb5738
2 changed files with 16 additions and 17 deletions

View file

@ -172,17 +172,14 @@ class TestBaseServerRequests(BaseTest):
config_args.append(long_name)
config_args.append(
self.configuration.get_raw(section, option))
env = os.environ.copy()
env["PYTHONPATH"] = os.pathsep.join(sys.path)
p = subprocess.Popen(
[sys.executable, "-m", "radicale"] + config_args, env=env)
[sys.executable, "-m", "radicale"] + config_args,
env={**os.environ, "PYTHONPATH": os.pathsep.join(sys.path)})
try:
self.get("/", is_alive_fn=lambda: p.poll() is None, check=302)
finally:
p.terminate()
p.wait()
if os.name == "posix":
assert p.returncode == 0
def test_wsgi_server(self):
config_path = os.path.join(self.colpath, "config")