diff --git a/.github/actions/build/action.yml b/.github/actions/build/action.yml index 1966010b3b21..affd2a3201fe 100644 --- a/.github/actions/build/action.yml +++ b/.github/actions/build/action.yml @@ -22,7 +22,7 @@ inputs: base_image_java: description: "The Java Docker image under which this test case will run" required: false - default: "adoptopenjdk/openjdk8:alpine" + default: "eclipse-temurin:8-jdk" base_image_tomcat: description: "The Tomcat Docker image under which this test case will run" required: false diff --git a/.github/workflows/plugins-jdk17-test.0.yaml b/.github/workflows/plugins-jdk17-test.0.yaml index d5bd5db8d8a6..45edcbac480e 100644 --- a/.github/workflows/plugins-jdk17-test.0.yaml +++ b/.github/workflows/plugins-jdk17-test.0.yaml @@ -47,7 +47,7 @@ jobs: - name: Build uses: ./.github/actions/build with: - base_image_java: eclipse-temurin:17-alpine + base_image_java: eclipse-temurin:17-jdk base_image_tomcat: tomcat:8.5-jdk17-openjdk test: diff --git a/CHANGES.md b/CHANGES.md index 45489342e7b4..068dbc817942 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -5,7 +5,7 @@ Release Notes. 8.14.0 ------------------ - +* Polish test framework to support `arm64/v8` platforms #### Documentation diff --git a/docs/en/setup/service-agent/java-agent/Plugin-test.md b/docs/en/setup/service-agent/java-agent/Plugin-test.md index a2df65cd59c1..d4af2a425d0d 100644 --- a/docs/en/setup/service-agent/java-agent/Plugin-test.md +++ b/docs/en/setup/service-agent/java-agent/Plugin-test.md @@ -20,7 +20,7 @@ The test framework provides `JVM-container` and `Tomcat-container` base images i ### JVM-container Image Introduction -[JVM-container](../../../../../test/plugin/containers/jvm-container) uses `adoptopenjdk/openjdk8:alpine-jre` as the base image. `JVM-container` supports JDK8 and JDK17 as well in CI, which inherits `adoptopenjdk/openjdk8:alpine-jre` and `eclipse-temurin:17-alpine`. +[JVM-container](../../../../../test/plugin/containers/jvm-container) uses `eclipse-temurin:8-jdk` as the base image. `JVM-container` supports JDK8 and JDK17 as well in CI, which inherits `eclipse-temurin:8-jdk` and `eclipse-temurin:17-jdk`. It is supported to custom the base Java docker image by specify `base_image_java`. The test case project must be packaged as `project-name.zip`, including `startup.sh` and uber jar, by using `mvn clean package`. diff --git a/test/plugin/containers/jvm-container/pom.xml b/test/plugin/containers/jvm-container/pom.xml index bb8fdeb60637..65d4045469a8 100644 --- a/test/plugin/containers/jvm-container/pom.xml +++ b/test/plugin/containers/jvm-container/pom.xml @@ -36,7 +36,7 @@ io.fabric8 docker-maven-plugin - 0.33.0 + 0.40.2 @@ -52,7 +52,9 @@ chmod +x /usr/local/skywalking/run.sh tar -xvf ../tools/skywalking-mock-collector.tar.gz -C ../tools - apk add --no-cache bash curl + apt-get update -y + apt-get install -y unzip + rm -rf /var/lib/apt/lists/* ["/usr/local/skywalking/run.sh"] diff --git a/test/plugin/containers/jvm-container/src/main/docker/run.sh b/test/plugin/containers/jvm-container/src/main/docker/run.sh index 3307374cf7e4..592fb93b3c24 100644 --- a/test/plugin/containers/jvm-container/src/main/docker/run.sh +++ b/test/plugin/containers/jvm-container/src/main/docker/run.sh @@ -102,7 +102,7 @@ java -jar \ -Xmx256m -Xms256m \ -DcaseName="${SCENARIO_NAME}-${SCENARIO_VERSION}" \ -DtestCasePath=${SCENARIO_HOME}/data/ \ - ${TOOLS_HOME}/skywalking-validator.jar 1>${LOGS_HOME}/validatolr.out + ${TOOLS_HOME}/skywalking-validator.jar 1>${LOGS_HOME}/validator.out status=$? if [[ $status -eq 0 ]]; then diff --git a/test/plugin/containers/tomcat-container/pom.xml b/test/plugin/containers/tomcat-container/pom.xml index afeaf3c6b369..22db29af9480 100644 --- a/test/plugin/containers/tomcat-container/pom.xml +++ b/test/plugin/containers/tomcat-container/pom.xml @@ -36,7 +36,7 @@ io.fabric8 docker-maven-plugin - 0.33.0 + 0.40.2 diff --git a/test/plugin/run.sh b/test/plugin/run.sh index 8056ec65e61d..3d3e1648399e 100755 --- a/test/plugin/run.sh +++ b/test/plugin/run.sh @@ -31,7 +31,7 @@ scenarios_home="${home}/scenarios" num_of_testcases= container_image_version="1.0.0" -base_image_java="adoptopenjdk/openjdk8:alpine" +base_image_java="eclipse-temurin:8-jdk" base_image_tomcat="tomcat:8.5-jdk8-openjdk" jacoco_version="${JACOCO_VERSION:-0.8.6}" @@ -148,6 +148,14 @@ agent_home_selector() { _agent_home=${target_agent_home} } +remove_dir() { + dir=$1 + if [[ "${os}" == "Darwin" ]]; then + find ${dir} -type d -exec chmod -a "$(whoami) deny delete" {} \; + fi + rm -rf $dir +} + start_stamp=`date +%s` parse_commandline "$@" @@ -257,7 +265,7 @@ do bash ${case_work_base}/scenario.sh $debug_mode 1>${case_work_logs_dir}/${testcase_name}.log status=$? if [[ $status == 0 ]]; then - [[ -z $debug_mode ]] && rm -rf ${case_work_base} + [[ -z $debug_mode ]] && remove_dir ${case_work_base} else exitWithMessage "Testcase ${testcase_name} failed!" fi