Merge branch 'v1.4' into master
This commit is contained in:
commit
cfa053968d
|
@ -32,7 +32,6 @@ public class DockerTestEngine extends AbstractEngine {
|
|||
super.init(loadTest);
|
||||
this.restTemplate = (RestTemplate) CommonBeanFactory.getBean("restTemplate");
|
||||
this.restTemplateWithTimeOut = (RestTemplate) CommonBeanFactory.getBean("restTemplateWithTimeOut");
|
||||
// todo 初始化操作
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -60,7 +59,6 @@ public class DockerTestEngine extends AbstractEngine {
|
|||
}
|
||||
|
||||
private void runTest(TestResource resource, long realThreadNum, int resourceIndex) {
|
||||
// todo 运行测试
|
||||
EngineContext context = null;
|
||||
try {
|
||||
context = EngineFactory.createContext(loadTest, resource.getId(), realThreadNum, this.getStartTime(), this.getReportId(), resourceIndex);
|
||||
|
@ -99,7 +97,6 @@ public class DockerTestEngine extends AbstractEngine {
|
|||
|
||||
@Override
|
||||
public void stop() {
|
||||
// TODO 停止运行测试
|
||||
String testId = loadTest.getId();
|
||||
this.resourceList.forEach(r -> {
|
||||
NodeDTO node = JSON.parseObject(r.getConfiguration(), NodeDTO.class);
|
||||
|
|
|
@ -20,8 +20,6 @@ import io.metersphere.dto.ScheduleDao;
|
|||
import io.metersphere.i18n.Translator;
|
||||
import io.metersphere.job.sechedule.PerformanceTestJob;
|
||||
import io.metersphere.notice.domain.NoticeDetail;
|
||||
import io.metersphere.notice.service.MailService;
|
||||
import io.metersphere.notice.service.NoticeService;
|
||||
import io.metersphere.performance.engine.Engine;
|
||||
import io.metersphere.performance.engine.EngineFactory;
|
||||
import io.metersphere.performance.notice.PerformanceNoticeTask;
|
||||
|
@ -78,10 +76,6 @@ public class PerformanceTestService {
|
|||
@Resource
|
||||
private TestCaseService testCaseService;
|
||||
@Resource
|
||||
private NoticeService noticeService;
|
||||
@Resource
|
||||
private MailService mailService;
|
||||
@Resource
|
||||
private PerformanceNoticeTask performanceNoticeTask;
|
||||
|
||||
public List<LoadTestDTO> list(QueryTestPlanRequest request) {
|
||||
|
@ -281,7 +275,6 @@ public class PerformanceTestService {
|
|||
testReport.setUserId(SessionUtils.getUser().getId());
|
||||
}
|
||||
// 启动测试
|
||||
List<NoticeDetail> noticeList = null;
|
||||
try {
|
||||
engine.start();
|
||||
// 启动正常修改状态 starting
|
||||
|
@ -307,6 +300,9 @@ public class PerformanceTestService {
|
|||
reportResult.setReportValue("Ready"); // 初始化一个 result_status, 这个值用在data-streaming中
|
||||
loadTestReportResultMapper.insertSelective(reportResult);
|
||||
} catch (MSException e) {
|
||||
// 启动失败之后清理任务
|
||||
engine.stop();
|
||||
|
||||
LogUtil.error(e);
|
||||
loadTest.setStatus(PerformanceTestStatus.Error.name());
|
||||
loadTest.setDescription(e.getMessage());
|
||||
|
|
Loading…
Reference in New Issue