newExcludes = new HashSet<>(excludes);
newExcludes.add(key);
diff --git a/driver/src/test/java/org/neo4j/driver/util/ProcessEnvConfigurator.java b/driver/src/test/java/org/neo4j/driver/util/ProcessEnvConfigurator.java
deleted file mode 100644
index 7c60e7e02c..0000000000
--- a/driver/src/test/java/org/neo4j/driver/util/ProcessEnvConfigurator.java
+++ /dev/null
@@ -1,64 +0,0 @@
-/*
- * Copyright (c) "Neo4j"
- * Neo4j Sweden AB [http://neo4j.com]
- *
- * This file is part of Neo4j.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.neo4j.driver.util;
-
-public final class ProcessEnvConfigurator {
- /**
- * Name of environment variable used by the Neo4j database.
- */
- private static final String JAVA_HOME = "JAVA_HOME";
- /**
- * Name of environment variable to be used for the Neo4j database, defined by the build system.
- */
- private static final String NEO4J_JAVA = "NEO4J_JAVA";
- /**
- * Name of an optional environment variable containing file path to a local Neo4j package.
- * This package is used by boltkit instead of downloading a package with the specified Neo4j version.
- */
- private static final String BOLTKIT_LOCAL_PACKAGE = "NEOCTRL_LOCAL_PACKAGE";
-
- private ProcessEnvConfigurator() {}
-
- public static void configure(ProcessBuilder processBuilder) {
- processBuilder.environment().put(JAVA_HOME, determineJavaHome());
-
- String localPackage = determineLocalPackage();
- if (localPackage != null) {
- processBuilder.environment().put(BOLTKIT_LOCAL_PACKAGE, localPackage);
- }
- }
-
- /**
- * This driver is built to work with multiple java versions. Neo4j, however, works with a specific version of
- * Java. This allows specifying which Java version to use for Neo4j separately from which version to use for
- * the driver tests.
- *
- * This method determines which java home to use based on present environment variables.
- *
- * @return path to the java home.
- */
- private static String determineJavaHome() {
- return System.getenv().getOrDefault(NEO4J_JAVA, System.getProperties().getProperty("java.home"));
- }
-
- private static String determineLocalPackage() {
- String value = System.getenv().getOrDefault(BOLTKIT_LOCAL_PACKAGE, "").trim();
- return value.isEmpty() ? null : value;
- }
-}
diff --git a/driver/src/test/java/org/neo4j/driver/util/cc/CommandLineException.java b/driver/src/test/java/org/neo4j/driver/util/cc/CommandLineException.java
deleted file mode 100644
index d245aaaee0..0000000000
--- a/driver/src/test/java/org/neo4j/driver/util/cc/CommandLineException.java
+++ /dev/null
@@ -1,29 +0,0 @@
-/*
- * Copyright (c) "Neo4j"
- * Neo4j Sweden AB [http://neo4j.com]
- *
- * This file is part of Neo4j.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.neo4j.driver.util.cc;
-
-class CommandLineException extends RuntimeException {
- CommandLineException(String message) {
- super(message);
- }
-
- CommandLineException(String message, Throwable cause) {
- super(message, cause);
- }
-}
diff --git a/driver/src/test/java/org/neo4j/driver/util/cc/CommandLineUtil.java b/driver/src/test/java/org/neo4j/driver/util/cc/CommandLineUtil.java
deleted file mode 100644
index b6027238ad..0000000000
--- a/driver/src/test/java/org/neo4j/driver/util/cc/CommandLineUtil.java
+++ /dev/null
@@ -1,109 +0,0 @@
-/*
- * Copyright (c) "Neo4j"
- * Neo4j Sweden AB [http://neo4j.com]
- *
- * This file is part of Neo4j.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.neo4j.driver.util.cc;
-
-import static java.lang.System.lineSeparator;
-import static java.util.Arrays.asList;
-import static java.util.concurrent.TimeUnit.MINUTES;
-
-import java.io.BufferedReader;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.InputStreamReader;
-import java.util.List;
-import java.util.concurrent.Callable;
-import java.util.concurrent.ExecutorService;
-import java.util.concurrent.Executors;
-import java.util.concurrent.Future;
-import org.neo4j.driver.util.DaemonThreadFactory;
-import org.neo4j.driver.util.ProcessEnvConfigurator;
-
-public class CommandLineUtil {
- private static final ExecutorService executor =
- Executors.newCachedThreadPool(new DaemonThreadFactory("command-line-thread-"));
-
- public static boolean boltKitAvailable() {
- try {
- executeCommand("neoctrl-cluster", "--help");
- return true;
- } catch (CommandLineException e) {
- return false;
- }
- }
-
- public static String executeCommand(List commands) {
- try {
- ProcessBuilder processBuilder = new ProcessBuilder().command(commands);
- ProcessEnvConfigurator.configure(processBuilder);
- return executeAndGetStdOut(processBuilder);
- } catch (IOException | CommandLineException e) {
- throw new CommandLineException("Error running command " + commands, e);
- } catch (InterruptedException e) {
- Thread.currentThread().interrupt();
- throw new CommandLineException("Interrupted while waiting for command " + commands, e);
- }
- }
-
- public static String executeCommand(String... command) {
- return executeCommand(asList(command));
- }
-
- private static String executeAndGetStdOut(ProcessBuilder processBuilder) throws IOException, InterruptedException {
- Process process = processBuilder.start();
- Future stdOutFuture = read(process.getInputStream());
- Future stdErrFuture = read(process.getErrorStream());
- int exitCode = process.waitFor();
- String stdOut = get(stdOutFuture);
- String stdErr = get(stdErrFuture);
- if (exitCode != 0) {
- throw new CommandLineException("Non-zero exit code\nSTDOUT:\n" + stdOut + "\nSTDERR:\n" + stdErr);
- }
- return stdOut;
- }
-
- private static Future read(final InputStream input) {
- return executor.submit(new Callable() {
- @Override
- public String call() throws Exception {
- return readToString(input);
- }
- });
- }
-
- private static String readToString(InputStream input) {
- StringBuilder result = new StringBuilder();
- try (BufferedReader reader = new BufferedReader(new InputStreamReader(input))) {
- String line;
- while ((line = reader.readLine()) != null) {
- result.append(line).append(lineSeparator());
- }
- } catch (IOException e) {
- throw new CommandLineException("Unable to read from stream", e);
- }
- return result.toString();
- }
-
- private static T get(Future future) {
- try {
- return future.get(10, MINUTES);
- } catch (Exception e) {
- throw new RuntimeException(e);
- }
- }
-}
diff --git a/driver/src/test/resources/logback-test.xml b/driver/src/test/resources/logback-test.xml
new file mode 100644
index 0000000000..ea9a2a3fac
--- /dev/null
+++ b/driver/src/test/resources/logback-test.xml
@@ -0,0 +1,14 @@
+
+
+
+ %d{HH:mm:ss.SSS} [%thread] %-5level %logger - %msg%n
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/driver/src/test/resources/nginx.conf b/driver/src/test/resources/nginx.conf
new file mode 100644
index 0000000000..4b8694ed11
--- /dev/null
+++ b/driver/src/test/resources/nginx.conf
@@ -0,0 +1,30 @@
+user nginx;
+worker_processes auto;
+
+error_log /var/log/nginx/error.log notice;
+pid /var/run/nginx.pid;
+
+
+events {
+ worker_connections 1024;
+}
+
+stream {
+ server {
+ resolver 127.0.0.11 ipv6=off;
+
+ set $upstream neo4j:7687;
+
+ listen 7687;
+ proxy_pass $upstream;
+ }
+
+ server {
+ resolver 127.0.0.11 ipv6=off;
+
+ set $upstream neo4j:7474;
+
+ listen 7474;
+ proxy_pass $upstream;
+ }
+}
\ No newline at end of file
diff --git a/examples/pom.xml b/examples/pom.xml
index a18bd4456a..eddc9f5683 100644
--- a/examples/pom.xml
+++ b/examples/pom.xml
@@ -74,6 +74,10 @@
neo4j
test
+
+ org.bouncycastle
+ bcpkix-jdk15on
+
diff --git a/examples/src/test/java/org/neo4j/docs/driver/ExamplesIT.java b/examples/src/test/java/org/neo4j/docs/driver/ExamplesIT.java
index b92fce2084..e62d97a2da 100644
--- a/examples/src/test/java/org/neo4j/docs/driver/ExamplesIT.java
+++ b/examples/src/test/java/org/neo4j/docs/driver/ExamplesIT.java
@@ -36,8 +36,6 @@
import static org.neo4j.driver.Values.parameters;
import static org.neo4j.driver.internal.util.Neo4jEdition.ENTERPRISE;
import static org.neo4j.driver.internal.util.Neo4jFeature.BOLT_V4;
-import static org.neo4j.driver.util.Neo4jRunner.PASSWORD;
-import static org.neo4j.driver.util.Neo4jRunner.USER;
import static org.neo4j.driver.util.TestUtil.await;
import static org.neo4j.driver.util.TestUtil.createDatabase;
import static org.neo4j.driver.util.TestUtil.dropDatabase;
@@ -52,8 +50,6 @@
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.RegisterExtension;
-import org.junit.jupiter.api.parallel.Execution;
-import org.junit.jupiter.api.parallel.ExecutionMode;
import org.neo4j.driver.Config;
import org.neo4j.driver.Driver;
import org.neo4j.driver.Session;
@@ -70,8 +66,9 @@
import org.neo4j.driver.util.TestUtil;
@ParallelizableIT
-@Execution(ExecutionMode.CONCURRENT)
class ExamplesIT {
+ static final String USER = "neo4j";
+
@RegisterExtension
static final DatabaseExtension neo4j = new DatabaseExtension();
@@ -128,7 +125,8 @@ void setUp() {
@Test
void testShouldRunAutocommitTransactionExample() throws Exception {
// Given
- try (AutocommitTransactionExample example = new AutocommitTransactionExample(uri, USER, PASSWORD)) {
+ try (AutocommitTransactionExample example =
+ new AutocommitTransactionExample(uri, USER, neo4j.adminPassword())) {
// When
example.addPerson("Alice");
@@ -139,7 +137,8 @@ void testShouldRunAutocommitTransactionExample() throws Exception {
@Test
void testShouldRunAsyncAutocommitTransactionExample() throws Exception {
- try (AsyncAutocommitTransactionExample example = new AsyncAutocommitTransactionExample(uri, USER, PASSWORD)) {
+ try (AsyncAutocommitTransactionExample example =
+ new AsyncAutocommitTransactionExample(uri, USER, neo4j.adminPassword())) {
// create some 'Product' nodes
try (Session session = neo4j.driver().session()) {
session.run("UNWIND ['Tesseract', 'Orb', 'Eye of Agamotto'] AS item "
@@ -157,7 +156,7 @@ void testShouldAsyncRunResultConsumeExample() throws Exception {
// Given
write("CREATE (a:Person {name: 'Alice'})");
write("CREATE (a:Person {name: 'Bob'})");
- try (AsyncResultConsumeExample example = new AsyncResultConsumeExample(uri, USER, PASSWORD)) {
+ try (AsyncResultConsumeExample example = new AsyncResultConsumeExample(uri, USER, neo4j.adminPassword())) {
// When
List names = await(example.getPeople());
@@ -171,7 +170,8 @@ void testShouldAsyncRunMultipleTransactionExample() throws Exception {
// Given
write("CREATE (a:Person {name: 'Alice'})");
write("CREATE (a:Person {name: 'Bob'})");
- try (AsyncRunMultipleTransactionExample example = new AsyncRunMultipleTransactionExample(uri, USER, PASSWORD)) {
+ try (AsyncRunMultipleTransactionExample example =
+ new AsyncRunMultipleTransactionExample(uri, USER, neo4j.adminPassword())) {
// When
Integer nodesCreated = await(example.addEmployees("Acme"));
@@ -186,7 +186,7 @@ void testShouldAsyncRunMultipleTransactionExample() throws Exception {
@Test
void testShouldRunConfigConnectionPoolExample() throws Exception {
// Given
- try (ConfigConnectionPoolExample example = new ConfigConnectionPoolExample(uri, USER, PASSWORD)) {
+ try (ConfigConnectionPoolExample example = new ConfigConnectionPoolExample(uri, USER, neo4j.adminPassword())) {
// Then
assertTrue(example.canConnect());
}
@@ -195,7 +195,7 @@ void testShouldRunConfigConnectionPoolExample() throws Exception {
@Test
void testShouldRunBasicAuthExample() throws Exception {
// Given
- try (BasicAuthExample example = new BasicAuthExample(uri, USER, PASSWORD)) {
+ try (BasicAuthExample example = new BasicAuthExample(uri, USER, neo4j.adminPassword())) {
// Then
assertTrue(example.canConnect());
}
@@ -204,7 +204,8 @@ void testShouldRunBasicAuthExample() throws Exception {
@Test
void testShouldRunConfigConnectionTimeoutExample() throws Exception {
// Given
- try (ConfigConnectionTimeoutExample example = new ConfigConnectionTimeoutExample(uri, USER, PASSWORD)) {
+ try (ConfigConnectionTimeoutExample example =
+ new ConfigConnectionTimeoutExample(uri, USER, neo4j.adminPassword())) {
// Then
assertThat(example, instanceOf(ConfigConnectionTimeoutExample.class));
}
@@ -213,7 +214,7 @@ void testShouldRunConfigConnectionTimeoutExample() throws Exception {
@Test
void testShouldRunConfigMaxRetryTimeExample() throws Exception {
// Given
- try (ConfigMaxRetryTimeExample example = new ConfigMaxRetryTimeExample(uri, USER, PASSWORD)) {
+ try (ConfigMaxRetryTimeExample example = new ConfigMaxRetryTimeExample(uri, USER, neo4j.adminPassword())) {
// Then
assertThat(example, instanceOf(ConfigMaxRetryTimeExample.class));
}
@@ -222,7 +223,7 @@ void testShouldRunConfigMaxRetryTimeExample() throws Exception {
@Test
void testShouldRunConfigTrustExample() throws Exception {
// Given
- try (ConfigTrustExample example = new ConfigTrustExample(uri, USER, PASSWORD)) {
+ try (ConfigTrustExample example = new ConfigTrustExample(uri, USER, neo4j.adminPassword())) {
// Then
assertThat(example, instanceOf(ConfigTrustExample.class));
}
@@ -231,7 +232,7 @@ void testShouldRunConfigTrustExample() throws Exception {
@Test
void testShouldRunConfigUnencryptedExample() throws Exception {
// Given
- try (ConfigUnencryptedExample example = new ConfigUnencryptedExample(uri, USER, PASSWORD)) {
+ try (ConfigUnencryptedExample example = new ConfigUnencryptedExample(uri, USER, neo4j.adminPassword())) {
// Then
assertThat(example, instanceOf(ConfigUnencryptedExample.class));
}
@@ -240,7 +241,7 @@ void testShouldRunConfigUnencryptedExample() throws Exception {
@Test
void testShouldRunCypherErrorExample() throws Exception {
// Given
- try (CypherErrorExample example = new CypherErrorExample(uri, USER, PASSWORD)) {
+ try (CypherErrorExample example = new CypherErrorExample(uri, USER, neo4j.adminPassword())) {
// When & Then
StdIOCapture stdIO = new StdIOCapture();
try (AutoCloseable ignored = stdIO.capture()) {
@@ -255,7 +256,7 @@ void testShouldRunCypherErrorExample() throws Exception {
@Test
void testShouldRunDriverLifecycleExample() throws Exception {
// Given
- try (DriverLifecycleExample example = new DriverLifecycleExample(uri, USER, PASSWORD)) {
+ try (DriverLifecycleExample example = new DriverLifecycleExample(uri, USER, neo4j.adminPassword())) {
// Then
assertThat(example, instanceOf(DriverLifecycleExample.class));
}
@@ -264,7 +265,7 @@ void testShouldRunDriverLifecycleExample() throws Exception {
@Test
void testShouldRunHelloWorld() throws Exception {
// Given
- try (HelloWorldExample greeter = new HelloWorldExample(uri, USER, PASSWORD)) {
+ try (HelloWorldExample greeter = new HelloWorldExample(uri, USER, neo4j.adminPassword())) {
// When
StdIOCapture stdIO = new StdIOCapture();
@@ -285,7 +286,8 @@ void testShouldRunDriverIntroduction() throws Exception {
.withEncryption()
.withTrustStrategy(trustAllCertificates())
.build();
- try (DriverIntroductionExample intro = new DriverIntroductionExample(uri, USER, PASSWORD, config)) {
+ try (DriverIntroductionExample intro =
+ new DriverIntroductionExample(uri, USER, neo4j.adminPassword(), config)) {
// When
StdIOCapture stdIO = new StdIOCapture();
@@ -304,7 +306,7 @@ void testShouldRunDriverIntroduction() throws Exception {
@Test
void testShouldRunReadWriteTransactionExample() throws Exception {
// Given
- try (ReadWriteTransactionExample example = new ReadWriteTransactionExample(uri, USER, PASSWORD)) {
+ try (ReadWriteTransactionExample example = new ReadWriteTransactionExample(uri, USER, neo4j.adminPassword())) {
// When
long nodeID = example.addPerson("Alice");
@@ -318,7 +320,7 @@ void testShouldRunResultConsumeExample() throws Exception {
// Given
write("CREATE (a:Person {name: 'Alice'})");
write("CREATE (a:Person {name: 'Bob'})");
- try (ResultConsumeExample example = new ResultConsumeExample(uri, USER, PASSWORD)) {
+ try (ResultConsumeExample example = new ResultConsumeExample(uri, USER, neo4j.adminPassword())) {
// When
List names = example.getPeople();
@@ -332,7 +334,7 @@ void testShouldRunResultRetainExample() throws Exception {
// Given
write("CREATE (a:Person {name: 'Alice'})");
write("CREATE (a:Person {name: 'Bob'})");
- try (ResultRetainExample example = new ResultRetainExample(uri, USER, PASSWORD)) {
+ try (ResultRetainExample example = new ResultRetainExample(uri, USER, neo4j.adminPassword())) {
// When
example.addEmployees("Acme");
@@ -346,15 +348,15 @@ void testShouldRunResultRetainExample() throws Exception {
@Test
void testShouldRunServiceUnavailableExample() throws Exception {
// Given
- try (ServiceUnavailableExample example = new ServiceUnavailableExample(uri, USER, PASSWORD)) {
+ try (ServiceUnavailableExample example = new ServiceUnavailableExample(uri, USER, neo4j.adminPassword())) {
try {
// When
- neo4j.stopDb();
+ neo4j.stopProxy();
// Then
assertThat(example.addItem(), equalTo(false));
} finally {
- neo4j.startDb();
+ neo4j.startProxy();
}
}
}
@@ -362,7 +364,7 @@ void testShouldRunServiceUnavailableExample() throws Exception {
@Test
void testShouldRunSessionExample() throws Exception {
// Given
- try (SessionExample example = new SessionExample(uri, USER, PASSWORD)) {
+ try (SessionExample example = new SessionExample(uri, USER, neo4j.adminPassword())) {
// When
example.addPerson("Alice");
@@ -375,7 +377,7 @@ void testShouldRunSessionExample() throws Exception {
@Test
void testShouldRunTransactionFunctionExample() throws Exception {
// Given
- try (TransactionFunctionExample example = new TransactionFunctionExample(uri, USER, PASSWORD)) {
+ try (TransactionFunctionExample example = new TransactionFunctionExample(uri, USER, neo4j.adminPassword())) {
// When
example.addPerson("Alice");
@@ -387,7 +389,8 @@ void testShouldRunTransactionFunctionExample() throws Exception {
@Test
void testShouldConfigureTransactionTimeoutExample() throws Exception {
// Given
- try (TransactionTimeoutConfigExample example = new TransactionTimeoutConfigExample(uri, USER, PASSWORD)) {
+ try (TransactionTimeoutConfigExample example =
+ new TransactionTimeoutConfigExample(uri, USER, neo4j.adminPassword())) {
// When
example.addPerson("Alice");
@@ -399,7 +402,8 @@ void testShouldConfigureTransactionTimeoutExample() throws Exception {
@Test
void testShouldConfigureTransactionMetadataExample() throws Exception {
// Given
- try (TransactionMetadataConfigExample example = new TransactionMetadataConfigExample(uri, USER, PASSWORD)) {
+ try (TransactionMetadataConfigExample example =
+ new TransactionMetadataConfigExample(uri, USER, neo4j.adminPassword())) {
// When
example.addPerson("Alice");
@@ -410,7 +414,8 @@ void testShouldConfigureTransactionMetadataExample() throws Exception {
@Test
void testShouldRunAsyncTransactionFunctionExample() throws Exception {
- try (AsyncTransactionFunctionExample example = new AsyncTransactionFunctionExample(uri, USER, PASSWORD)) {
+ try (AsyncTransactionFunctionExample example =
+ new AsyncTransactionFunctionExample(uri, USER, neo4j.adminPassword())) {
// create some 'Product' nodes
try (Session session = neo4j.driver().session()) {
session.run(
@@ -432,7 +437,7 @@ void testShouldRunAsyncTransactionFunctionExample() throws Exception {
@Test
void testPassBookmarksExample() throws Exception {
- try (PassBookmarkExample example = new PassBookmarkExample(uri, USER, PASSWORD)) {
+ try (PassBookmarkExample example = new PassBookmarkExample(uri, USER, neo4j.adminPassword())) {
// When
example.addEmployAndMakeFriends();
@@ -458,7 +463,8 @@ void testPassBookmarksExample() throws Exception {
@Test
void testAsyncUnmanagedTransactionExample() throws Exception {
- try (AsyncUnmanagedTransactionExample example = new AsyncUnmanagedTransactionExample(uri, USER, PASSWORD)) {
+ try (AsyncUnmanagedTransactionExample example =
+ new AsyncUnmanagedTransactionExample(uri, USER, neo4j.adminPassword())) {
// create a 'Product' node
try (Session session = neo4j.driver().session()) {
session.run("CREATE (:Product {id: 0, title: 'Mind Gem'})");
@@ -491,7 +497,7 @@ void testSlf4jLogging() throws Exception {
assertThat(logFileContent, is(emptyString()));
String randomString = UUID.randomUUID().toString();
- try (Slf4jLoggingExample example = new Slf4jLoggingExample(uri, USER, PASSWORD)) {
+ try (Slf4jLoggingExample example = new Slf4jLoggingExample(uri, USER, neo4j.adminPassword())) {
Object result = example.runReturnQuery(randomString);
assertEquals(randomString, result);
}
@@ -505,7 +511,7 @@ void testSlf4jLogging() throws Exception {
@Test
void testHostnameVerificationExample() {
try (HostnameVerificationExample example =
- new HostnameVerificationExample(uri, USER, PASSWORD, neo4j.tlsCertFile())) {
+ new HostnameVerificationExample(uri, USER, neo4j.adminPassword(), neo4j.tlsCertFile())) {
assertTrue(example.canConnect());
}
}
@@ -513,7 +519,8 @@ void testHostnameVerificationExample() {
@Test
@EnabledOnNeo4jWith(BOLT_V4)
void testShouldRunRxAutocommitTransactionExample() throws Exception {
- try (RxAutocommitTransactionExample example = new RxAutocommitTransactionExample(uri, USER, PASSWORD)) {
+ try (RxAutocommitTransactionExample example =
+ new RxAutocommitTransactionExample(uri, USER, neo4j.adminPassword())) {
// create some 'Product' nodes
try (Session session = neo4j.driver().session()) {
session.run("UNWIND ['Tesseract', 'Orb', 'Eye of Agamotto'] AS item "
@@ -532,7 +539,8 @@ void testShouldRunRxAutocommitTransactionExample() throws Exception {
@Test
@EnabledOnNeo4jWith(BOLT_V4)
void testRxUnmanagedTransactionExample() throws Exception {
- try (RxUnmanagedTransactionExample example = new RxUnmanagedTransactionExample(uri, USER, PASSWORD)) {
+ try (RxUnmanagedTransactionExample example =
+ new RxUnmanagedTransactionExample(uri, USER, neo4j.adminPassword())) {
// create a 'Product' node
try (Session session = neo4j.driver().session()) {
session.run("CREATE (:Product {id: 0, title: 'Mind Gem'})");
@@ -551,7 +559,8 @@ void testRxUnmanagedTransactionExample() throws Exception {
@Test
@EnabledOnNeo4jWith(BOLT_V4)
void testShouldRunRxTransactionFunctionExampleReactor() throws Exception {
- try (RxTransactionFunctionExample example = new RxTransactionFunctionExample(uri, USER, PASSWORD)) {
+ try (RxTransactionFunctionExample example =
+ new RxTransactionFunctionExample(uri, USER, neo4j.adminPassword())) {
// create some 'Product' nodes
try (Session session = neo4j.driver().session()) {
session.run(
@@ -576,7 +585,8 @@ void testShouldRunRxTransactionFunctionExampleReactor() throws Exception {
@Test
@EnabledOnNeo4jWith(BOLT_V4)
void testShouldRunRxTransactionFunctionExampleRxJava() throws Exception {
- try (RxTransactionFunctionExample example = new RxTransactionFunctionExample(uri, USER, PASSWORD)) {
+ try (RxTransactionFunctionExample example =
+ new RxTransactionFunctionExample(uri, USER, neo4j.adminPassword())) {
// create some 'Product' nodes
try (Session session = neo4j.driver().session()) {
session.run(
@@ -604,7 +614,7 @@ void testShouldRunRxResultConsumeExampleReactor() throws Exception {
// Given
write("CREATE (a:Person {name: 'Alice'})");
write("CREATE (a:Person {name: 'Bob'})");
- try (RxResultConsumeExample example = new RxResultConsumeExample(uri, USER, PASSWORD)) {
+ try (RxResultConsumeExample example = new RxResultConsumeExample(uri, USER, neo4j.adminPassword())) {
// When
List names = await(example.getPeople());
@@ -619,7 +629,7 @@ void testShouldRunRxResultConsumeExampleRxJava() throws Exception {
// Given
write("CREATE (a:Person {name: 'Alice'})");
write("CREATE (a:Person {name: 'Bob'})");
- try (RxResultConsumeExample example = new RxResultConsumeExample(uri, USER, PASSWORD)) {
+ try (RxResultConsumeExample example = new RxResultConsumeExample(uri, USER, neo4j.adminPassword())) {
// When
List names = await(example.getPeopleRxJava());
@@ -635,7 +645,7 @@ void testUseAnotherDatabaseExample() throws Exception {
dropDatabase(driver, "examples");
createDatabase(driver, "examples");
- try (DatabaseSelectionExample example = new DatabaseSelectionExample(uri, USER, PASSWORD)) {
+ try (DatabaseSelectionExample example = new DatabaseSelectionExample(uri, USER, neo4j.adminPassword())) {
// When
example.useAnotherDatabaseExample();
@@ -647,7 +657,7 @@ void testUseAnotherDatabaseExample() throws Exception {
@Test
void testReadingValuesExample() throws Exception {
- try (ReadingValuesExample example = new ReadingValuesExample(uri, USER, PASSWORD)) {
+ try (ReadingValuesExample example = new ReadingValuesExample(uri, USER, neo4j.adminPassword())) {
assertThat(example.integerFieldIsNull(), is(false));
assertThat(example.integerAsInteger(), is(4));
assertThat(example.integerAsLong(), is(4L));
diff --git a/pom.xml b/pom.xml
index 2d8518ec9a..3b27e6d983 100644
--- a/pom.xml
+++ b/pom.xml
@@ -22,7 +22,7 @@
${project.groupId}.${project.artifactId}
${project.basedir}
- 1C
+ 2
parallelizableIT
3.0.0-M6
diff --git a/testkit-tests/pom.xml b/testkit-tests/pom.xml
index 797f846888..7437177ad6 100644
--- a/testkit-tests/pom.xml
+++ b/testkit-tests/pom.xml
@@ -19,7 +19,7 @@
${project.basedir}/..
https://github.com/neo4j-drivers/testkit.git
- 4.4
+ 5.0
--tests TESTKIT_TESTS INTEGRATION_TESTS STUB_TESTS STRESS_TESTS TLS_TESTS
7200000