diff --git a/packages/mongodb-memory-server-core/src/util/MongoInstance.ts b/packages/mongodb-memory-server-core/src/util/MongoInstance.ts index bec9c8434..1d159b7a5 100644 --- a/packages/mongodb-memory-server-core/src/util/MongoInstance.ts +++ b/packages/mongodb-memory-server-core/src/util/MongoInstance.ts @@ -585,9 +585,7 @@ export class MongoInstance extends EventEmitter implements ManagerBase { MongoInstanceEvents.instanceError, new StdoutInstanceError( `Instance Failed to start with "${execptionMatch[1] ?? 'unknown'}". Original Error:\n` + - line - .substring(execptionMatch.index + execptionMatch[0].length) - .replace(/, terminating$/gi, '') + line.substring(execptionMatch.index + execptionMatch[0].length) ) ); } diff --git a/packages/mongodb-memory-server-core/src/util/__tests__/__snapshots__/MongoInstance.test.ts.snap b/packages/mongodb-memory-server-core/src/util/__tests__/__snapshots__/MongoInstance.test.ts.snap index 359b60731..200c0f818 100644 --- a/packages/mongodb-memory-server-core/src/util/__tests__/__snapshots__/MongoInstance.test.ts.snap +++ b/packages/mongodb-memory-server-core/src/util/__tests__/__snapshots__/MongoInstance.test.ts.snap @@ -10,22 +10,22 @@ exports[`MongodbInstance test events checkErrorInLine() should emit "instanceErr exports[`MongodbInstance test events stdoutHandler() should emit "instanceError" when "excepetion in initAndListen" is thrown DbPathInUse (Not a directory) 1`] = ` "Instance Failed to start with \\"DBPathInUse\\". Original Error: -Unable to create/open the lock file: /dev/null/mongod.lock (Not a directory). Ensure the user executing mongod is the owner of the lock file and has the appropriate permissions. Also make sure that another mongod instance is not already running on the /dev/null directory" +Unable to create/open the lock file: /dev/null/mongod.lock (Not a directory). Ensure the user executing mongod is the owner of the lock file and has the appropriate permissions. Also make sure that another mongod instance is not already running on the /dev/null directory, terminating" `; exports[`MongodbInstance test events stdoutHandler() should emit "instanceError" when "excepetion in initAndListen" is thrown DbPathInUse (already running) 1`] = ` "Instance Failed to start with \\"DBPathInUse\\". Original Error: -Unable to lock the lock file: /tmp/hellodb/mongod.lock (Resource temporarily unavailable). Another mongod instance is already running on the /tmp/hellodb directory" +Unable to lock the lock file: /tmp/hellodb/mongod.lock (Resource temporarily unavailable). Another mongod instance is already running on the /tmp/hellodb directory, terminating" `; exports[`MongodbInstance test events stdoutHandler() should emit "instanceError" when "excepetion in initAndListen" is thrown Location28596 1`] = ` "Instance Failed to start with \\"Location28596\\". Original Error: -Unable to determine status of lock file in the data directory /root: boost::filesystem::status: Permission denied: \\"/root/mongod.lock\\"" +Unable to determine status of lock file in the data directory /root: boost::filesystem::status: Permission denied: \\"/root/mongod.lock\\", terminating" `; exports[`MongodbInstance test events stdoutHandler() should emit "instanceError" when "excepetion in initAndListen" is thrown NonExistentPath 1`] = ` "Instance Failed to start with \\"NonExistentPath\\". Original Error: -Data directory /tmp/hello not found. Create the missing directory or specify another path using (1) the --dbpath command line option, or (2) by adding the 'storage.dbPath' option in the configuration file." +Data directory /tmp/hello not found. Create the missing directory or specify another path using (1) the --dbpath command line option, or (2) by adding the 'storage.dbPath' option in the configuration file., terminating" `; exports[`MongodbInstance test events stdoutHandler() should emit "instanceError" when curl-open-ssl-3 is not found 1`] = `