refactor the runTestPlanWithTestPlanModel
This commit is contained in:
parent
479444691f
commit
b60b33ab79
|
@ -109,7 +109,10 @@ public class TestPlanController extends BaseController {
|
|||
|
||||
UUID testPlanRunID = this.getTestPlanRunner().runTestPlanWithModel(
|
||||
testPlanModel, this.getPrincipal());
|
||||
|
||||
if (testPlanRunID == null) {
|
||||
buildResponseModel(TestPlanStatus.ErrorInSubmitTask, null, null,
|
||||
null);
|
||||
}
|
||||
return buildResponseModel(this.getTestPlanService()
|
||||
.queryTestPlanStatus(testPlanRunID), testPlanRunID, null,
|
||||
testPlanModel.getMonitorModles());
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
package org.bench4q.master.api;
|
||||
|
||||
public enum TestPlanStatus {
|
||||
NotStart, InRunning, Complete, PendingNoEnoughMaxLoad, PendingNoEnoughCurrentLoad, Error
|
||||
NotStart, InRunning, Complete, PendingNoEnoughMaxLoad, PendingNoEnoughCurrentLoad, Error, ErrorInSubmitTask
|
||||
}
|
||||
|
|
|
@ -97,10 +97,6 @@ public class TestPlanRunner implements TaskCompleteCallback,
|
|||
ExecutorService executorService = Executors.newCachedThreadPool();
|
||||
final UUID testPlanId = UUID.randomUUID();
|
||||
|
||||
// final TestPlanContext testPlanContext = new TestPlanContext();
|
||||
// testPlanContext.fillScriptMap(testPlanModel.getRunningScriptModels(),
|
||||
// testPlanId);
|
||||
// testPlanContext.setTestPlanModel(testPlanModel);
|
||||
final TestPlanContext testPlanContext = new TestPlanContext(
|
||||
testPlanModel, testPlanId);
|
||||
if (!this.testPlanService.saveTestPlanToDB(testPlanModel, user,
|
||||
|
|
Loading…
Reference in New Issue