-
Type: Bug
-
Resolution: Done
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: Shell, Testing Infrastructure
-
Fully Compatible
-
ALL
-
v3.2
-
-
Platforms 18 (08/05/16), Platforms 2016-08-26, Platforms 2016-09-19, Platforms 2016-10-10, Platforms 2016-10-31
-
27
Some tests rely on being able to call _runMongoProgram() or _stopMongoProgram() and then make assertions about the program's output using rawMongoProgramOutput(). However, while the process may have exited, the code does not wait for all of the program's output to have been consumed from the pipe and for ProgramOutputMultiplexer::appendLine() to have been called on it.
BSONObj RunMongoProgram(const BSONObj& a, void* data) { ProgramRunner r(a); r.start(); stdx::thread t(r); t.detach(); int exit_code = -123456; // sentinel value wait_for_pid(r.pid(), true, &exit_code); registry.deleteProgram(r.pid()); return BSON(string("") << exit_code); }
- has to be done before
-
SERVER-26601 Remove assert.soon wrappers around rawMongoProgramOutput
- Closed
- is duplicated by
-
SERVER-25076 shell output from exited programs remains after clearing
- Closed
- is related to
-
SERVER-19776 wrap rawMongoProgramOutput in assert.soon
- Closed
-
SERVER-22821 assert in lock_file_fail_to_open.js should be wrapped in assert.soon
- Closed
-
SERVER-23829 Logs from mongos started by the mongo shell are prefixed with "sh" instead of "s"
- Closed
-
SERVER-25335 0002 umask yields world-readable .dbshell history file
- Closed
-
SERVER-22737 make exit_logging.js more robust
- Closed