Skip to content

flapdoodle-oss/de.flapdoodle.embed.mongo

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Please make your vote: JDK Support Poll

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.18.0</version>
</dependency>

To enable logging you must choose some matching adapter for slf4j.org This projects uses slf4j-api version 1.7.xx.

Changelog

Unreleased

4.18.0

  • dep updates, mongodb up to 8.0.3

4.17.0

  • dep updates, enhanced proxy support

4.16.2

  • download move atomic exception fix

4.16.1

  • download cache race condition fix

4.16.0

  • download cache error messages
  • os detection fix (amazon detection)

4.15.0

  • mongo shell binary removal fix
  • alpine linux detection
  • mongodb 7.0.12 support
  • os detection fix (use best version if two matches)

4.14.0

  • mongodb 7.0.11 support
  • rocky linux support

4.13.1

  • mongod server start timeout increased from 20s to 30s
  • mongod server start timeout is now configurable

4.13.0

  • mongodb 7.0.9, 8.0.0-rc3
  • detect ubuntu 24.04
  • bugfix in embed.process

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.

About

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

Topics

Resources

License

Stars

Watchers

Forks

Sponsor this project

 

Packages

No packages published

Languages

  • Java 99.9%
  • Shell 0.1%