Skip to content

Commit

Permalink
Upgrade GraalVM version used in tests
Browse files Browse the repository at this point in the history
  • Loading branch information
repolevedavaj committed Dec 10, 2023
1 parent db44a61 commit c90947d
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,12 @@ private void execute() throws Exception {
private String resolveProjectEnvCliExecutableFromPath(AgentInfo agentInfo) throws Exception {
String[] commands = getExecutablePathResolveCommand(agentInfo);

return StringUtils.trimToNull(ProcHelper.executeAndGetStdOut(getContext(), commands));
String stdOut = StringUtils.trimToNull(ProcHelper.executeAndGetStdOut(getContext(), commands));
if (stdOut == null) {
return null;
}

return stdOut.split(agentInfo.getLineSeparator())[0];
}

private String[] getExecutablePathResolveCommand(AgentInfo agentInfo) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,6 @@
public interface AgentInfo extends Serializable {

OperatingSystem getOperatingSystem();
String getLineSeparator();

}
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@ public class AgentInfoCallable extends MasterToSlaveCallable<AgentInfo, Exceptio
public AgentInfo call() throws Exception {
OperatingSystem operatingSystem = getOperatingSystem();

return ImmutableAgentInfo.builder().operatingSystem(operatingSystem).build();
return ImmutableAgentInfo.builder()
.lineSeparator(System.lineSeparator())
.operatingSystem(operatingSystem).build();
}

private OperatingSystem getOperatingSystem() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,8 @@ public void testStepExecution() throws Exception {
assertThat(run.getLog())
// assert that the JDK (including native-image) has been installed
.contains("installing jdk...")
.contains("openjdk version \"17.0.1\" 2021-10-19")
.contains("GraalVM 21.3.0 Java 17 CE (Java Version 17.0.1+12-jvmci-21.3-b05)")
.contains("openjdk version \"17.0.9\" 2023-10-17")
.contains("native-image 17.0.9 2023-10-17")
// assert that Maven has been installed
.contains("installing maven...")
.contains("Apache Maven 3.8.4 (9b656c72d54e5bacbed989b64718c159fe39b537)")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ tools_directory = ".tools"

[jdk]
distribution = "GraalVM CE 17"
distribution_version = "21.3.0"
distribution_version = "23.0.2"
post_extraction_commands = [
"gu install native-image"
]
Expand Down

0 comments on commit c90947d

Please sign in to comment.