diff --git a/Bench4Q-Master/src/main/java/org/bench4q/master/domain/factory/TestPlanFactory.java b/Bench4Q-Master/src/main/java/org/bench4q/master/domain/factory/TestPlanFactory.java index 830f5bcb..725d1847 100644 --- a/Bench4Q-Master/src/main/java/org/bench4q/master/domain/factory/TestPlanFactory.java +++ b/Bench4Q-Master/src/main/java/org/bench4q/master/domain/factory/TestPlanFactory.java @@ -4,6 +4,7 @@ import java.lang.reflect.Field; import java.util.ArrayList; import java.util.Date; import java.util.HashSet; +import java.util.Iterator; import java.util.LinkedList; import java.util.List; import java.util.Set; @@ -166,8 +167,7 @@ public class TestPlanFactory { private Script createAScriptWithFilter( ScriptFilterOptionsModel scriptFilterOptionsModel, Script script) { RunScenarioModel runScenarioModel = (RunScenarioModel) MarshalHelper - .tryUnmarshal(RunScenarioModel.class, - script.getFilteredScriptCnt()); + .tryUnmarshal(RunScenarioModel.class, script.getScriptContent()); List filterPluginId = new ArrayList(); if (scriptFilterOptionsModel.isFilterTimer()) { for (UsePluginModel pluginModel : runScenarioModel.getUsePlugins()) { @@ -180,20 +180,23 @@ public class TestPlanFactory { && !scriptFilterOptionsModel.getFilterTypeMatches().equals("")) { for (PageModel pageModel : runScenarioModel.getPages()) { for (BatchModel batchModel : pageModel.getBatches()) { - for (BehaviorModel behaviorModel : batchModel - .getBehaviors()) { + Iterator behaviIterator = batchModel + .getBehaviors().iterator(); + while (behaviIterator.hasNext()) { + BehaviorModel behaviorModel = behaviIterator.next(); if (filterPluginId.contains(behaviorModel.getUse()) || isFilterType( scriptFilterOptionsModel .getFilterTypeMatches(), behaviorModel)) { - batchModel.getBehaviors().remove(behaviorModel); + behaviIterator.remove(); } } } } } String contentString = MarshalHelper.tryMarshal(runScenarioModel); + System.out.println(contentString); script.setFilteredScriptCnt(contentString); return script; } diff --git a/Bench4Q-Master/src/main/java/org/bench4q/master/domain/repository/ScriptRepositoty.java b/Bench4Q-Master/src/main/java/org/bench4q/master/domain/repository/ScriptRepositoty.java index cfe1f1d6..8e4d230a 100644 --- a/Bench4Q-Master/src/main/java/org/bench4q/master/domain/repository/ScriptRepositoty.java +++ b/Bench4Q-Master/src/main/java/org/bench4q/master/domain/repository/ScriptRepositoty.java @@ -11,6 +11,7 @@ import org.hibernate.Criteria; import org.hibernate.Session; import org.hibernate.Transaction; import org.hibernate.criterion.Criterion; +import org.hibernate.criterion.Order; import org.hibernate.criterion.Restrictions; import org.springframework.stereotype.Component; @@ -116,7 +117,7 @@ public class ScriptRepositoty extends AbstractRepositoty { Session session = this.getSessionHelper().openSession(); @SuppressWarnings("unchecked") List - - - -

显示卡片宝箱换肤消息 设为首页 wonanguo11

加载中,精彩马上呈现
©2014 Baidu 使用百度前必读 京ICP证030173号
@@ -109,7 +118,7 @@ body { + onclick="dismiss(mySecondModal)">×