All releases

v2.0.0

mongo-test-utils becomes Bonsai: new group, new artefacts, new packages, new annotation, new property namespace, and nothing else.

Highlights

  • 01

    The library is now Bonsai

    Everything a consumer names changed, and nothing a consumer relies on behaves differently. Coordinates: io.gitlab.guisseppe → io.typecheck; spring-mongo-test-utils → bonsai-spring-boot; mongo-test-utils → bonsai-junit; mongo-test-utils-core → bonsai-core; mongo-test-utils-bom → bonsai-bom. Packages: io.gitlab.guisseppe.mongo.test → io.typecheck.bonsai (assertions under .assertions, engine under .core), io.gitlab.guisseppe.mongo.test.junit → io.typecheck.bonsai.junit, io.gitlab.guisseppe.spring.mongo.test → io.typecheck.bonsai.spring. Annotation: @MongoTestServer → @EnableMongoEmulator, still in two variants: the Spring Boot one in io.typecheck.bonsai.spring and the plain JUnit 5 one in io.typecheck.bonsai.junit. @MongoSeed and @MongoSeeds keep their names and move to io.typecheck.bonsai.junit. The 1.x artefacts stay on Maven Central; they simply stop receiving releases.

    Read the guide →
  • 02

    Durability is an artefact, not a hand-picked dependency

    The new io.typecheck:bonsai-durability module is the supported way to turn on the file-backed debug store. Add it at test scope and it delivers Nitrite's MVStore persistence adapter transitively, at exactly the version the shim was built against. This replaces the old advice to add org.dizitart:nitrite-mvstore-adapter by hand and keep its version in step yourself. It carries no code of its own, and the adapter stays optional inside bonsai-core, so the in-memory default still pulls nothing.

    Read the guide →
  • 03

    The bonsai.* property namespace

    Every property the library owns moved from spring.mongodb.test.* to bonsai.*: bonsai.mode, bonsai.cleanup, bonsai.collections, bonsai.indexes-file, bonsai.seed.locations, bonsai.seed.mode, bonsai.bean-overrides.enabled, bonsai.neutralise-properties, bonsai.object-mapper-bean-name, bonsai.passthrough.uri, bonsai.passthrough.allow-remote, bonsai.durability.directory, and the published bonsai.active. Spring's own connection properties are untouched: spring.mongodb.uri, spring.mongodb.host, spring.mongodb.port and spring.mongodb.database belong to Spring, and the harness still publishes and neutralises those exact names.

    Read the guide →

Full notes

Breaking changes

  • New coordinates. The publishing group is io.typecheck and every artefact is renamed: spring-mongo-test-utils → bonsai-spring-boot, mongo-test-utils → bonsai-junit, mongo-test-utils-core → bonsai-core, mongo-test-utils-bom → bonsai-bom, with bonsai-parent as the reactor parent. All modules and the BOM release together on one version train, as before. The 1.x coordinates remain resolvable on Maven Central and receive no further releases.
  • New package roots. io.gitlab.guisseppe.mongo.test → io.typecheck.bonsai, io.gitlab.guisseppe.mongo.test.assertions → io.typecheck.bonsai.assertions, io.gitlab.guisseppe.mongo.test.junit → io.typecheck.bonsai.junit, io.gitlab.guisseppe.mongo.test.core.* → io.typecheck.bonsai.core.*, and io.gitlab.guisseppe.spring.mongo.test → io.typecheck.bonsai.spring. No type was renamed, moved between modules, or changed signature: MongoTestSupport, MongoTestData, MongoTestAwait, MongoAssertions, MongoFieldMatchers and the rest are the same classes under new package names.
  • New annotation name. @MongoTestServer is now @EnableMongoEmulator. The two-variant design is unchanged. io.typecheck.bonsai.spring.EnableMongoEmulator boots the application context against the embedded store, while io.typecheck.bonsai.junit.EnableMongoEmulator is the framework-agnostic harness. The attributes (databases, collections, defaultDatabase) are identical. @MongoSeed and @MongoSeeds keep their names in io.typecheck.bonsai.junit. A test class cannot mix the 1.x and 2.0.0 generations: the annotation and its extension must come from the same one.
  • New property namespace. The spring.mongodb.test.* prefix became bonsai.*, key for key, with defaults unchanged. spring.mongodb.test.cleanup is now bonsai.cleanup, spring.mongodb.test.seed.locations is now bonsai.seed.locations, and so on for mode, collections, indexes-file, seed.mode, bean-overrides.enabled, neutralise-properties, object-mapper-bean-name, passthrough.uri, passthrough.allow-remote and durability.directory. The harness publishes bonsai.active=true in place of the old marker. spring.mongodb.uri, spring.mongodb.host, spring.mongodb.port and spring.mongodb.database are Spring's own properties and are not renamed. They are still published and neutralised under exactly those names. YAML users must re-nest: the block is now top-level bonsai:, not spring: mongodb: test:.
  • New system property and environment variables. The plain-JUnit durability switch mongo.test.durability.directory is now bonsai.durability.directory, matching the Spring property exactly, so mvn test -Dbonsai.durability.directory=target/mongo-debug works in both harnesses. The differential evaluation lane's overrides are likewise BONSAI_REFERENCE_BACKEND, BONSAI_REFERENCE_IMAGE, BONSAI_REFERENCE_URI, BONSAI_REFERENCE_INIT_RS and BONSAI_SKIP_REFERENCE.

Added

  • io.typecheck:bonsai-durability, a new opt-in artefact for the file-backed debug store. Declaring it at test scope delivers org.dizitart:nitrite-mvstore-adapter transitively at the version bonsai-core was built against, so enabling bonsai.durability.directory no longer means hand-picking org.dizitart coordinates and keeping their version aligned with the embedded store. The artefact carries no code; the adapter stays optional inside bonsai-core so the in-memory default remains dependency-free, and it is managed by bonsai-bom alongside the other modules.

Changed

  • The documentation site, the README and the bundled AI agent skill are rebranded throughout: coordinates, imports, annotations, properties and prose all describe Bonsai 2.0.0. The GitLab project is renamed to gitlab.com/guisseppe/bonsai and the documentation site to guisseppe.gitlab.io/bonsai. GitLab redirects from the old paths keep existing links working; the further move to the typecheck.io domain remains a separate infrastructure step. A Migrating from mongo-test-utils 1.x section on the Installation page carries the full old→new mapping.
  • No behavioural change. The driver shim, the aggregation, filter, update, codec, transaction and seeding engines, the cleanup model, the parallel-execution rules, the passthrough mode and the whole assertion vocabulary are exactly as they shipped in 1.3.0. The differential lane runs the same corpus against real MongoDB 7.x and 8.x, and the emulated surface, the fail-fast boundaries and the compatibility matrix are unchanged. A migration is a find-and-replace.
  • The library's own test stack moved to JUnit Jupiter 6.1.3 (from 5.11.4), with a single junit-bom governing every module in the reactor; Surefire and Failsafe moved to 3.5.6 to match. jqwik stays at 1.10.1 because it is the current release, there is no Platform 6 specific line, and the generative differential lane runs green with jqwik's Platform artefacts upgraded in place by the BOM. Spring Boot 4.1's BOM already managed junit-jupiter 6.0.3, so bonsai-spring-boot and the evaluation module were on the 6 line already; the reactor pin is now applied uniformly and sits one version ahead of Boot's. Nothing a consumer relies on changed: no type, annotation or signature moved, and the full gate passes unchanged. It covers 562 differential scenarios against a real Testcontainers mongo:8.0, the generative lane, and every module's suite. Consumers' own JUnit version is decided by their build. bonsai-junit carries junit-jupiter-api at compile scope, so a build that manages nothing now resolves 6.1.3 transitively, while a build that pins JUnit 5 keeps JUnit 5 if it is 5.13 or newer. 2.0.0 moved the extension's class-scoped teardown off the deprecated CloseableResource onto an AutoCloseable store value, the mechanism JUnit introduced in 5.13, so that teardown does not run on an older Jupiter; per-method cleanup is unaffected on any 5.x. The minimum supported JUnit is therefore 5.13 (or any 6.x). Every other Jupiter API the extension touches is binary compatible across the 5.13+ and 6.x lines.