remove redundant code
This commit is contained in:
parent
1587944552
commit
c360cb13bd
|
@ -11,11 +11,9 @@ import javax.servlet.http.HttpServletResponse;
|
||||||
|
|
||||||
import org.apache.commons.io.FileUtils;
|
import org.apache.commons.io.FileUtils;
|
||||||
import org.bench4q.master.api.model.MonitorModel;
|
import org.bench4q.master.api.model.MonitorModel;
|
||||||
import org.bench4q.master.api.model.RunningAgentModel;
|
|
||||||
import org.bench4q.master.api.model.RunningScriptModel;
|
import org.bench4q.master.api.model.RunningScriptModel;
|
||||||
import org.bench4q.master.api.model.ScriptBriefResultModel;
|
import org.bench4q.master.api.model.ScriptBriefResultModel;
|
||||||
import org.bench4q.master.api.model.TestPlanResponseModel;
|
import org.bench4q.master.api.model.TestPlanResponseModel;
|
||||||
import org.bench4q.master.api.model.TestScriptConfig;
|
|
||||||
import org.bench4q.master.api.model.TestPlanModel;
|
import org.bench4q.master.api.model.TestPlanModel;
|
||||||
import org.bench4q.master.api.model.TestPlanResultModel;
|
import org.bench4q.master.api.model.TestPlanResultModel;
|
||||||
import org.bench4q.master.entity.db.TestPlan;
|
import org.bench4q.master.entity.db.TestPlan;
|
||||||
|
@ -87,30 +85,6 @@ public class TestPlanController extends BaseController {
|
||||||
this.reportService = reportService;
|
this.reportService = reportService;
|
||||||
}
|
}
|
||||||
|
|
||||||
@RequestMapping(value = "/runTestPlanWithScriptId", method = RequestMethod.GET)
|
|
||||||
@ResponseBody
|
|
||||||
public TestPlanResultModel runTestPlanWithScriptId(
|
|
||||||
@RequestParam int scriptId, @RequestParam int requireLoad) {
|
|
||||||
List<RunningScriptModel> list = new ArrayList<RunningScriptModel>();
|
|
||||||
|
|
||||||
RunningScriptModel model = new RunningScriptModel();
|
|
||||||
model.setScriptId(scriptId);
|
|
||||||
model.setRequireLoad(requireLoad);
|
|
||||||
model.setRunningAgents(new ArrayList<RunningAgentModel>());
|
|
||||||
|
|
||||||
TestPlanModel testPlanModel = new TestPlanModel();
|
|
||||||
testPlanModel.setRunningScriptModels(list);
|
|
||||||
TestScriptConfig config = new TestScriptConfig();
|
|
||||||
config.setWarmUp(20);
|
|
||||||
config.setExecuteRange(50);
|
|
||||||
config.setCoolDown(10);
|
|
||||||
model.setConfig(config);
|
|
||||||
list.add(model);
|
|
||||||
return _buildResponseModel(this.testPlanRunner.runTestPlanWithModel(
|
|
||||||
testPlanModel, this.userService.getUserByName("chen")), null,
|
|
||||||
new ArrayList<MonitorModel>());
|
|
||||||
}
|
|
||||||
|
|
||||||
@RequestMapping(value = "/runTestPlanWithTestPlanModel", method = RequestMethod.POST)
|
@RequestMapping(value = "/runTestPlanWithTestPlanModel", method = RequestMethod.POST)
|
||||||
@ResponseBody
|
@ResponseBody
|
||||||
public TestPlanResultModel runTestPlanWithTestPlanModel(
|
public TestPlanResultModel runTestPlanWithTestPlanModel(
|
||||||
|
|
Loading…
Reference in New Issue