joelittlejohn / embedmongo-maven-plugin

Maven plugin wrapper for the flapdoodle.de embedded MongoDB API
Apache License 2.0
88 stars 51 forks source link

Problem with Windows Firewall #21

Closed fljmayer closed 11 years ago

fljmayer commented 11 years ago

The maven plugin extracts the mongod into a unique file every time it runs, for example: C:\users\fmayer\appdata\local\temp\extract-b83962b6-16dc-4d2f-85ea-11e6c64d15c1mongod.exe

This is a problem with the Windows Firewall, because it means I have to approve a new executable to communicate through the Windows Firewall for every build. In my case it would be better if the maven plugin behaved like the basic Java API, i.e. just use the same name for mongod in each run. That fails the build if mongod was not shut down properly, but it's much easier to deal with under Windows.

joelittlejohn commented 11 years ago

Would it help to use 127.0.0.1 as the bind ip? (as per flapdoodle-oss/embedmongo.flapdoodle.de#25)

When you say 'the basic Java API' are you referring to the flapdoodle API on which this plugin is based? This plugin should be behaving in exactly the same was as that basic Java API (we're using the current latest version, 1.31).

joelittlejohn commented 11 years ago

Sorry, accidentally closed that prematurely.

fljmayer commented 11 years ago

I think the issue is the ITempNaming you are using (maybe by default). In our other unit tests we have some code like this: final RuntimeConfig config = new RuntimeConfig(); config.setExecutableNaming(new UserTempNaming()); final MongodStarter starter = MongodStarter.getInstance(config); mongoExecutable = starter.prepare(new MongodConfig(MONGO_DB_VERSION, port, false)); which produces names like 'extract-fmayer-mongod.exe'. Your names look like they come from UUIDTempNaming instead.

fljmayer commented 11 years ago

Binding to 127.0.0.1 does indeed work under Windows. Thanks!

joelittlejohn commented 11 years ago

Good stuff!