Skip to content

Commit 2599595

Browse files
committed
Bug#30258342 ATRT DOES NOT STOP CLUSTER AFTER RUNNING TESTS
Modifies atrt to stop all processes after all the tests in a testsuite are run. Apart from cleaning up of processes after test run, it helps when atrt restarts too fast and tries to define a process that has not yet been undefined even though we have logic in CPCD to stop and undefine processes once a "session" ends. Approved by: Mauritz Sundell <[email protected]> Change-Id: I0bd1b9f7f406018cf97ca195d627d033d0dc4ae1
1 parent e893c9d commit 2599595

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

storage/ndb/test/run-test/main.cpp

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444

4545
#define PATH_SEPARATOR DIR_SEPARATOR
4646
#define TESTCASE_RETRIES_THRESHOLD_WARNING 5
47-
#define ATRT_VERSION_NUMBER 5
47+
#define ATRT_VERSION_NUMBER 6
4848

4949
/** Global variables */
5050
static const char progname[] = "ndb_atrt";
@@ -405,6 +405,15 @@ int main(int argc, char **argv) {
405405
}
406406
}
407407

408+
/**
409+
* Stopping all the processes after all the tests are run
410+
*/
411+
if (!shutdown_processes(g_config, atrt_process::AP_ALL)) {
412+
g_logger.critical("Failed to stop all processes");
413+
return_code =
414+
(return_code == TESTSUITE_SUCCESS) ? ATRT_FAILURE : return_code;
415+
}
416+
408417
if (g_report_file != 0) {
409418
fclose(g_report_file);
410419
g_report_file = 0;

0 commit comments

Comments
 (0)