parent
5a0a1074c9
commit
5390aa5c05
|
@ -73,6 +73,15 @@ public class TestPlanScript implements RunningScriptInterface {
|
|||
this.script = script;
|
||||
}
|
||||
|
||||
@Column(name = "filteredScriptContent", columnDefinition = "LONGTEXT", nullable = true)
|
||||
public String getFilteredScriptCnt() {
|
||||
return filteredScriptCnt;
|
||||
}
|
||||
|
||||
public void setFilteredScriptCnt(String filteredScriptCnt) {
|
||||
this.filteredScriptCnt = filteredScriptCnt;
|
||||
}
|
||||
|
||||
@Column(name = "requireLoad", nullable = false)
|
||||
public int getRequireLoad() {
|
||||
return requireLoad;
|
||||
|
@ -307,12 +316,4 @@ public class TestPlanScript implements RunningScriptInterface {
|
|||
return this.getPlanedConfig().getScheduleContent();
|
||||
}
|
||||
|
||||
@Transient
|
||||
public String getFilteredScriptCnt() {
|
||||
return filteredScriptCnt;
|
||||
}
|
||||
|
||||
public void setFilteredScriptCnt(String filteredScriptCnt) {
|
||||
this.filteredScriptCnt = filteredScriptCnt;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -54,11 +54,8 @@ public class Test_TestPlan extends TestBase_MakeUpTestPlan {
|
|||
@Test
|
||||
public void testRun() throws InterruptedException {
|
||||
assertTrue(this.getHaPool().getCurrentAvailableLoad() >= 500);
|
||||
TestPlan testPlanFromRepo = this.getTestPlanRepository()
|
||||
TestPlan testPlanInDomain = this.getTestPlanRepository()
|
||||
.getTestPlanInDomainBy(getTestPlanRunIdUuid());
|
||||
TestPlan testPlanInDomain = this.getTestPlanFactory().convertToDomain(
|
||||
testPlanFromRepo);
|
||||
this.getTestPlanRepository().attachRunningTestPlan(testPlanInDomain);
|
||||
testPlanInDomain.run();
|
||||
this.getTestPlanRepository().attachRunningTestPlan(testPlanInDomain);
|
||||
assertEquals(TestPlanStatus.InRunning.name(),
|
||||
|
|
|
@ -28,6 +28,7 @@ import org.bench4q.master.infrastructure.communication.AgentMessenger;
|
|||
import org.bench4q.master.infrastructure.highavailable.HighAvailablePool;
|
||||
import org.bench4q.master.unitTest.controller.TestBase;
|
||||
import org.bench4q.share.enums.master.TestPlanStatus;
|
||||
import org.bench4q.share.models.agent.ScriptFilterOptionsModel;
|
||||
import org.bench4q.share.models.agent.scriptrecord.ScheduleModel;
|
||||
import org.bench4q.share.models.agent.scriptrecord.ScheduleModel.PointModel;
|
||||
import org.bench4q.share.models.master.MonitorModel;
|
||||
|
@ -290,9 +291,7 @@ public class TestBase_MakeUpTestPlan extends TestBase {
|
|||
model = createATestPlanWithOneScript(scriptOne);
|
||||
}
|
||||
try {
|
||||
this.getTestPlanRepository().attach(
|
||||
this.testPlanFactory.createATestPlanWithoutId(model, user,
|
||||
testPlanRunId));
|
||||
this.getTestPlanEngine().submitTestPlan(model, user, testPlanRunId);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
@ -396,6 +395,7 @@ public class TestBase_MakeUpTestPlan extends TestBase {
|
|||
public static RunningScriptModel buildScriptModel(int scriptID) {
|
||||
RunningScriptModel model = new RunningScriptModel();
|
||||
model.setScriptId(scriptID);
|
||||
model.setScriptFilterOptionsModel(new ScriptFilterOptionsModel());
|
||||
model.setRequireLoad(EACH_SCRIPT_LOAD_SMALLSCALE);
|
||||
ScheduleModel schedule = new ScheduleModel();
|
||||
schedule.getPoints().add(new PointModel(0, 0));
|
||||
|
|
Loading…
Reference in New Issue