Skip to content

Commit 2e829ba

Browse files
authored
Clarify Neo4j enterprise edition definition in docs (#8149)
1 parent afc94f1 commit 2e829ba

File tree

1 file changed

+13
-6
lines changed

1 file changed

+13
-6
lines changed

docs/modules/databases/neo4j.md

+13-6
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,12 @@
11
# Neo4j Module
22

3-
This module helps running [Neo4j](https://neo4j.com/download/) using Testcontainers.
3+
This module helps to run [Neo4j](https://neo4j.com/download/) using Testcontainers.
44

55
Note that it's based on the [official Docker image](https://hub.docker.com/_/neo4j/) provided by Neo4j, Inc.
66

7+
Even though the latest LTS version of Neo4j 4.4 is used in the examples of this documentation,
8+
the Testcontainers integration supports also newer 5.x images of Neo4j.
9+
710
## Usage example
811

912
Declare your Testcontainers as a `@ClassRule` or `@Rule` in a JUnit 4 test or as static or member attribute of a JUnit 5 test annotated with `@Container` as you would with other Testcontainers.
@@ -17,7 +20,7 @@ The following example uses the JUnit 5 extension `@Testcontainers` and demonstra
1720
[JUnit 5 example](../../../examples/neo4j-container/src/test/java/org/testcontainers/containers/Neo4jExampleTest.java) inside_block:junitExample
1821
<!--/codeinclude-->
1922

20-
You are not limited to Unit tests and can of course use an instance of the Neo4j Testcontainers in vanilla Java code as well.
23+
You are not limited to Unit tests, and you can use an instance of the Neo4j Testcontainers in vanilla Java code as well.
2124

2225
## Additional features
2326

@@ -102,9 +105,13 @@ If you need the Neo4j enterprise license, you can declare your Neo4j container l
102105
[Enterprise edition](../../../modules/neo4j/src/test/java/org/testcontainers/containers/Neo4jContainerTest.java) inside_block:enterpriseEdition
103106
<!--/codeinclude-->
104107

105-
This creates a Testcontainers based on the Docker image build with the Enterprise version of Neo4j.
108+
This creates a Testcontainers based on the Docker image build with the Enterprise version of Neo4j 4.4.
106109
The call to `withEnterpriseEdition` adds the required environment variable that you accepted the terms and condition of the enterprise version.
107-
You accept those by adding a file named `container-license-acceptance.txt` to the root of your classpath containing the text `neo4j:3.5.0-enterprise` in one line.
110+
You accept those by adding a file named `container-license-acceptance.txt` to the root of your classpath containing the text `neo4j:4.4-enterprise` in one line.
111+
112+
If you are planning to run a newer Neo4j 5.x enterprise edition image, you have to manually define the proper enterprise image (e.g. `neo4j:5-enterprise`)
113+
and set the environment variable `NEO4J_ACCEPT_LICENSE_AGREEMENT` by adding `.withEnv("NEO4J_ACCEPT_LICENSE_AGREEMENT", "yes")` to your container definition.
114+
108115
You'll find more information about licensing Neo4j here: [About Neo4j Licenses](https://neo4j.com/licensing/).
109116

110117

@@ -131,14 +138,14 @@ Add the following dependency to your `pom.xml`/`build.gradle` file:
131138

132139
=== "Gradle"
133140
```groovy
134-
compile "org.neo4j.driver:neo4j-java-driver:4.4.3"
141+
compile "org.neo4j.driver:neo4j-java-driver:4.4.13"
135142
```
136143

137144
=== "Maven"
138145
```xml
139146
<dependency>
140147
<groupId>org.neo4j.driver</groupId>
141148
<artifactId>neo4j-java-driver</artifactId>
142-
<version>4.4.3</version>
149+
<version>4.4.13</version>
143150
</dependency>
144151
```

0 commit comments

Comments
 (0)