Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make metadata repo test version-agnostic. #527

Merged
merged 2 commits into from
Oct 18, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,8 @@ class OfficialMetadataRepositoryFunctionalTest extends AbstractGraalVMMavenFunct
outputContains "Customers in the database"

and: "finds metadata in the remote repository"
outputContains "[graalvm reachability metadata repository for com.h2database:h2:2.2.220]: Configuration directory is com.h2database/h2/2.2.220"
outputContains "[graalvm reachability metadata repository for com.h2database:h2:"
outputContains "Configuration directory is com.h2database" + File.separator + "h2" + File.separator
outputDoesNotContain "Falling back to the default repository."
}

Expand All @@ -78,6 +79,7 @@ class OfficialMetadataRepositoryFunctionalTest extends AbstractGraalVMMavenFunct
outputContains "Customers in the database"

and: "finds metadata in the remote repository"
outputContains "[graalvm reachability metadata repository for com.h2database:h2:2.2.220]: Configuration directory is com.h2database/h2/2.2.220"
outputContains "[graalvm reachability metadata repository for com.h2database:h2:"
outputContains "Configuration directory is com.h2database" + File.separator + "h2" + File.separator
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -84,14 +84,15 @@ public static Path getJavaHomeNativeImage(String javaHomeVariable, Boolean failF
throw new MojoExecutionException("Determining GraalVM installation failed with message: " + e.getMessage());
}
} else if (failFast) {
throw new MojoExecutionException("'" + GU_EXE + "' tool was not found. This probably means that JDK at is not a GraalVM distribution.");
throw new MojoExecutionException("'" + GU_EXE + "' tool was not found in your " + javaHomeVariable + "." +
"This probably means that the JDK at '" + graalHomePath + "' is not a GraalVM distribution.");
}
}

if (!Files.exists(nativeImageExe)) {
if (failFast) {
throw new RuntimeException("native-image is not installed in your " + javaHomeVariable + "." +
"This probably means that JDK at is not a GraalVM distribution.");
"This probably means that the JDK at '" + graalHomePath + "' is not a GraalVM distribution.");
} else {
return null;
}
Expand Down