diff --git a/src/main/java/org/bench4q/agent/parameterization/impl/InstanceControler.java b/src/main/java/org/bench4q/agent/parameterization/impl/InstanceControler.java index e35511a7..47350580 100644 --- a/src/main/java/org/bench4q/agent/parameterization/impl/InstanceControler.java +++ b/src/main/java/org/bench4q/agent/parameterization/impl/InstanceControler.java @@ -153,18 +153,14 @@ public class InstanceControler implements SessionObject { * Implement SessionObject end */ - public void releaseAll() { + private void releaseAll() { for (String xx : usedClassName) { release(xx); } } - public void release(String className) { + private void release(String className) { ParametersFactory pf = ParametersFactory.getInstance(); - // for(String s: pf.objMap.keySet()) - // { - // System.out.println(s); - // } boolean hasThisClass = pf.containObj(className); if (false == hasThisClass) { pf.createObj(className); diff --git a/src/test/java/org/bench4q/agent/test/parameterization/TEST_UserName.java b/src/test/java/org/bench4q/agent/test/parameterization/TEST_UserName.java index 40568dfd..3db75627 100644 --- a/src/test/java/org/bench4q/agent/test/parameterization/TEST_UserName.java +++ b/src/test/java/org/bench4q/agent/test/parameterization/TEST_UserName.java @@ -1,10 +1,11 @@ package org.bench4q.agent.test.parameterization; import org.bench4q.agent.parameterization.impl.InstanceControler; +import org.bench4q.share.helper.TestHelper; public class TEST_UserName { - public static void main(String[] args) { + public static void main(String[] args) throws Exception { // TODO Auto-generated method stub // Para_UserNameAndPassword pp = new Para_UserNameAndPassword(); // UUID temp = java.util.UUID.randomUUID(); @@ -18,7 +19,8 @@ public class TEST_UserName { System.out.print("\t"); System.out.println(passwordName); // pp.unreg(temp); - ic.releaseAll(); + // ic.releaseAll(); + TestHelper.invokePrivate(ic, "releaseAll", null, null); } }