diff --git a/tests/dragonfly/instance.py b/tests/dragonfly/instance.py index 0631b6c9da8b..ac6d8d9af52c 100644 --- a/tests/dragonfly/instance.py +++ b/tests/dragonfly/instance.py @@ -170,6 +170,11 @@ def stop(self, kill=False): else: proc.terminate() proc.communicate(timeout=15) + # if the return code is 0 it means normal termination + # if the return code is negative it means termination by signal + # if the return code is positive it means abnormal exit + if proc.returncode != 0: + raise Exception("Dragfonfly did not terminate gracefully") except subprocess.TimeoutExpired: # We need to send SIGUSR1 to DF such that it prints the stacktrace