Add an uncatchable kill method to the python MemgraphInstanceRunner for testing abrupt failures (#405)

This commit is contained in:
Tyler Neely 2022-06-15 11:16:11 +02:00 committed by GitHub
parent df1485aeec
commit 1fb49c4865
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -106,3 +106,10 @@ class MemgraphInstanceRunner:
self.proc_mg.terminate() self.proc_mg.terminate()
code = self.proc_mg.wait() code = self.proc_mg.wait()
assert code == 0, "The Memgraph process exited with non-zero!" assert code == 0, "The Memgraph process exited with non-zero!"
def kill(self):
if not self.is_running():
return
self.proc_mg.kill()
code = self.proc_mg.wait()
assert code == 9, "The killed Memgraph process exited with non-nine!"