add assisting methods for test
refactor, let the schedule be the stand-alone one
This commit is contained in:
parent
5564c9d78b
commit
6e973cf6db
|
@ -129,6 +129,16 @@ public abstract class TestBase {
|
|||
final Scenario scenario, int poolSize, PluginManager pluginManager) {
|
||||
ScenarioContext scenarioContext = ScenarioContext.buildScenarioContextWithoutScenario(
|
||||
testId, poolSize, pluginManager);
|
||||
return scenarioContext.addScenrio(scenario, Schedule.build(new ScheduleModel()), new Date().getTime());
|
||||
return scenarioContext.addScenrio(scenario, Schedule.build(buildScheduleModel()), new Date().getTime());
|
||||
}
|
||||
|
||||
public static ScheduleModel buildScheduleModel(){
|
||||
ScheduleModel scheduleModel = new ScheduleModel();
|
||||
List<PointModel> points = new LinkedList<ScheduleModel.PointModel>();
|
||||
points.add(new PointModel(0, 0));
|
||||
points.add(new PointModel(20 * 1000, 20));
|
||||
points.add(new PointModel(60 * 1000, 20));
|
||||
scheduleModel.setPoints(points);
|
||||
return scheduleModel;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue