diff --git a/.github/workflows/selfhost_intergration.yml b/.github/workflows/selfhost_intergration.yml index 42986135362..a6b54334e07 100644 --- a/.github/workflows/selfhost_intergration.yml +++ b/.github/workflows/selfhost_intergration.yml @@ -77,7 +77,7 @@ jobs: bash ${{ github.job }}/openmldb-${{ env.E_VERSION }}-linux/sbin/deploy-all.sh bash ${{ github.job }}/openmldb-${{ env.E_VERSION }}-linux/sbin/start-all.sh - name: test - run: bash test/steps/openmldb-apiserver-test.sh -j 0.0.0 -d deploy + run: bash test/steps/openmldb-integration-test.sh -j 0.0.0 -d deploy -m apiserver - name: stop openmldb if: always() run: bash ${{ github.job }}/openmldb-${{ env.E_VERSION }}-linux/sbin/stop-all.sh @@ -102,6 +102,7 @@ jobs: server_port: 995 username: ${{ secrets.MAIL_USERNAME }} password: ${{ secrets.MAIL_PASSWORD }} + secure: true subject: OpenMLDB Memory Test body: OpenMLDB Memory Test Failed html_body: test/integration-test/openmldb-test-java/openmldb-sdk-test/target/surefire-reports/html/overview.html @@ -129,7 +130,7 @@ jobs: bash ${{ github.job }}/openmldb-${{ env.E_VERSION }}-linux/sbin/deploy-all.sh bash ${{ github.job }}/openmldb-${{ env.E_VERSION }}-linux/sbin/start-all.sh - name: test - run: bash test/steps/openmldb-javasdk-integration.sh -j 0.0.0 -c test_cluster.xml -d deploy -l "0" -s "memory" + run: bash test/steps/openmldb-integration-test.sh -j 0.0.0 -c test_cluster.xml -d deploy -l "0" -s "memory" - name: stop openmldb if: always() run: bash ${{ github.job }}/openmldb-${{ env.E_VERSION }}-linux/sbin/stop-all.sh @@ -154,6 +155,7 @@ jobs: server_port: 995 username: ${{ secrets.MAIL_USERNAME }} password: ${{ secrets.MAIL_PASSWORD }} + secure: true subject: OpenMLDB Memory Test body: OpenMLDB Memory Test Failed html_body: test/integration-test/openmldb-test-java/openmldb-sdk-test/target/surefire-reports/html/overview.html @@ -182,7 +184,7 @@ jobs: bash ${{ github.job }}/openmldb-${{ env.E_VERSION }}-linux/sbin/deploy-all.sh bash ${{ github.job }}/openmldb-${{ env.E_VERSION }}-linux/sbin/start-all.sh - name: test - run: bash test/steps/openmldb-javasdk-integration.sh -j 0.0.0 -c test_cluster.xml -d deploy -l "1,2,3,4,5" -s "memory" + run: bash test/steps/openmldb-integration-test.sh -j 0.0.0 -c test_cluster.xml -d deploy -l "1,2,3,4,5" -s "memory" - name: stop openmldb if: always() run: bash ${{ github.job }}/openmldb-${{ env.E_VERSION }}-linux/sbin/stop-all.sh @@ -207,6 +209,7 @@ jobs: server_port: 995 username: ${{ secrets.MAIL_USERNAME }} password: ${{ secrets.MAIL_PASSWORD }} + secure: true subject: OpenMLDB Memory Test body: OpenMLDB Memory Test Failed html_body: test/integration-test/openmldb-test-java/openmldb-sdk-test/target/surefire-reports/html/overview.html @@ -236,7 +239,7 @@ jobs: bash ${{ github.job }}/openmldb-${{ env.E_VERSION }}-linux/sbin/deploy-all.sh bash ${{ github.job }}/openmldb-${{ env.E_VERSION }}-linux/sbin/start-all.sh - name: test - run: bash test/steps/openmldb-javasdk-integration.sh -j 0.0.0 -c test_cluster_disk.xml -d deploy -l "0" -s "hdd" + run: bash test/steps/openmldb-integration-test.sh -j 0.0.0 -c test_cluster_disk.xml -d deploy -l "0" -s "hdd" - name: stop openmldb if: always() run: bash ${{ github.job }}/openmldb-${{ env.E_VERSION }}-linux/sbin/stop-all.sh @@ -261,6 +264,7 @@ jobs: server_port: 995 username: ${{ secrets.MAIL_USERNAME }} password: ${{ secrets.MAIL_PASSWORD }} + secure: true subject: OpenMLDB HDD Test body: OpenMLDB HDD Test Failed html_body: test/integration-test/openmldb-test-java/openmldb-sdk-test/target/surefire-reports/html/overview.html @@ -289,7 +293,7 @@ jobs: bash ${{ github.job }}/openmldb-${{ env.E_VERSION }}-linux/sbin/deploy-all.sh bash ${{ github.job }}/openmldb-${{ env.E_VERSION }}-linux/sbin/start-all.sh - name: test - run: bash test/steps/openmldb-javasdk-integration.sh -j 0.0.0 -c test_cluster_disk.xml -d deploy -l "0" -s "ssd" + run: bash test/steps/openmldb-integration-test.sh -j 0.0.0 -c test_cluster_disk.xml -d deploy -l "0" -s "ssd" - name: stop openmldb if: always() run: bash ${{ github.job }}/openmldb-${{ env.E_VERSION }}-linux/sbin/stop-all.sh @@ -314,6 +318,7 @@ jobs: server_port: 995 username: ${{ secrets.MAIL_USERNAME }} password: ${{ secrets.MAIL_PASSWORD }} + secure: true subject: OpenMLDB SSD Test body: OpenMLDB SSD Test Failed html_body: test/integration-test/openmldb-test-java/openmldb-sdk-test/target/surefire-reports/html/overview.html @@ -343,7 +348,7 @@ jobs: bash ${{ github.job }}/openmldb-${{ env.E_VERSION }}-linux/sbin/stop-taskmanager.sh bash HADOOP_CONF_DIR=/mnt/hdd0/denglong/openmldb_runner_work/hadoop ${{ github.job }}/openmldb-${{ env.E_VERSION }}-linux/sbin/stop-taskmanager.sh - name: test - run: bash test/steps/openmldb-javasdk-integration.sh -j 0.0.0 -c test_yarn.xml -d deploy -l "0" -s "memory" + run: bash test/steps/openmldb-integration-test.sh -j 0.0.0 -c test_yarn.xml -d deploy -l "0" -s "memory" - name: stop openmldb if: always() run: bash ${{ github.job }}/openmldb-${{ env.E_VERSION }}-linux/sbin/stop-all.sh @@ -368,6 +373,7 @@ jobs: server_port: 995 username: ${{ secrets.MAIL_USERNAME }} password: ${{ secrets.MAIL_PASSWORD }} + secure: true subject: OpenMLDB yarn Test body: OpenMLDB yarn Test Failed html_body: test/integration-test/openmldb-test-java/openmldb-sdk-test/target/surefire-reports/html/overview.html @@ -419,6 +425,7 @@ jobs: # with: # server_address: mail.4paradigm.com # server_port: 995 + # secure: true # username: ${{ secrets.MAIL_USERNAME }} # password: ${{ secrets.MAIL_PASSWORD }} # subject: OpenMLDB yarn Test diff --git a/test/steps/openmldb-apiserver-test.sh b/test/steps/openmldb-apiserver-test.sh index 5396b5b12dc..c9333fad57e 100755 --- a/test/steps/openmldb-apiserver-test.sh +++ b/test/steps/openmldb-apiserver-test.sh @@ -21,7 +21,7 @@ #-d 部署模式,有cluster和standalone两种,默认cluster #-l 测试的case级别,有0,1,2,3,4,5六个级别,默认为0,也可以同时跑多个级别的case,例如:1,2,3,4,5 -while getopts ":b:c:d:l:j:" opt +while getopts ":b:c:d:l:" opt do case $opt in b) @@ -39,9 +39,6 @@ do l) echo "参数l的值:$OPTARG" CASE_LEVEL=$OPTARG ;; - j) echo "参数j的值:$OPTARG" - JAR_VERSION=$OPTARG - ;; ?) echo "未知参数" exit 1 ;; @@ -75,7 +72,6 @@ source test/steps/read_properties.sh # 从源码编译 if [[ "${BUILD_MODE}" == "SRC" ]]; then JAVA_SDK_VERSION=$(more java/pom.xml | grep ".*" | head -1 | sed 's#.*\(.*\).*#\1#') - sh test/steps/build-java-sdk.sh fi echo "JAVA_SDK_VERSION:${JAVA_SDK_VERSION}" echo "OPENMLDB_SERVER_VERSION:${OPENMLDB_SERVER_VERSION}" @@ -83,20 +79,13 @@ echo "DIFF_VERSIONS:${DIFF_VERSIONS}" # modify config sh test/steps/modify_apiserver_config.sh "${CASE_XML}" "${DEPLOY_MODE}" "${JAVA_SDK_VERSION}" "${BUILD_MODE}" "${OPENMLDB_SERVER_VERSION}" # install command tool -if [[ "${JAR_VERSION}" == "" ]]; then - JAR_VERSION=${JAVA_SDK_VERSION} - else - mvn install:install-file -Dfile=openmldb-common.jar -DartifactId=openmldb-common -DgroupId=com.4paradigm.openmldb -Dversion=${JAR_VERSION} -Dpackaging=jar - mvn install:install-file -Dfile=openmldb-jdbc.jar -DartifactId=openmldb-jdbc -DgroupId=com.4paradigm.openmldb -Dversion=${JAR_VERSION} -Dpackaging=jar - mvn install:install-file -Dfile=openmldb-native.jar -DartifactId=openmldb-native -DgroupId=com.4paradigm.openmldb -Dversion=${JAR_VERSION} -Dpackaging=jar -fi cd test/test-tool/command-tool || exit -mvn clean install -Dmaven.test.skip=true -Dopenmldb.native.version=${JAR_VERSION} -Dopenmldb.jdbc.version=${JAR_VERSION} -Dopenmldb.batch.version=${JAR_VERSION} +mvn clean install -Dmaven.test.skip=true cd "${ROOT_DIR}" || exit # install jar cd test/integration-test/openmldb-test-java || exit -mvn clean install -Dmaven.test.skip=true -Dopenmldb.native.version=${JAR_VERSION} -Dopenmldb.jdbc.version=${JAR_VERSION} -Dopenmldb.batch.version=${JAR_VERSION} +mvn clean install -Dmaven.test.skip=true cd "${ROOT_DIR}" || exit # run case cd "${ROOT_DIR}"/test/integration-test/openmldb-test-java/openmldb-http-test || exit -mvn clean test -DsuiteXmlFile=test_suite/"${CASE_XML}" -DcaseLevel="${CASE_LEVEL}" -Dopenmldb.native.version=${JAR_VERSION} -Dopenmldb.jdbc.version=${JAR_VERSION} -Dopenmldb.batch.version=${JAR_VERSION} +mvn clean test -DsuiteXmlFile=test_suite/"${CASE_XML}" -DcaseLevel="${CASE_LEVEL}" diff --git a/test/steps/openmldb-javasdk-integration.sh b/test/steps/openmldb-integration-test.sh similarity index 67% rename from test/steps/openmldb-javasdk-integration.sh rename to test/steps/openmldb-integration-test.sh index 4ddd1ca9e05..b5915d9875a 100755 --- a/test/steps/openmldb-javasdk-integration.sh +++ b/test/steps/openmldb-integration-test.sh @@ -1,5 +1,5 @@ #!/bin/bash -while getopts ":c:d:l:s:j:" opt +while getopts ":c:d:l:s:j:m:" opt do case $opt in c) @@ -19,6 +19,9 @@ do j) echo "参数j的值:$OPTARG" JAR_VERSION=$OPTARG ;; + m) echo "参数m的值:$OPTARG" + EXECUTE_MODE=$OPTARG + ;; ?) echo "未知参数" exit 1 ;; @@ -33,6 +36,9 @@ fi if [[ "${CASE_LEVEL}" == "" ]]; then CASE_LEVEL="0" fi +if [[ "${EXECUTE_MODE}" == "" ]]; then + EXECUTE_MODE="javasdk" +fi JAVA_SDK_VERSION=$(more java/pom.xml | grep ".*" | head -1 | sed 's#.*\(.*\).*#\1#') sh test/steps/modify_java_sdk_config.sh "${CASE_XML}" "${DEPLOY_MODE}" "${JAR_VERSION}" "" "${JAR_VERSION}" "${JAR_VERSION}" "${TABLE_STORAGE_MODE}" @@ -44,4 +50,8 @@ mvn install:install-file -Dfile=openmldb-native.jar -DartifactId=openmldb-native mvn clean install -B -Dmaven.test.skip=true -f test/test-tool/command-tool/pom.xml mvn clean install -B -Dmaven.test.skip=true -f test/integration-test/openmldb-test-java/pom.xml -Dopenmldb.native.version=${JAR_VERSION} -Dopenmldb.jdbc.version=${JAR_VERSION} -Dopenmldb.batch.version=${JAR_VERSION} -mvn clean test -B -e -U -DsuiteXmlFile=test_suite/"${CASE_XML}" -f test/integration-test/openmldb-test-java/openmldb-sdk-test/pom.xml -DcaseLevel="${CASE_LEVEL}" -Dopenmldb.native.version=${JAR_VERSION} -Dopenmldb.jdbc.version=${JAR_VERSION} -Dopenmldb.batch.version=${JAR_VERSION} \ No newline at end of file +if [[ "${EXECUTE_MODE}" == "javasdk" ]]; then + mvn clean test -B -e -U -DsuiteXmlFile=test_suite/"${CASE_XML}" -f test/integration-test/openmldb-test-java/openmldb-sdk-test/pom.xml -DcaseLevel="${CASE_LEVEL}" -Dopenmldb.native.version=${JAR_VERSION} -Dopenmldb.jdbc.version=${JAR_VERSION} -Dopenmldb.batch.version=${JAR_VERSION} +else if [[ "${EXECUTE_MODE}" == "apiserver" ]]; then + mvn clean test -B -e -U -DsuiteXmlFile=test_suite/"${CASE_XML}" -f test/integration-test/openmldb-test-java/openmldb-http-test/pom.xml -DcaseLevel="${CASE_LEVEL}" -Dopenmldb.native.version=${JAR_VERSION} -Dopenmldb.jdbc.version=${JAR_VERSION} -Dopenmldb.batch.version=${JAR_VERSION} +fi