From 49587d78d844d17161054375871b1cab740ec113 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Markus=20M=C3=A4kel=C3=A4?= Date: Thu, 1 Nov 2018 12:18:15 +0200 Subject: [PATCH] Make sure created event is dropped before exiting Tests should clean up after themselves and in the case of this event, it can cause problems with other tests. --- maxscale-system-test/mysqlmon_fail_switch_events.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/maxscale-system-test/mysqlmon_fail_switch_events.cpp b/maxscale-system-test/mysqlmon_fail_switch_events.cpp index c3fa2b3b1..431cc95db 100644 --- a/maxscale-system-test/mysqlmon_fail_switch_events.cpp +++ b/maxscale-system-test/mysqlmon_fail_switch_events.cpp @@ -162,7 +162,7 @@ int main(int argc, char** argv) // If initialisation failed, fail the test immediately. if (test.global_result != 0) { - delete_event(test); + try_delete_event(test); return test.global_result; } @@ -182,7 +182,7 @@ int main(int argc, char** argv) // Again, stop on failure. if (test.global_result != 0) { - delete_event(test); + try_delete_event(test); return test.global_result; } @@ -206,7 +206,7 @@ int main(int argc, char** argv) if (test.global_result != 0) { - delete_event(test); + try_delete_event(test); return test.global_result; } @@ -225,7 +225,7 @@ int main(int argc, char** argv) check_event_status(test, 0, EVENT_NAME, "ENABLED"); if (test.global_result != 0) { - delete_event(test); + try_delete_event(test); return test.global_result; } @@ -237,7 +237,7 @@ int main(int argc, char** argv) test.expect(states.count("Slave") == 1, "%s is not a slave.", server_name.c_str()); } - delete_event(test); + try_delete_event(test); if (test.global_result != 0) { test.repl->fix_replication();