Add an uncatchable kill method to the python MemgraphInstanceRunner for testing abrupt failures

This commit is contained in:
Tyler Neely 2022-06-08 12:11:36 +02:00
parent 21ad5d4328
commit 7eebf9a7d7

View File

@ -106,3 +106,10 @@ class MemgraphInstanceRunner:
self.proc_mg.terminate()
code = self.proc_mg.wait()
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!"