[SERVER-24256] MongoRunner._startWithArgs should verify that the process connected to has the expected process id Created: 23/May/16  Updated: 06/Dec/22  Resolved: 11/May/20

Status: Closed
Project: Core Server
Component/s: Testing Infrastructure
Affects Version/s: None
Fix Version/s: None

Type: Improvement Priority: Major - P3
Reporter: J Rassi Assignee: Backlog - Server Tooling and Methods (STM) (Inactive)
Resolution: Won't Fix Votes: 0
Labels: PM424, stm, tig-mongorunner
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Duplicate
is duplicated by SERVER-1166 Make ShardingTest Fail on port conflict. Closed
Assigned Teams:
Server Tooling & Methods
Participants:

 Description   

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.



 Comments   
Comment by Ryan Timmons [ 11/May/20 ]

Closing as wont-fix to indicate that there is currently no intention of doing this. Please re-open if there is priority for this. Perhaps this change could self-service by an appropriate server team if this is necessary rather than having to go thru the STM prioritization queue.

Generated at Thu Feb 08 04:05:49 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.