Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove flapdoodle for testing and update docs. #388

Merged
merged 5 commits into from
Apr 11, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,9 @@ plugins {
id 'io.micronaut.build.internal.mongodb-base'
id 'io.micronaut.build.internal.module'
}

micronautBuild {
binaryCompatibility {
enabled.set(false)
}
}
4 changes: 0 additions & 4 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,3 @@ developers=Graeme Rocher
githubCoreBranch=4.0.x
bomProperty=micronautMongoVersion
bomProperties=mongoVersion,mongoReactiveVersion

hibernateapi=http://docs.jboss.org/hibernate/orm/current/javadocs
jdkapi=https://docs.oracle.com/javase/8/docs/api
jeeapi=https://docs.oracle.com/javaee/6/api
2 changes: 0 additions & 2 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ testcontainers = "1.17.6"

managed-mongo = "4.8.0"
managed-mongo-reactive = "4.8.0"
flapdoodle = "2.2.0"

micronaut-micrometer = "5.0.0-SNAPSHOT"
micronaut-serde = "2.0.0-M1"
Expand All @@ -27,7 +26,6 @@ micronaut-serde = { module = "io.micronaut.serde:micronaut-serde-bom", version.r
micronaut-test = { module = "io.micronaut.test:micronaut-test-bom", version.ref = "micronaut-test" }
micronaut-validation = { module = "io.micronaut.validation:micronaut-validation-bom", version.ref = "micronaut-validation" }

flapdoodle = { module = 'de.flapdoodle.embed:de.flapdoodle.embed.mongo', version.ref = 'flapdoodle'}
testcontainers = { module = "org.testcontainers:testcontainers", version.ref = "testcontainers" }

# PLUGINS
Expand Down
1 change: 0 additions & 1 deletion mongo-core/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ dependencies {
annotationProcessor mn.micronaut.inject.java
annotationProcessor(mnValidation.micronaut.validation.processor)

compileOnly libs.flapdoodle
compileOnly mnSerde.micronaut.serde.bson
compileOnly mnSerde.micronaut.serde.support

Expand Down

This file was deleted.

This file was deleted.

2 changes: 2 additions & 0 deletions src/main/docs/guide/breaks.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
=== Version 5.0.0
Support for testing with `flapdoodle` has been removed. Please use `test-containers` instead as described under xref:#testing[MongoDB and Testing].
9 changes: 3 additions & 6 deletions src/main/docs/guide/testing.adoc
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
https://www.testcontainers.org/[Test Containers] is the recommended way to test Mongo interaction. For Spock tests this is a simple matter of:
The MongoDb support in https://micronaut-projects.github.io/micronaut-test-resources/latest/guide/#modules-mongodb[Micronaut Test Resources] – which uses the Testcontainers library for Java – is the recommended way to test Mongo interaction.

Alternatively, https://www.testcontainers.org/[Testcontainers for Java] can be used directly to test Mongo interaction. For Spock tests this is a simple matter of:

[source,groovy]
----
Expand All @@ -9,8 +11,3 @@ https://www.testcontainers.org/[Test Containers] is the recommended way to test
def setupSpec() {
mongo.start()
}
----

Alternatively, you can add a dependency on https://github.com/flapdoodle-oss/de.flapdoodle.embed.mongo[Embedded MongoDB] and if the MongoDB server is not available on the configured port for the test environment an embedded MongoDB will be bootstrapped and made available for testing:

dependency:de.flapdoodle.embed.mongo[groupId="de.flapdoodle.embed", version="2.0.1", scope="test"]
3 changes: 2 additions & 1 deletion src/main/docs/guide/toc.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
introduction: Introduction
releaseHistory: Release History
breaks: Breaking Changes
setup: Setting up the Mongo Driver
config: Configuring the Mongo Driver
testing: MongoDB and Testing
repository: Repository
repository: Repository