|
The changes from a417e97 as part of SERVER-39172 made it so MongoRunner.stopMongod() skips calling wait_for_pid() in shell_utils_launcher.cpp. It is then the responsibility of ReplSetTest#stopSet() to actually wait for the mongod processes to finish terminating. However, it doesn't do anything with the returned exitCode other than logging its value.
ReplSetTest#stopSet() should throw a JavaScript exception in a similar fashion to MongoRunner.stopMongod().
// If we are not waiting for shutdown, then there is no exit code to check.
|
if (!waitpid) {
|
return 0;
|
}
|
if (allowedExitCode !== returnCode) {
|
throw new MongoRunner.StopError(returnCode);
|
} else if (returnCode !== MongoRunner.EXIT_CLEAN) {
|
print("MongoDB process on port " + port + " intentionally exited with error code ",
|
returnCode);
|
}
|
|