From 7df63d386274c3f6b4f874041fc6aa5d17235f19 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 | 17 ++++++++++------- test/helpers.sh | 6 ++---- 2 files changed, 12 insertions(+), 11 deletions(-) diff --git a/test/compile_test.sh b/test/compile_test.sh index 2d610ff8..27d9c46d 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() { @@ -32,6 +26,10 @@ testCompileWithoutSystemProperties() { assertCapturedSuccess + echo "================" + cat "$STD_OUT" + echo "================" + _assertMavenLatest assertCaptured "Installing OpenJDK 1.8" assertTrue "Java should be present in runtime." "[ -d ${BUILD_DIR}/.jdk ]" @@ -49,7 +47,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 +120,11 @@ testCustomSettingsXmlWithUrl() testCustomSettingsXmlWithInvalidUrl() { createPom + # Set OpenJDK version explicitly to avoid getting a warning on stderr which would + # trip assertCapturedError + cat > ${BUILD_DIR}/system.properties <