I created a UnitTest that uses ephemeral-mongo for creating a mongo collection. When running the unit test first, it is completed successfully. After that first run, I can see in Activity Monitor that mongod is still running. When I attempt a second run, the unit test fails with a ConnectionTimeout:
System.TimeoutException : MongoDB connection availability took longer than the specified timeout of 10 seconds. Consider increasing the value of 'ConnectionTimeout'.
at EphemeralMongo.MongodProcess.StartAndWaitForConnectionReadiness()
at EphemeralMongo.MongodProcess.Start()
at EphemeralMongo.MongoRunner.RunInternal()
at EphemeralMongo.MongoRunner.Run(MongoRunnerOptions options)
at MongoRunnerProvider.Get() in
When I manually kill the mongod process, the unit test sucessfully runs again.
I used the MongoRunnerProvider from the provided gist. I run the unit tests in VS Code on Mac OS. NuGet dependencies used are
Dear all,
I created a UnitTest that uses ephemeral-mongo for creating a mongo collection. When running the unit test first, it is completed successfully. After that first run, I can see in Activity Monitor that mongod is still running. When I attempt a second run, the unit test fails with a ConnectionTimeout:
When I manually kill the mongod process, the unit test sucessfully runs again.
I used the
MongoRunnerProvider
from the provided gist. I run the unit tests in VS Code on Mac OS. NuGet dependencies used are