refactor(接口测试): 删除无用代码

This commit is contained in:
wxg0103 2022-12-05 18:13:20 +08:00 committed by wxg0103
parent 62b492e468
commit fad9e039c0
2 changed files with 0 additions and 7 deletions

View File

@ -59,7 +59,6 @@ public class ApiScenarioEnvService {
private BaseEnvironmentService apiTestEnvironmentService;
public ScenarioEnv getApiScenarioEnv(String definition) {
LogUtil.info("开始数据转换 " + System.currentTimeMillis());
ScenarioEnv env = new ScenarioEnv();
if (StringUtils.isEmpty(definition)) {
return env;
@ -75,7 +74,6 @@ public class ApiScenarioEnvService {
getHashTree(testElement.getHashTree(), env);
}
}
LogUtil.info("数据转换结束 " + System.currentTimeMillis());
return env;
}
@ -112,14 +110,12 @@ public class ApiScenarioEnvService {
|| StringUtils.equals(testElement.getType(), ElementConstants.TCP_SAMPLER)) {
if (StringUtils.isEmpty(testElement.getProjectId())) {
if (StringUtils.equals(testElement.getRefType(), CommonConstants.CASE)) {
LogUtil.info("引用用例查询数据库:");
ApiTestCase testCase = apiTestCaseMapper.selectByPrimaryKey(testElement.getId());
if (testCase != null) {
env.getProjectIds().add(testCase.getProjectId());
env.setFullUrl(false);
}
} else {
LogUtil.info("接口查询数据库");
ApiDefinition apiDefinition = apiDefinitionService.get(testElement.getId());
if (apiDefinition != null) {
env.getProjectIds().add(apiDefinition.getProjectId());
@ -131,7 +127,6 @@ public class ApiScenarioEnvService {
env.setFullUrl(false);
}
} else if (StringUtils.equals(testElement.getType(), ElementConstants.SCENARIO) && StringUtils.isEmpty(testElement.getProjectId())) {
LogUtil.info("场景查询数据库");
ApiScenarioWithBLOBs apiScenario = apiScenarioMapper.selectByPrimaryKey(testElement.getId());
if (apiScenario != null) {
env.getProjectIds().add(apiScenario.getProjectId());

View File

@ -12,7 +12,6 @@ import io.metersphere.base.domain.ApiScenarioWithBLOBs;
import io.metersphere.base.domain.Schedule;
import io.metersphere.commons.constants.*;
import io.metersphere.commons.exception.MSException;
import io.metersphere.commons.utils.LogUtil;
import io.metersphere.commons.utils.PageUtils;
import io.metersphere.commons.utils.Pager;
import io.metersphere.commons.utils.WebSocketUtil;
@ -186,7 +185,6 @@ public class ApiScenarioController {
@PostMapping("/scenario-env")
public ScenarioEnv getScenarioDefinition(@RequestBody ApiScenarioEnvRequest request) {
LogUtil.info("获取前台传输 " + System.currentTimeMillis());
return apiAutomationService.getApiScenarioEnv(request.getDefinition());
}