[SERVER-3228] Using mongod to shutdown a running server Created: 09/Jun/11  Updated: 03/Sep/11  Resolved: 03/Sep/11

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

Type: New Feature Priority: Minor - P4
Reporter: Jean-Pierre Bergamin Assignee: Unassigned
Resolution: Duplicate Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Participants:

 Description   

Test fixture implementations that start and stop a mongodb instance would be much simpler, if mongod could be used to shut down a running server, e.g. with: mongod --port 12345 --shutdown

Code to set up and tear down a mongodb instance could then be purely static. Currently, an active connection is used to shut down the DB with the "shutdown" command. This means that this approach i.e. cannot be used in @AfterClass annotated methods in JUnit tests, because those methods must be static.



 Comments   
Comment by Eliot Horowitz (Inactive) [ 03/Sep/11 ]

See SERVER-3307

Comment by Scott Hernandez (Inactive) [ 09/Jun/11 ]

You can issues a kill from the OS, or use an external helper script for this. If you are starting the mongod process from your code you can simply kill that process to shut it down.

Generated at Thu Feb 08 03:02:28 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.