Commit fd3feec3 authored by unknown's avatar unknown

Use function 'stop_all_servers' to stop the running servers before restoring...

Use function 'stop_all_servers' to stop the running servers before restoring snapshot and resuming tests


parent d889c1a8
...@@ -2341,8 +2341,6 @@ sub restore_installed_db ($) { ...@@ -2341,8 +2341,6 @@ sub restore_installed_db ($) {
if ( -d $path_snapshot) if ( -d $path_snapshot)
{ {
kill_running_server ();
mtr_report("Restoring snapshot of databases"); mtr_report("Restoring snapshot of databases");
foreach my $data_dir (@data_dir_lst) foreach my $data_dir (@data_dir_lst)
...@@ -2367,8 +2365,8 @@ sub restore_installed_db ($) { ...@@ -2367,8 +2365,8 @@ sub restore_installed_db ($) {
} }
else else
{ {
# No snapshot existed, just stop all processes # No snapshot existed
stop_all_servers(); mtr_error("No snapshot existed");
} }
} }
...@@ -2381,6 +2379,9 @@ sub report_failure_and_restart ($) { ...@@ -2381,6 +2379,9 @@ sub report_failure_and_restart ($) {
print "\n"; print "\n";
if ( $opt_force ) if ( $opt_force )
{ {
# Stop all servers that are known to be running
stop_all_servers();
# Restore the snapshot of the installed test db # Restore the snapshot of the installed test db
restore_installed_db($tinfo->{'name'}); restore_installed_db($tinfo->{'name'});
print "Resuming Tests\n\n"; print "Resuming Tests\n\n";
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment