Replace check_log_err with log_includes/log_excludes

The latter are more explicit and easier to understand at the call site.

Also removed the redundant crash checks via the log files.
This commit is contained in:
Markus Mäkelä
2018-11-16 12:32:19 +02:00
parent bc8db6d52c
commit 4b6aab1417
38 changed files with 61 additions and 150 deletions

View File

@ -39,12 +39,12 @@ bool staying_alive(TestConnections& test, const maxbase::Duration& dur)
// The bulk of the test.
void test_watchdog(TestConnections& test, int argc, char* argv[])
{
test.check_log_err(0, "The systemd watchdog is Enabled", true);
test.log_includes(0, "The systemd watchdog is Enabled");
// Wait for one watchdog interval, systemd should have been notified in that time.
bool maxscale_alive = staying_alive(test, watchdog_interval);
test.check_log_err(0, "systemd watchdog keep-alive ping", true);
test.log_includes(0, "systemd watchdog keep-alive ping");
test.set_timeout(2 * watchdog_interval.secs());
@ -61,7 +61,7 @@ void test_watchdog(TestConnections& test, int argc, char* argv[])
}
else
{
test.check_log_err(0, "received fatal signal 6", true);
test.log_includes(0, "received fatal signal 6");
if (test.global_result == 0)
{
test.tprintf("Maxscale was killed by systemd - ok");