From 1fb49c4865cb14576f420c2b4a6e5c1a0c836cb9 Mon Sep 17 00:00:00 2001 From: Tyler Neely Date: Wed, 15 Jun 2022 11:16:11 +0200 Subject: [PATCH] Add an uncatchable kill method to the python MemgraphInstanceRunner for testing abrupt failures (#405) --- tests/e2e/memgraph.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/tests/e2e/memgraph.py b/tests/e2e/memgraph.py index dffb019a8..c748ad02d 100755 --- a/tests/e2e/memgraph.py +++ b/tests/e2e/memgraph.py @@ -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!"