From e859a7d88ae077402b86b1f526b6fd3ad87710dc Mon Sep 17 00:00:00 2001 From: Manuel Fuchs Date: Wed, 3 Jul 2024 10:25:54 +0200 Subject: [PATCH] WIP --- test/compile_test.sh | 15 +++++++-------- test/helpers.sh | 8 +++----- 2 files changed, 10 insertions(+), 13 deletions(-) diff --git a/test/compile_test.sh b/test/compile_test.sh index 2d610ff8..4348841d 100644 --- a/test/compile_test.sh +++ b/test/compile_test.sh @@ -7,12 +7,6 @@ assertCapturedSuccess() { assertEquals 0 "${RETURN}" - if [ "$TRAVIS" = "true" ]; then - # Travis keeps injecting -Xmn option on JDK8 that causes a warning in STR_ERR - assertTrue true - else - assertEquals "" "$(cat ${STD_ERR})" - fi } setupJavaEnv() { @@ -33,7 +27,7 @@ testCompileWithoutSystemProperties() { assertCapturedSuccess _assertMavenLatest - assertCaptured "Installing OpenJDK 1.8" + assertCaptured "Installing OpenJDK 21" assertTrue "Java should be present in runtime." "[ -d ${BUILD_DIR}/.jdk ]" assertTrue "Java version file should be present." "[ -f ${BUILD_DIR}/.jdk/version ]" assertTrue "system.properties was not cached" "[ -f $CACHE_DIR/system.properties ]" @@ -49,7 +43,7 @@ testCompile() _assertMavenLatest assertTrue "system.properties was not cached" "[ -f $CACHE_DIR/system.properties ]" - assertContains "system.properties contains the wrong version" "java.runtime.version=1.8" "$(cat $CACHE_DIR/system.properties)" + assertContains "system.properties contains the wrong version" "java.runtime.version=21" "$(cat $CACHE_DIR/system.properties)" } testCompilationFailure() @@ -122,6 +116,11 @@ testCustomSettingsXmlWithUrl() testCustomSettingsXmlWithInvalidUrl() { createPom + # Set OpenJDK version explicitly to avoid getting a warning on stderr which would + # trip assertCapturedError + cat > ${BUILD_DIR}/system.properties <