fix(测试计划报告): 修复测试计划报告中性能测试用例执行成功时显示未执行的问题
修复测试计划报告中性能测试用例执行成功时显示未执行的问题
This commit is contained in:
parent
a9e9223716
commit
1f2b0b7de9
|
@ -1,5 +1,8 @@
|
|||
package io.metersphere.api.cache;
|
||||
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
|
@ -8,6 +11,7 @@ import java.util.Map;
|
|||
* @Date 2021/8/20 3:29 下午
|
||||
*/
|
||||
public class TestPlanReportExecuteCatch {
|
||||
private static Logger testPlanLog = LoggerFactory.getLogger("testPlanExecuteLog");
|
||||
private static Map<String, TestPlanExecuteInfo> testPlanReportMap = new HashMap<>();
|
||||
|
||||
private TestPlanReportExecuteCatch() {
|
||||
|
@ -88,6 +92,7 @@ public class TestPlanReportExecuteCatch {
|
|||
}
|
||||
|
||||
public static void finishAllTask(String planReportId) {
|
||||
testPlanLog.info("ReportId["+planReportId+"] finish task!");
|
||||
if(testPlanReportMap.containsKey(planReportId)){
|
||||
testPlanReportMap.get(planReportId).finishAllTask();
|
||||
}
|
||||
|
|
|
@ -1239,6 +1239,7 @@ public class TestPlanReportService {
|
|||
//20分钟没有案例执行结果更新,则定位超时
|
||||
long lastCountTime = executeInfo.getLastFinishedNumCountTime();
|
||||
long nowTime = System.currentTimeMillis();
|
||||
testPlanLog.info("ReportId: ["+planReportId+"]; timeCount:"+ (nowTime - lastCountTime));
|
||||
if (nowTime - lastCountTime > 1200000) {
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -21,7 +21,10 @@ export default {
|
|||
return {
|
||||
caseDataMap: new Map([
|
||||
["success", {name: this.$t('test_track.plan_view.pass'), itemStyle: {color: '#67C23A'}}],
|
||||
["Success", {name: this.$t('test_track.plan_view.pass'), itemStyle: {color: '#67C23A'}}],
|
||||
["SUCCESS", {name: this.$t('test_track.plan_view.pass'), itemStyle: {color: '#67C23A'}}],
|
||||
["error", {name: this.$t('test_track.plan_view.failure'), itemStyle: {color: '#F56C6C'}}],
|
||||
["Error", {name: this.$t('test_track.plan_view.failure'), itemStyle: {color: '#F56C6C'}}],
|
||||
["run", {name: this.$t('运行中'), itemStyle: {color: '#DEDE10'}}],
|
||||
["Prepare", {name: this.$t('api_test.home_page.detail_card.unexecute'), itemStyle: {color: '#909399'}}],
|
||||
]),
|
||||
|
|
Loading…
Reference in New Issue