Increase delay for reloading services + display actual status in error message (seeing some weird php7.3-fpm stuff during some specific test...)

This commit is contained in:
Alexandre Aubin 2021-04-05 18:48:05 +02:00
parent fe9f0731e8
commit 81c43747a0

View file

@ -3451,14 +3451,15 @@ def _assert_system_is_sane_for_app(manifest, when):
# Wait if a service is reloading
test_nb = 0
while test_nb < 10:
while test_nb < 16:
if not any(s for s in services if service_status(s)["status"] == "reloading"):
break
time.sleep(0.5)
test_nb+=1
# List services currently down and raise an exception if any are found
faulty_services = [s for s in services if service_status(s)["status"] != "running"]
services_status = {s:service_status(s) for s in services}
faulty_services = [f"{s} ({status['status']})" for s, status in services_status.items() if status['status'] != "running"]
if faulty_services:
if when == "pre":
raise YunohostValidationError(