Enable testcase run parallel

Signed-off-by: Cai Yudong <yudong.cai@zilliz.com>
This commit is contained in:
Cai Yudong 2021-03-30 22:10:40 +08:00 committed by yefu.chen
parent efbf4452c5
commit fd282d3c56

View File

@ -25,6 +25,7 @@ timeout(time: "${regressionTimeout}", unit: 'MINUTES') {
--namespace ${env.HELM_RELEASE_NAMESPACE} ${env.HELM_RELEASE_NAME} ."
} else {
helmCMD = "helm install --wait --timeout 300s \
--set standalone.enabled=true \
--set image.all.repository=${env.TARGET_REPO}/milvus-distributed \
--set image.all.tag=${env.TARGET_TAG} \
--set image.all.pullPolicy=Always \
@ -49,9 +50,9 @@ timeout(time: "${regressionTimeout}", unit: 'MINUTES') {
sh "python3 -m pip install --no-cache-dir -r requirements.txt"
if (isTimeTriggeredBuild) {
echo "This is Cron Job!"
sh "pytest --tags=0331 -n 2 --ip ${env.HELM_RELEASE_NAME}-milvus-ha.${env.HELM_RELEASE_NAMESPACE}.svc.cluster.local"
sh "pytest --tags=0331 -n 4 --ip ${env.HELM_RELEASE_NAME}-milvus-ha.${env.HELM_RELEASE_NAMESPACE}.svc.cluster.local"
} else {
sh "pytest --tags=smoke -n 2 --ip ${env.HELM_RELEASE_NAME}-milvus-ha.${env.HELM_RELEASE_NAMESPACE}.svc.cluster.local"
sh "pytest --tags=smoke -n 4 --ip ${env.HELM_RELEASE_NAME}-milvus-ha.${env.HELM_RELEASE_NAMESPACE}.svc.cluster.local"
}
}
} catch (exc) {
@ -64,7 +65,6 @@ timeout(time: "${regressionTimeout}", unit: 'MINUTES') {
def namespace = "${env.HELM_RELEASE_NAMESPACE}"
def artifactsPath = "${env.DEV_TEST_ARTIFACTS_PATH}"
sh "mkdir -p $artifactsPath"
sh "for pod in \$(kubectl get pod -n $namespace -l ${milvusLabels} -o jsonpath='{range.items[*]}{.metadata.name} '); do kubectl logs --all-containers -n $namespace \$pod > $artifactsPath/\$pod.log; done"
sh "for pod in \$(kubectl get pod -n $namespace -l ${componentLabels} -o jsonpath='{range.items[*]}{.metadata.name} '); do kubectl logs --all-containers -n $namespace \$pod > $artifactsPath/\$pod.log; done"