Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
DrDet committed Dec 9, 2023
1 parent 4d61d75 commit a263915
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 6 deletions.
14 changes: 9 additions & 5 deletions tests/python/lib/engine.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,11 +115,15 @@ def start(self, start_msgs=None):
self._stats_receiver.start()

cmd = [self._engine_bin]
for option, value in self._options.items():
if value is not None:
cmd.append(option)
if value is not True:
cmd.append(str(value))
for option, value_raw in self._options.items():
if value_raw is not None:
value_list = value_raw
if type(value_raw) is not list:
value_list = [value_raw]
for val in value_list:
cmd.append(option)
if val is not True:
cmd.append(str(val))

if self._binlog_path:
cmd.append(self._binlog_path)
Expand Down
4 changes: 3 additions & 1 deletion tests/python/tests/json_logs/test_signals.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,9 @@ def test_master_sigbus(self):

def test_master_sigabrt(self):
self.kphp_server.send_signal(signal.SIGABRT)
self.kphp_server.restart()
with self.assertRaises(RuntimeError):
self.kphp_server.stop()
self.kphp_server.start()
self.kphp_server.assert_json_log(
expect=[{
"version": 0, "type": -1, "env": "", "msg": "SIGABRT terminating program",
Expand Down

0 comments on commit a263915

Please sign in to comment.