fix(接口测试): 修复k8s资源池没有可用的pod无提示问题

--bug=1020710 --user=赵勇 【接口测试】K8S资源池异常时接口测试执行失败未正常处理 https://www.tapd.cn/55049933/s/1313865
This commit is contained in:
fit2-zhao 2022-12-07 14:14:36 +08:00
parent 33b25ebf32
commit 5d0fea622a
6 changed files with 22 additions and 1 deletions

View File

@ -487,6 +487,13 @@ export default {
this.runningEvaluation(e.data);
this.sort(this.fullTreeNodes);
}
if(e && e.data === 'DEBUG_ERROR'){
this.$error(this.$t('api_test.automation.debug_pool_warning'));
this.messageWebSocket.close();
this.cleanHeartBeat();
this.$EventBus.$emit('hide', this.scenarioId);
this.$emit('refresh', this.debugResult);
}
if (e.data && e.data.indexOf("MS_TEST_END") !== -1) {
this.getReport();
this.messageWebSocket.close();

View File

@ -1005,6 +1005,13 @@ export default {
if (e && e.data === "CONN_SUCCEEDED") {
this.run();
}
if(e && e.data === 'DEBUG_ERROR'){
this.$error(this.$t('api_test.automation.debug_pool_warning'));
if (this.messageWebSocket) {
this.messageWebSocket.close();
}
this.errorRefresh();
}
if (e.data && e.data.startsWith("result_")) {
let data = JSON.parse(e.data.substring(7));
this.reqTotal += 1;

View File

@ -63,7 +63,11 @@ export default {
if (e && e.data === "CONN_SUCCEEDED") {
this.run();
}
if(e && e.data === 'DEBUG_ERROR'){
this.$error(this.$t('api_test.automation.debug_pool_warning'));
this.websocket.close();
this.$emit('errorRefresh', "");
}
if (e.data && e.data.startsWith("result_")) {
try {
let data = e.data.substring(7);

View File

@ -1450,6 +1450,7 @@ export default {
generate_report: "Generate report",
rerun: "fail and rerun",
rerun_warning: "The connection is abnormal, please check the environment configuration",
debug_pool_warning: "Execution exception, please check the resource pool",
csv_warning: "Please add csv file",
variable_warning: "Variable name cannot be empty"
},

View File

@ -1455,6 +1455,7 @@ export default {
generate_report: "生成报告",
rerun: "失败重跑",
rerun_warning: "连接异常,请检查环境配置",
debug_pool_warning: "执行异常,请检查资源池",
csv_warning: "请添加 csv 文件",
variable_warning: "变量名不能为空"
},

View File

@ -1455,6 +1455,7 @@ export default {
generate_report: "生成報告",
rerun: "失敗重跑",
rerun_warning: "連接異常,請檢查環境配置",
debug_pool_warning: "執行異常,請檢查資源池",
csv_warning: "請添加 csv 文件",
variable_warning: "變量名不能為空"
},