refactor go on

refactor go on
This commit is contained in:
coderfengyun 2014-03-19 15:46:23 +08:00
parent b968e8bac6
commit 4b5aa3cb58
2 changed files with 6 additions and 8 deletions

View File

@ -153,18 +153,14 @@ public class InstanceControler implements SessionObject {
* Implement SessionObject end * Implement SessionObject end
*/ */
public void releaseAll() { private void releaseAll() {
for (String xx : usedClassName) { for (String xx : usedClassName) {
release(xx); release(xx);
} }
} }
public void release(String className) { private void release(String className) {
ParametersFactory pf = ParametersFactory.getInstance(); ParametersFactory pf = ParametersFactory.getInstance();
// for(String s: pf.objMap.keySet())
// {
// System.out.println(s);
// }
boolean hasThisClass = pf.containObj(className); boolean hasThisClass = pf.containObj(className);
if (false == hasThisClass) { if (false == hasThisClass) {
pf.createObj(className); pf.createObj(className);

View File

@ -1,10 +1,11 @@
package org.bench4q.agent.test.parameterization; package org.bench4q.agent.test.parameterization;
import org.bench4q.agent.parameterization.impl.InstanceControler; import org.bench4q.agent.parameterization.impl.InstanceControler;
import org.bench4q.share.helper.TestHelper;
public class TEST_UserName { public class TEST_UserName {
public static void main(String[] args) { public static void main(String[] args) throws Exception {
// TODO Auto-generated method stub // TODO Auto-generated method stub
// Para_UserNameAndPassword pp = new Para_UserNameAndPassword(); // Para_UserNameAndPassword pp = new Para_UserNameAndPassword();
// UUID temp = java.util.UUID.randomUUID(); // UUID temp = java.util.UUID.randomUUID();
@ -18,7 +19,8 @@ public class TEST_UserName {
System.out.print("\t"); System.out.print("\t");
System.out.println(passwordName); System.out.println(passwordName);
// pp.unreg(temp); // pp.unreg(temp);
ic.releaseAll(); // ic.releaseAll();
TestHelper.invokePrivate(ic, "releaseAll", null, null);
} }
} }