de.flapdoodle.embed:de.flapdoodle.embed.mongo

A embedded mongodb ...


Keywords
hacktoberfest
License
Apache-2.0

Documentation

Build Status Maven Central

Make Peace, No War!

Organization Flapdoodle OSS

We are a github organization. You are invited to participate. Every version < 4.x.x is considered as legacy.

Embedded MongoDB

Embedded MongoDB will provide a platform neutral way for running mongodb in unittests.

Why?

  • dropping databases causing some pains (often you have to wait long time after each test)
  • its easy, much easier as installing right version by hand
  • you can change version per test

How?

  • download mongodb (and cache it)
  • extract it (and cache it)
  • java uses its process api to start and monitor the mongo process
  • you run your tests
  • java kills the mongo process

License

We use http://www.apache.org/licenses/LICENSE-2.0

Dependencies

Build on top of

Other ways to use Embedded MongoDB

Howto

Maven

<dependency>
	<groupId>de.flapdoodle.embed</groupId>
	<artifactId>de.flapdoodle.embed.mongo</artifactId>
	<version>4.12.6</version>
</dependency>

Changelog

Unreleased

4.12.6

  • mongodb 7.0.8

4.12.5

  • bugfix in embed.process

4.12.3

  • alma linux support
  • dependency updates
  • mongodb version support for 7.0.7, 7.3.0, etc

4.12.2

  • bugfix in embed.process

4.12.1

  • dependency updates
  • bugfix in embed.process

4.12.0

  • dependency updates
  • mongodb 7.0.4 version added

4.11.1

  • update mongo driver version
  • setup user and roles
  • init replica set client code backport

4.10.2

  • package resolver dep upgrade

4.10.1

  • debian 12/13 package resolver bugfix

4.10.0

  • customize package resolving
  • use user info in download base url as basic auth information (see)

4.9.3

  • all the good stuff

Spring Integration

As the spring projects removed the embed mongo support in 2.7.0 you should consider to use one of these integration projects. It should behave mostly like the original spring integration, but there are some minor differences:

  • version in 'spring.mongodb.embedded.version' is used in package resolver and is not matched against version enum.
  • 'spring.mongodb.embedded.features' is not supported (not the way to change the config of mongodb)

If you have any trouble in using them feel free to create an issue.