-
Type: Improvement
-
Resolution: Won't Fix
-
Priority: Major - P3
-
None
-
Affects Version/s: None
-
Component/s: Testing Infrastructure
-
Server Tooling & Methods
MongoRunner._startWithArgs starts a MongoDB process, connects to the process on the specified port, and returns this connection. However, it never verifies that the process connected to was the one that was started. This complicates the diagnosis process for tests that fail to shut down their MongoDB processes correctly, causing later tests to connect to the wrong MongoDB instance (the MongoDB processes started by the later tests will often fail with an "address in use" error when this happens).
MongoRunner._startWithArgs should verify that the connection returned is associated with a process of the same pid as the pid that was returned from MongoRunner._startMongoProgram. This verification can be performed with db.serverStatus().pid.
- is duplicated by
-
SERVER-1166 Make ShardingTest Fail on port conflict.
- Closed