[hibernate-dev] [OGM] Embedded MongoDB for tests

Emmanuel Bernard emmanuel at hibernate.org
Fri Jun 28 05:15:46 EDT 2013


This looks like a good idea and fixes the workaround we had around
optional testing based on profiles.
The only drawback is that we still need to make sure OGM is naturally
usable without it but if we use 
https://github.com/joelittlejohn/embedmongo-maven-plugin
it looks like the mongodb instance is started before we test and stopped
after that.

I wonder how you can debug things though and look at the content outside
your tests? I guess you would install a regular mongodb on a different
port.

Emmanuel

On Thu 2013-06-27 14:20, Gunnar Morling wrote:
> Hi all,
> 
> I just came across across "EmbedMongo" [1] which provides a way to run
> MongoDB embedded within an application. This is e.g. convenient for tests
> as it doesn't require a separately installed MongoDB instance.
> 
> I've tried it out with a single test and it worked as expected.
> Unfortunately MongoDB (the server) can't be retrieved as Maven dependency,
> EmbedMongo thus retrieves the distribution via HTTP and stores it in
> ~/.embedmongo/. This only happens once during the first usage.
> 
> What do you think, would that be helpful to be used for the OGM MongoDB
> tests (it might well be that this or similar options have been discussed
> before and I just missed that)?
> 
> --Gunnar
> 
> [1] https://github.com/flapdoodle-oss/embedmongo.flapdoodle.de
> _______________________________________________
> hibernate-dev mailing list
> hibernate-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/hibernate-dev


More information about the hibernate-dev mailing list