fix(pytest): dont check process return code on kill (#2862)

fix pytest: dont check process return code on kill

Signed-off-by: adi_holden <adi@dragonflydb.io>
This commit is contained in:
adiholden 2024-04-08 10:08:05 +03:00 committed by GitHub
parent 700fae6a58
commit ee8e5a53bf
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -168,8 +168,9 @@ class DflyInstance:
proc.kill()
else:
proc.terminate()
if proc.wait(timeout=15) < 0:
if proc.wait(timeout=15) < 0 and not kill:
raise Exception("Dragfonfly did not terminate gracefully")
except subprocess.TimeoutExpired:
# We need to send SIGUSR1 to DF such that it prints the stacktrace
proc.send_signal(signal.SIGUSR1)