a little refa
This commit is contained in:
parent
2ce5a504ce
commit
456ce88646
|
@ -157,31 +157,7 @@ public class TestPlanController extends BaseController {
|
||||||
"You have not power to get test plan running info",
|
"You have not power to get test plan running info",
|
||||||
"/getRunningInfo");
|
"/getRunningInfo");
|
||||||
}
|
}
|
||||||
// TestPlanContext testPlanContext = this.getTestPlanContainer()
|
|
||||||
// .queryTestPlanContext(testPlanId);
|
|
||||||
// if (testPlanContext == null) {
|
|
||||||
// this.getLogger().error("testPlanContext is null!!");
|
|
||||||
// throw new Bench4QException(CONTEXT_NOT_EXIST,
|
|
||||||
// THE_CONTEXT_IS_NULL_WHOSE_ID_IS + testPlanId,
|
|
||||||
// "/getRunningInfo");
|
|
||||||
// }
|
|
||||||
// TestPlanDBModel testPlanDBModel = this.getTestPlanService()
|
|
||||||
// .getTestPlanDBModel(testPlanId);
|
|
||||||
// this.getLogger().info("testPlanContext exists!");
|
|
||||||
//
|
|
||||||
// List<Integer> scriptIds = new LinkedList<Integer>();
|
|
||||||
// for (RunningScript runningScript : testPlanContext.getAllScript()) {
|
|
||||||
// scriptIds.add(runningScript.getScriptId());
|
|
||||||
// }
|
|
||||||
// List<MonitorModel> monitorModels = new ArrayList<MonitorModel>();
|
|
||||||
// for (Monitor monitorInBusiness : testPlanContext.getTestPlan()
|
|
||||||
// .getMonitors()) {
|
|
||||||
// monitorModels.add(BusinessModelMapFactory
|
|
||||||
// .toModel(monitorInBusiness));
|
|
||||||
// }
|
|
||||||
// return buildResponseModel(this.getTestPlanService()
|
|
||||||
// .queryTestPlanStatus(testPlanId), testPlanId, scriptIds,
|
|
||||||
// monitorModels);
|
|
||||||
return this.getTestPlanService().buildResultModel(testPlanId);
|
return this.getTestPlanService().buildResultModel(testPlanId);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -68,13 +68,13 @@ public class TestPlanEngine implements TaskCompleteCallback,
|
||||||
ExecutorService executorService = Executors.newCachedThreadPool();
|
ExecutorService executorService = Executors.newCachedThreadPool();
|
||||||
final UUID testPlanId = UUID.randomUUID();
|
final UUID testPlanId = UUID.randomUUID();
|
||||||
|
|
||||||
final TestPlanContext testPlanContext = new TestPlanContext(testPlan,
|
|
||||||
testPlanId);
|
|
||||||
if (!this.getTestPlanService().submitTestPlan(testPlan, user,
|
if (!this.getTestPlanService().submitTestPlan(testPlan, user,
|
||||||
testPlanId)) {
|
testPlanId)) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
final TestPlanContext testPlanContext = new TestPlanContext(testPlan,
|
||||||
|
testPlanId);
|
||||||
this.getContainer().addATask(testPlanId, testPlanContext);
|
this.getContainer().addATask(testPlanId, testPlanContext);
|
||||||
Runnable runnable = new Runnable() {
|
Runnable runnable = new Runnable() {
|
||||||
public void run() {
|
public void run() {
|
||||||
|
|
Loading…
Reference in New Issue