little refa
This commit is contained in:
parent
5f0aa0a45c
commit
17888714a3
|
@ -47,7 +47,7 @@ public class TestPlanContext {
|
||||||
public void cleanUpFinishedContext() {
|
public void cleanUpFinishedContext() {
|
||||||
this.setFinish(true);
|
this.setFinish(true);
|
||||||
this.setTestPlan(null);
|
this.setTestPlan(null);
|
||||||
this.setRunningScriptMap(null);
|
this.setRunningScriptMap(new HashMap<Integer, RunningScript>());
|
||||||
System.gc();
|
System.gc();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -59,4 +59,13 @@ public class Test_TestPlanContext extends TestBase_MakeUpTestPlan {
|
||||||
public void testGetTotalLoad() {
|
public void testGetTotalLoad() {
|
||||||
assertEquals(40, this.getTestPlanContext().getTotalLoad());
|
assertEquals(40, this.getTestPlanContext().getTotalLoad());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void testCleanUpFinishedContext() {
|
||||||
|
assertEquals(1, this.getTestPlanContext().getScriptCount());
|
||||||
|
this.getTestPlanContext().cleanUpFinishedContext();
|
||||||
|
assertEquals(0, this.getTestPlanContext().getScriptCount());
|
||||||
|
assertEquals(0, this.getTestPlanContext().getAllScript().size());
|
||||||
|
assertNull(this.getTestPlanContext().queryRunningScript(USE_SCRIPT));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue