Skip to content

Commit

Permalink
Updated README (#30)
Browse files Browse the repository at this point in the history
  • Loading branch information
asimmon authored Mar 9, 2023
1 parent 585f59c commit 0fb2044
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ This project is very much inspired from [Mongo2Go](https://github.com/Mongo2Go/M
* There is a separate NuGet package for each operating system and MongoDB version so it's easier to support new major versions,
* The latest MongoDB binaries are safely downloaded and verified by GitHub actions during the build or release workflow, reducing the Git repository size,
* There's less chances of memory, files and directory leaks. The startup is faster by using C# threading primitives such as `ManualResetEventSlim`.
* The CI tests the generated packages against .NET 4.6.2, .NET Core 3.1 and .NET 6 using the latest GitHub build agents for Ubuntu, macOS and Windows.
* The CI tests the generated packages against .NET 4.6.2 and .NET 6 using the latest GitHub build agents for Ubuntu, macOS and Windows.


## Downloads
Expand Down Expand Up @@ -50,7 +50,8 @@ var options = new MongoRunnerOptions
// EXPERIMENTAL - Only works on Windows and modern .NET (netcoreapp3.1, net5.0, net6.0, net7.0 and so on):
// Ensures that all MongoDB child processes are killed when the current process is prematurely killed,
// for instance when killed from the task manager or the IDE unit tests window.
// for instance when killed from the task manager or the IDE unit tests window. Processes are managed as a unit using
// job objects: https://learn.microsoft.com/en-us/windows/win32/procthread/job-objects
KillMongoProcessesWhenCurrentProcessExits = true // Default: false
};

Expand Down Expand Up @@ -103,7 +104,13 @@ Do this:
```


## Tips
## Windows Defender Firewall prompt

On Windows, you might get a **Windows Defender Firewall prompt**.
This is because this EphemeralMongo starts the `mongod.exe` process from your build output directory, and `mongod.exe` tries to [open an available port](https://github.com/asimmon/ephemeral-mongo/blob/1.0.0/src/EphemeralMongo.Core/MongoRunner.cs#L64).


## Optimization tips

Avoid calling `MongoRunner.Run` concurrently, as this will create many `mongod` processes and make your operating system slower.
Instead, try to use a single instance and reuse it - create as many databases as you need, one per test for example.
Expand Down

0 comments on commit 0fb2044

Please sign in to comment.