Skip to content

Commit ff9a7ab

Browse files
author
Zhen Li
committed
Merge branch '1.7' into 2.0
2 parents f5de7b9 + 00522bc commit ff9a7ab

File tree

5 files changed

+34
-42
lines changed

5 files changed

+34
-42
lines changed

driver/pom.xml

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -48,11 +48,7 @@
4848
</dependency>
4949
<dependency>
5050
<groupId>org.junit.jupiter</groupId>
51-
<artifactId>junit-jupiter-engine</artifactId>
52-
</dependency>
53-
<dependency>
54-
<groupId>org.junit.jupiter</groupId>
55-
<artifactId>junit-jupiter-params</artifactId>
51+
<artifactId>junit-jupiter</artifactId>
5652
</dependency>
5753
<dependency>
5854
<groupId>org.rauschig</groupId>

driver/src/main/javadoc/overview.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ <h3>Example</h3>
3232
// and makes handling errors much easier.
3333
try (Transaction tx = session.beginTransaction())
3434
{
35-
tx.run("MERGE (a:Person {name: {x}})", parameters("x", name));
35+
tx.run("MERGE (a:Person {name: $x})", parameters("x", name));
3636
tx.success(); // Mark this write as successful.
3737
}
3838
}
@@ -44,7 +44,7 @@ <h3>Example</h3>
4444
{
4545
// Auto-commit transactions are a quick and easy way to wrap a read.
4646
StatementResult result = session.run(
47-
"MATCH (a:Person) WHERE a.name STARTS WITH {x} RETURN a.name AS name",
47+
"MATCH (a:Person) WHERE a.name STARTS WITH $x RETURN a.name AS name",
4848
parameters("x", initial));
4949
// Each Cypher execution returns a stream of records.
5050
while (result.hasNext())

driver/src/test/java/org/neo4j/driver/v1/integration/TrustCustomCertificateIT.java

Lines changed: 28 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,16 @@
1818
*/
1919
package org.neo4j.driver.v1.integration;
2020

21+
import org.junit.jupiter.api.AfterAll;
22+
import org.junit.jupiter.api.BeforeAll;
2123
import org.junit.jupiter.api.Test;
2224
import org.junit.jupiter.api.extension.RegisterExtension;
2325

2426
import java.io.File;
27+
import java.io.IOException;
28+
import java.nio.file.Files;
29+
import java.nio.file.Path;
30+
import java.nio.file.StandardCopyOption;
2531
import java.util.function.Supplier;
2632

2733
import org.neo4j.driver.v1.Config;
@@ -42,11 +48,32 @@
4248
import static org.neo4j.driver.v1.util.CertificateToolUtil.createNewCertificateAndKeySignedBy;
4349

4450
@ParallelizableIT
45-
public class TrustCustomCertificateIT
51+
class TrustCustomCertificateIT
4652
{
4753
@RegisterExtension
4854
static final DatabaseExtension neo4j = new DatabaseExtension();
4955

56+
private static Path originalKeyFile;
57+
private static Path originalCertFile;
58+
59+
@BeforeAll
60+
static void beforeAll() throws IOException
61+
{
62+
originalKeyFile = Files.createTempFile( "key-file-", "" );
63+
originalCertFile = Files.createTempFile( "cert-file-", "" );
64+
65+
Files.copy( neo4j.tlsKeyFile().toPath(), originalKeyFile , StandardCopyOption.REPLACE_EXISTING);
66+
Files.copy( neo4j.tlsCertFile().toPath(), originalCertFile, StandardCopyOption.REPLACE_EXISTING );
67+
}
68+
69+
@AfterAll
70+
static void afterAll() throws Exception
71+
{
72+
neo4j.updateEncryptionKeyAndCert( originalKeyFile.toFile(), originalCertFile.toFile() );
73+
Files.deleteIfExists( originalKeyFile );
74+
Files.deleteIfExists( originalCertFile );
75+
}
76+
5077
@Test
5178
void shouldAcceptServerWithCertificateSignedByDriverCertificate() throws Throwable
5279
{

examples/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343
</dependency>
4444
<dependency>
4545
<groupId>org.junit.jupiter</groupId>
46-
<artifactId>junit-jupiter-engine</artifactId>
46+
<artifactId>junit-jupiter</artifactId>
4747
</dependency>
4848
<dependency>
4949
<groupId>org.rauschig</groupId>

pom.xml

Lines changed: 2 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,7 @@
1010
<maven.compiler.target>1.8</maven.compiler.target>
1111
<rootDir>${project.basedir}</rootDir>
1212
<surefire.and.failsafe.version>2.22.1</surefire.and.failsafe.version>
13-
<junit.version>5.3.1</junit.version>
14-
<junit.platform.version>1.3.1</junit.platform.version>
13+
<junit.version>5.4.0</junit.version>
1514
<parallelizable.it.forkCount>1C</parallelizable.it.forkCount>
1615
<!-- All tests tagged are to be executed in parallel -->
1716
<parallelizable.it.tags>parallelizableIT</parallelizable.it.tags>
@@ -84,13 +83,7 @@
8483
</dependency>
8584
<dependency>
8685
<groupId>org.junit.jupiter</groupId>
87-
<artifactId>junit-jupiter-engine</artifactId>
88-
<version>${junit.version}</version>
89-
<scope>test</scope>
90-
</dependency>
91-
<dependency>
92-
<groupId>org.junit.jupiter</groupId>
93-
<artifactId>junit-jupiter-params</artifactId>
86+
<artifactId>junit-jupiter</artifactId>
9487
<version>${junit.version}</version>
9588
<scope>test</scope>
9689
</dependency>
@@ -328,18 +321,6 @@
328321
<argLine>${surefire.and.failsafe.argLine}</argLine>
329322
<trimStackTrace>false</trimStackTrace>
330323
</configuration>
331-
<dependencies>
332-
<dependency>
333-
<groupId>org.junit.platform</groupId>
334-
<artifactId>junit-platform-launcher</artifactId>
335-
<version>${junit.platform.version}</version>
336-
</dependency>
337-
<dependency>
338-
<groupId>org.junit.jupiter</groupId>
339-
<artifactId>junit-jupiter-engine</artifactId>
340-
<version>${junit.version}</version>
341-
</dependency>
342-
</dependencies>
343324
</plugin>
344325
<plugin>
345326
<groupId>org.apache.maven.plugins</groupId>
@@ -378,18 +359,6 @@
378359
</configuration>
379360
</execution>
380361
</executions>
381-
<dependencies>
382-
<dependency>
383-
<groupId>org.junit.platform</groupId>
384-
<artifactId>junit-platform-launcher</artifactId>
385-
<version>${junit.platform.version}</version>
386-
</dependency>
387-
<dependency>
388-
<groupId>org.junit.jupiter</groupId>
389-
<artifactId>junit-jupiter-engine</artifactId>
390-
<version>${junit.version}</version>
391-
</dependency>
392-
</dependencies>
393362
</plugin>
394363
</plugins>
395364
</build>

0 commit comments

Comments
 (0)