@@ -35,7 +35,7 @@ instead of SQL. This product works by:
3535- [ Manual] ( https://www.mongodb.com/docs/languages/java/mongodb-hibernate/current )
3636- [ API] ( https://javadoc.io/doc/org.mongodb/mongodb-hibernate/latest/index.html )
3737
38- [ Standalone deployments] ( https://www.mongodb.com/docs/manual/reference/glossary/#std-term-standalone ) are not supported,
38+ MongoDB [ standalone deployments] ( https://www.mongodb.com/docs/manual/reference/glossary/#std-term-standalone ) are not supported,
3939because they [ do not support transactions] ( https://www.mongodb.com/docs/manual/core/transactions-production-consideration/ ) .
4040If you use one, you may [ convert it to a replica set] ( https://www.mongodb.com/docs/manual/tutorial/convert-standalone-to-replica-set/ ) .
4141
@@ -46,6 +46,16 @@ The `groupId:artifactId` coordinates: `org.mongodb:mongodb-hibernate`.
4646 - [ Maven Central Repository] ( https://repo.maven.apache.org/maven2/org/mongodb/mongodb-hibernate/ )
4747 - [ Maven Central Repository Search] ( https://central.sonatype.com/artifact/org.mongodb/mongodb-hibernate )
4848
49+ ### Examples
50+
51+ [ Maven] ( https://maven.apache.org/ ) is used as a build tool.
52+
53+ The Java module with example applications is located in
54+
55+ - [ ` ./example-module ` ] ( example-module )
56+
57+ The examples may be run by running the smoke tests as specified in [ Run Smoke Tests] ( #run-smoke-tests ) .
58+
4959### Bug Reports
5060
5161Use [ "Extension for Hibernate ORM" at jira.mongodb.org] ( https://jira.mongodb.org/projects/HIBERNATE/issues ) .
@@ -61,7 +71,7 @@ Use ["Drivers & Frameworks"/"Frameworks (e.g. Django, Hibernate, EFCore)" at fee
6171### Build from Source
6272
6373``` console
64- ./gradlew clean build
74+ ./gradlew build
6575```
6676
6777### Static Code Analysis
@@ -97,19 +107,11 @@ The analysis is done as part of the Gradle `compileJava` task execution.
97107
98108### Testing
99109
100- This project uses separate directories for unit and integration tests:
110+ This project uses separate directories for unit, integration, smoke tests:
101111
102112- [ ` ./src/test ` ] ( src/test )
103113- [ ` ./src/integrationTest ` ] ( src/integrationTest )
104-
105- Integration tests require a MongoDB deployment with test commands enabled, which may be achieved with the
106- [ ` --setParameter enableTestCommands=1 ` ] ( https://www.mongodb.com/docs/manual/reference/parameters/ )
107- command-line arguments.
108-
109- You may change the [ MongoDB connection string] ( https://www.mongodb.com/docs/manual/reference/connection-string/ )
110- via the [ ` jakarta.persistence.jdbc.url ` ] ( https://docs.hibernate.org/orm/6.6/userguide/html_single/#settings-jakarta.persistence.jdbc.url )
111- configuration property
112- in [ ` ./src/integrationTest/resources/hibernate.properties ` ] ( src/integrationTest/resources/hibernate.properties ) .
114+ - [ ` ./example-module/src/smokeTest ` ] ( example-module/src/smokeTest )
113115
114116#### Run Unit Tests
115117
@@ -119,10 +121,38 @@ in [`./src/integrationTest/resources/hibernate.properties`](src/integrationTest/
119121
120122#### Run Integration Tests
121123
124+ The integration tests require a MongoDB deployment that
125+
126+ - is accessible at ` localhost:27017 ` ;
127+ - You may change the [ MongoDB connection string] ( https://www.mongodb.com/docs/manual/reference/connection-string/ )
128+ via the [ ` jakarta.persistence.jdbc.url ` ] ( https://docs.hibernate.org/orm/6.6/userguide/html_single/#settings-jakarta.persistence.jdbc.url )
129+ configuration property
130+ in [ ` ./src/integrationTest/resources/hibernate.properties ` ] ( src/integrationTest/resources/hibernate.properties ) .
131+ - has test commands enabled.
132+ - This may be achieved with the
133+ [ ` --setParameter enableTestCommands=1 ` ] ( https://www.mongodb.com/docs/manual/reference/parameters/ )
134+ command-line arguments.
135+
122136``` console
123137./gradlew integrationTest
124138```
125139
140+ #### Run Smoke Tests
141+
142+ The smoke tests with the ` Tests ` suffix do not require a MongoDB deployment.
143+ The smoke tests with the ` IntegrationTests ` suffix, as well as the examples, require a MongoDB deployment that
144+
145+ - is accessible at ` localhost:27017 ` .
146+ - You may change this by modifying the examples run by the smoke tests.
147+
148+ ``` console
149+ source ./.evergreen/java-config.sh \
150+ && ./gradlew -PjavaVersion=${JAVA_VERSION} publishToMavenLocal \
151+ && ./example-module/mvnw verify --file ./example-module/pom.xml \
152+ -DjavaVersion="${JAVA_VERSION}" \
153+ -DprojectVersion="$(./gradlew -q printProjectVersion)"
154+ ```
155+
126156### Continuous Integration
127- [ Evergreen] ( https://github.com/evergreen-ci/evergreen ) and [ GitHub actions ] ( https://docs.github.com/en/actions )
157+ [ Evergreen] ( https://github.com/evergreen-ci/evergreen ) and [ GitHub Actions ] ( https://docs.github.com/en/actions )
128158are used for continuous integration.
0 commit comments