User: d_jencks
Date: 01/09/18 15:00:43
Modified: src/main/org/jboss/test/cts/test BmpUnitTestCase.java
StatefulSessionUnitTestCase.java
StatelessSessionStressTestCase.java
StatelessSessionUnitTestCase.java
Log:
Changed tests to deploy/undeploy only once per testcase file. Moved clearAuthCache
to JBossTestServices
Revision Changes Path
1.2 +14 -7 jbosstest/src/main/org/jboss/test/cts/test/BmpUnitTestCase.java
Index: BmpUnitTestCase.java
===================================================================
RCS file:
/cvsroot/jboss/jbosstest/src/main/org/jboss/test/cts/test/BmpUnitTestCase.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- BmpUnitTestCase.java 2001/09/15 00:12:16 1.1
+++ BmpUnitTestCase.java 2001/09/18 22:00:43 1.2
@@ -31,6 +31,8 @@
import org.jboss.test.cts.interfaces.UserTransactionTester;
import org.jboss.test.cts.keys.AccountPK;
+import junit.framework.Test;
+
import org.jboss.test.JBossTestCase;
@@ -38,7 +40,7 @@
* Class BmpTest
*
* @author Author: kimptoc
- * @version $Revision: 1.1 $
+ * @version $Revision: 1.2 $
*/
@@ -67,7 +69,7 @@
private CtsBmpHome getHome()
throws Exception
{
- return (CtsBmpHome)new InitialContext().lookup("ejbcts/BMPBean");
+ return (CtsBmpHome)getInitialContext().lookup("ejbcts/BMPBean");
}
/**
@@ -689,12 +691,11 @@
return retVal;
}
-
+
+ //do the mbox setup/teardown for each test separately
protected void setUp()
throws Exception
{
- super.setUp();
- deployJ2ee("cts.jar");
getLog().debug("Build Container MBX for BMP");
mbx = new ContainerMBox();
@@ -718,7 +719,13 @@
mbx.close();
} catch (Exception ignoredBecauseProblemsWillBeHighlightedAsTestFailures)
{}
- undeployJ2ee("cts.jar");
- super.tearDown();
}
+
+ //deploy the cts.jar once for the suite.
+ public static Test suite() throws Exception
+ {
+ return getJ2eeSetup(BmpUnitTestCase.class, "cts.jar");
+ }
+
+
}
1.2 +5 -12
jbosstest/src/main/org/jboss/test/cts/test/StatefulSessionUnitTestCase.java
Index: StatefulSessionUnitTestCase.java
===================================================================
RCS file:
/cvsroot/jboss/jbosstest/src/main/org/jboss/test/cts/test/StatefulSessionUnitTestCase.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- StatefulSessionUnitTestCase.java 2001/09/15 00:12:16 1.1
+++ StatefulSessionUnitTestCase.java 2001/09/18 22:00:43 1.2
@@ -26,6 +26,8 @@
import org.apache.log4j.Category;
+import junit.framework.Test;
+
import org.jboss.test.JBossTestCase;
@@ -34,7 +36,7 @@
* @see <related>
* @author Author: kimptoc
* @author Author: d_jencks converted to JBossTestCase, added logging.
- * @version $Revision: 1.1 $
+ * @version $Revision: 1.2 $
*/
public class StatefulSessionUnitTestCase
@@ -603,20 +605,11 @@
"**************************************************************");
}
- protected void setUp ()
- throws Exception
- {
- super.setUp();
- deployJ2ee("cts.jar");
- }
- protected void tearDown()
- throws Exception
+ public static Test suite() throws Exception
{
- undeployJ2ee("cts.jar");
- super.tearDown();
+ return getJ2eeSetup(StatefulSessionUnitTestCase.class, "cts.jar");
}
-
}
1.3 +5 -12
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.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- StatelessSessionStressTestCase.java 2001/09/15 00:12:16 1.2
+++ StatelessSessionStressTestCase.java 2001/09/18 22:00:43 1.3
@@ -16,7 +16,8 @@
import javax.management.*;
import org.jboss.test.cts.interfaces.*;
-import junit.framework.*;
+//import junit.framework.*;
+import junit.framework.Test;
import org.jboss.test.JBossTestCase;
@@ -27,7 +28,7 @@
* @see <related>
* @author Author: kimptoc
* @author Author: d_jencks converted to JBossTestCase and logging.
- * @version $Revision: 1.2 $
+ * @version $Revision: 1.3 $
*/
public class StatelessSessionStressTestCase
@@ -117,19 +118,11 @@
}
} // testCallbacks()
- protected void setUp ()
- throws Exception
+ public static Test suite() throws Exception
{
- super.setUp();
- deployJ2ee("cts.jar");
+ return getJ2eeSetup(StatelessSessionStressTestCase.class, "cts.jar");
}
- protected void tearDown()
- throws Exception
- {
- undeployJ2ee("cts.jar");
- super.tearDown();
- }
}
1.2 +4 -10
jbosstest/src/main/org/jboss/test/cts/test/StatelessSessionUnitTestCase.java
Index: StatelessSessionUnitTestCase.java
===================================================================
RCS file:
/cvsroot/jboss/jbosstest/src/main/org/jboss/test/cts/test/StatelessSessionUnitTestCase.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- StatelessSessionUnitTestCase.java 2001/09/15 00:12:16 1.1
+++ StatelessSessionUnitTestCase.java 2001/09/18 22:00:43 1.2
@@ -16,6 +16,8 @@
import org.jboss.test.cts.interfaces.*;
import org.jboss.test.util.ejb.*;
+import junit.framework.Test;
+
import org.jboss.test.JBossTestCase;
@@ -25,7 +27,7 @@
*
* @author Author: kimptoc
* @author Author: d_jencks converted to JBossTestCase and logging.
- * @version $Revision: 1.1 $
+ * @version $Revision: 1.2 $
*/
public class StatelessSessionUnitTestCase
@@ -75,19 +77,11 @@
}
- protected void setUp ()
- throws Exception
+ public static Test suite() throws Exception
{
- super.setUp();
- deployJ2ee("cts.jar");
+ return getJ2eeSetup(StatelessSessionUnitTestCase.class, "cts.jar");
}
- protected void tearDown()
- throws Exception
- {
- undeployJ2ee("cts.jar");
- super.tearDown();
- }
}
_______________________________________________
Jboss-development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development