diff --git a/community/dbms/src/test/java/org/neo4j/commandline/dbms/DiagnosticsReportCommandTest.java b/community/dbms/src/test/java/org/neo4j/commandline/dbms/DiagnosticsReportCommandTest.java index 1c9ed2b8d4a6..e2727727c928 100644 --- a/community/dbms/src/test/java/org/neo4j/commandline/dbms/DiagnosticsReportCommandTest.java +++ b/community/dbms/src/test/java/org/neo4j/commandline/dbms/DiagnosticsReportCommandTest.java @@ -23,6 +23,7 @@ import org.junit.Before; import org.junit.Rule; import org.junit.Test; +import org.junit.jupiter.api.condition.JRE; import org.junit.rules.ExpectedException; import java.io.ByteArrayOutputStream; @@ -206,7 +207,9 @@ public void listShouldDisplayAllClassifiers() throws Exception @Test public void overrideDestination() throws Exception { - String[] args = {"--to=other/", "all"}; + // because of https://bugs.openjdk.java.net/browse/JDK-8202127 and current surefire behaviour we need to have custom value for JRE >= 11 + String toArgument = JRE.JAVA_11.isCurrentVersion() ? "--to=" + System.getProperty( "user.dir" ) + "/other/" : "--to=other/"; + String[] args = {toArgument, "all"}; try ( RealOutsideWorld outsideWorld = new RealOutsideWorld() ) { DiagnosticsReportCommand diff --git a/community/procedure-compiler/processor/src/test/java/org/neo4j/tooling/procedure/visitors/UserFunctionVisitorTest.java b/community/procedure-compiler/processor/src/test/java/org/neo4j/tooling/procedure/visitors/UserFunctionVisitorTest.java index 1cfe2bcf8366..7cf43a38fe2e 100644 --- a/community/procedure-compiler/processor/src/test/java/org/neo4j/tooling/procedure/visitors/UserFunctionVisitorTest.java +++ b/community/procedure-compiler/processor/src/test/java/org/neo4j/tooling/procedure/visitors/UserFunctionVisitorTest.java @@ -23,6 +23,7 @@ import org.junit.Before; import org.junit.Rule; import org.junit.Test; +import org.junit.jupiter.api.condition.JRE; import java.util.stream.Stream; import javax.lang.model.element.Element; @@ -128,8 +129,9 @@ public void functions_with_non_annotated_parameters_are_invalid() Stream errors = visitor.visit( function ); + String errorMessage = JRE.JAVA_11.isCurrentVersion() ? "@org.neo4j.procedure.Name usage error: missing on parameter " + : "@org.neo4j.procedure.Name usage error: missing on parameter "; assertThat( errors ).hasSize( 1 ).extracting( CompilationMessage::getCategory, CompilationMessage::getContents ) - .contains( tuple( Diagnostic.Kind.ERROR, - "@org.neo4j.procedure.Name usage error: missing on parameter " ) ); + .contains( tuple( Diagnostic.Kind.ERROR, errorMessage ) ); } } diff --git a/pom.xml b/pom.xml index 73030cc46b41..b1f11d210de0 100644 --- a/pom.xml +++ b/pom.xml @@ -91,7 +91,7 @@ 3.3.2 2.11.12 2.11 - 6.1.1 + 6.2 4.0.2 1.8 @@ -935,7 +935,7 @@ [9, ) - --add-exports=java.base/sun.nio.ch=ALL-UNNAMED --add-modules java.xml.bind + --add-exports=java.base/sun.nio.ch=ALL-UNNAMED true -nobootcp