diff --git a/.github/workflows/selfhost_intergration.yml b/.github/workflows/selfhost_intergration.yml index a6b54334e07..e1695f20b4f 100644 --- a/.github/workflows/selfhost_intergration.yml +++ b/.github/workflows/selfhost_intergration.yml @@ -24,7 +24,7 @@ jobs: build-openmldb: runs-on: [self-hosted,generic] - if: github.repository == '4paradigm/OpenMLDB' || github.repository == 'lqy222/OpenMLDB' + if: github.repository == '4paradigm/OpenMLDB' container: image: ghcr.io/4paradigm/hybridsql:latest env: @@ -345,8 +345,8 @@ jobs: bash test/steps/format_config.sh $(pwd)/${{ github.job }}/openmldb-${{ env.E_VERSION }}-linux ${{ github.job }} 24001 25000 java hadoop bash ${{ github.job }}/openmldb-${{ env.E_VERSION }}-linux/sbin/deploy-all.sh bash ${{ github.job }}/openmldb-${{ env.E_VERSION }}-linux/sbin/start-all.sh - 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 + bash ${{ github.job }}/openmldb-${{ env.E_VERSION }}-linux/sbin/stop-taskmanagers.sh + HADOOP_CONF_DIR=/mnt/hdd0/denglong/openmldb_runner_work/hadoop ${{ github.job }}/openmldb-${{ env.E_VERSION }}-linux/sbin/stop-taskmanagers.sh - name: test 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 diff --git a/cases/integration_test/expression/test_type.yaml b/cases/integration_test/expression/test_type.yaml index be23ad30cba..9def66de50a 100644 --- a/cases/integration_test/expression/test_type.yaml +++ b/cases/integration_test/expression/test_type.yaml @@ -424,9 +424,9 @@ cases: columns: ["id int32", "string_c1 string", "string_c2 string", "string_c3 string", "string_c4 string", "string_c5 string", "string_c6 string", "string_c7 string", "string_c8 string", "string_c9 string", "string_c10 string"] rows: - - [1, "1", "1", "1", "1", "1.0", "2020-05-22 10:43:40", "2020-05-22", "2020-05-22 10:43:40", "true", "1"] - - [2, "-1", "-1", "-1", "-1", "-1.0", "2020-05-22 10:43:40", "2020-05-22", "2020-05-22 10:43:40", "false", "-1"] - - [3, "-1", "-1", "-1", "-1", "-1.0", NULL, "2020-05-22", "2020-05-22 10:43:40", "false", ""] + - [1, "1", "1", "1", "1", "1", "2020-05-22 10:43:40", "2020-05-22", "2020-05-22 10:43:40", "true", "1"] + - [2, "-1", "-1", "-1", "-1", "-1", "2020-05-22 10:43:40", "2020-05-22", "2020-05-22 10:43:40", "false", "-1"] + - [3, "-1", "-1", "-1", "-1", "-1", NULL, "2020-05-22", "2020-05-22 10:43:40", "false", ""] - id: 20 desc: cast as date mode: offline-unsupport,disk-unsupport diff --git a/test/integration-test/README b/test/integration-test/README new file mode 100644 index 00000000000..1b250620412 --- /dev/null +++ b/test/integration-test/README @@ -0,0 +1,31 @@ +# README + +## 参数配置脚本 + +``` +test/format_config.sh {openmldbPath} {jobName} {portFrom} {portTo} {type} {Dependency} +``` +配置生成在 out/openmldb_info.yaml + +Dependency为hadoop时使用hadoop config + +Dependency为ssd时禁止部署在node-1 + +## 一键运行脚本 +``` +test/openmldb-integration-test.sh -c {caseXML} -d {deployMode} -j {jarVersion} -l {caseLevel} -s {tableStorageMode} -m {executeMode} +``` + +### 版本兼容性测试 +openmldb包版本设置: test/format_config.sh {openmldbPath} + +jar版本设置: test/openmldb-integration-test.sh -j {jarVersion} + +### kafka测试 +``` +test/integration-test/openmldb-test-java/kafka_test.sh +``` +环境配置于node-4: kakfa_test(docker) + +## 回归测试workflow +hadoop配置文件位于 /mnt/hdd0/denglong/openmldb_runner_work/hadoop \ No newline at end of file diff --git a/test/integration-test/openmldb-test-java/kafka_test.sh b/test/integration-test/openmldb-test-java/kafka_test.sh new file mode 100755 index 00000000000..e695fb3ef35 --- /dev/null +++ b/test/integration-test/openmldb-test-java/kafka_test.sh @@ -0,0 +1,18 @@ +#! /bin/bash + +apiserver="$(awk -F '"' 'NR==7{print $2}' ../../../out/openmldb_info.yaml)" +zkc="zk=""$(awk -F '"' 'NR==2{print $2}' ../../../out/openmldb_info.yaml)" +zkpath="\&zkPath=""$(awk -F '"' 'NR==3{print $2}' ../../../out/openmldb_info.yaml)" +echo "${zkc}" +echo "${zkpath}" +zk="${zkc}""${zkpath}" + +docker exec -it kafka_test /start.sh "${zk}" +sed -i "s#\"bootstrap.servers\":.*#\"bootstrap.servers\":node-4:9092,#" openmldb-ecosystem/src/test/resources/kafka_test_cases.yml +sed -i "s#\"connect.listeners\":.*#\"connect.listeners\":http://node-4:8083,#" openmldb-ecosystem/src/test/resources/kafka_test_cases.yml +sed -i "s#apiserver.address:.*#apiserver.address: "${apiserver}"#" openmldb-ecosystem/src/test/resources/kafka_test_cases.yml +sed -i "s#kafka_test?.*#kafka_test?"${zk}"\"#" openmldb-ecosystem/src/test/resources/kafka_test_cases.yml + +mvn test -pl openmldb-ecosystem + +docker exec -it kafka_test /stop.sh diff --git a/test/steps/openmldb-integration-test.sh b/test/steps/openmldb-integration-test.sh index 88d9f91e2d6..e6e95557f41 100755 --- a/test/steps/openmldb-integration-test.sh +++ b/test/steps/openmldb-integration-test.sh @@ -40,10 +40,11 @@ if [[ "${EXECUTE_MODE}" == "" ]]; then EXECUTE_MODE="javasdk" fi -JAVA_SDK_VERSION=$(more java/pom.xml | grep ".*" | head -1 | sed 's#.*\(.*\).*#\1#') +#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}" mkdir -p ../mvnrepo -export MAVEN_OPTS="-Dmaven.repo.local=$(pwd)/../mvnrepo" +MAVEN_REPO="-Dmaven.repo.local=$(pwd)/../mvnrepo" +export MAVEN_OPTS="${MAVEN_REPO}" mvn install:install-file -Dfile=openmldb-batch.jar -DartifactId=openmldb-batch -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