User: d_jencks
Date: 01/09/19 12:16:54
Modified: src/main/org/jboss/test/cts/test
StatelessSessionStressTestCase.java
Log:
Changed stress tests to have counts set from build.xml. You may set values in a
local.properties file.
Revision Changes Path
1.4 +7 -13
jbosstest/src/main/org/jboss/test/cts/test/StatelessSessionStressTestCase.java
Index: StatelessSessionStressTestCase.java
===================================================================
RCS file:
/cvsroot/jboss/jbosstest/src/main/org/jboss/test/cts/test/StatelessSessionStressTestCase.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- StatelessSessionStressTestCase.java 2001/09/18 22:00:43 1.3
+++ StatelessSessionStressTestCase.java 2001/09/19 19:16:54 1.4
@@ -16,7 +16,6 @@
import javax.management.*;
import org.jboss.test.cts.interfaces.*;
-//import junit.framework.*;
import junit.framework.Test;
import org.jboss.test.JBossTestCase;
@@ -28,7 +27,7 @@
* @see <related>
* @author Author: kimptoc
* @author Author: d_jencks converted to JBossTestCase and logging.
- * @version $Revision: 1.3 $
+ * @version $Revision: 1.4 $
*/
public class StatelessSessionStressTestCase
@@ -76,21 +75,16 @@
{
getLog().debug("Callback test");
- StatefulSession sessionBean [] = new StatefulSession [125];
- StatefulSessionHome home = null;
- int i = 0;
+ StatefulSession sessionBean[] = new StatefulSession[getBeanCount()];
+ StatefulSessionHome home = null;
+ int i = 0;
try
{
- Properties props = System.getProperties();
-
getLog().debug("Obtain home interface");
- // Create a new session object
- Context ctx = new InitialContext(props);
-
home =
- ( StatefulSessionHome ) ctx.lookup("ejbcts/StatefulSessionBean");
+
(StatefulSessionHome)getInitialContext().lookup("ejbcts/StatefulSessionBean");
}
catch (Exception Ex)
{
@@ -99,7 +93,7 @@
try
{
- for (i = 0; i < 125; i++)
+ for (i = 0; i < getBeanCount(); i++)
{
sessionBean [i] = home.create();
@@ -108,7 +102,7 @@
}
// Kill all the beans
- for (i = 0; i < 125; i++)
+ for (i = 0; i < getBeanCount(); i++)
sessionBean [i].remove();
}
catch (Exception ex)
_______________________________________________
Jboss-development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development