Currently there are multiple ways to launch processes in the shell, some of which return the port number of a started mongo process and never join with it, others which wait for the process to terminate and join with it and return the exit code. There is no good way to get the exit code of a process launched that we don't expect to terminate immediately (like a mongod for example). We should have just one interface for launching processes that is flexible enough to handle both long-running mongod processes and short-lived processes like tools.
There should be one function that launches a process and returns its PID, and another that joins with a PID and returns it's exit code. Those should be the only native code C++ functions built into the shell. The existing javascript functions for launching processes (runMongoProgram, startMongoProgram, runMongoProgramNoConnect, etc.) should then be re-written using these new C++ functions for backwards compatibility sake, and marked as deprecated. New, clean javascript functions should then be written for all new tests that need to launch new sub-processes. This will also need a clean way to handle and distinguish the cases where the newly launches process should and should not have username and password arguments appended to it's command line launch statement for running tests with auth.
- is depended on by
-
SERVER-4237 Enable the full js test suite to run with authentication enabled
- Closed
-
SERVER-7317 Make dur tests pass with auth
- Closed
-
SERVER-7356 Make disk tests pass with auth
- Closed
- is related to
-
SERVER-7914 Regularize how jstests create/request access to mongo clusters
- Backlog