Unit Testing And Starting MongoDb Server

Posted by azamsharp on Stack Overflow See other posts from Stack Overflow or by azamsharp
Published on 2010-05-28T23:55:43Z Indexed on 2010/05/29 0:02 UTC
Read the original article Hit count: 270

Filed under:
|

I am running some unit test that persist documents into the MongoDb database. For this unit test to succeed the MongoDb server must be started. I perform this by using Process.Start("mongod.exe").

It works but sometimes it takes time to start and before it even starts the unit test tries to run and FAILS. Unit test fails and complains that the mongodb server is not running.

What to do in such situation?

© Stack Overflow or respective owner

Related posts about unit-testing

Related posts about unit