User: user57 Date: 01/07/05 19:29:19 Modified: src/main/org/jboss/test/bank/test Main.java Log: o Changed all tests which deploy one or more jars to undeploy after testing. Revision Changes Path 1.2 +32 -5 jbosstest/src/main/org/jboss/test/bank/test/Main.java Index: Main.java =================================================================== RCS file: /cvsroot/jboss/jbosstest/src/main/org/jboss/test/bank/test/Main.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- Main.java 2000/06/21 15:52:39 1.1 +++ Main.java 2001/07/06 02:29:19 1.2 @@ -11,14 +11,20 @@ import javax.management.*; import org.jboss.test.bank.interfaces.*; +import junit.framework.Test; +import junit.framework.TestCase; +import junit.framework.TestSuite; + +import org.jboss.test.util.Deploy; + /** * * @see <related> - * @author $Author: oberg $ - * @version $Revision: 1.1 $ + * @author $Author: user57 $ + * @version $Revision: 1.2 $ */ public class Main - extends junit.framework.TestCase + extends TestCase { // Constants ----------------------------------------------------- @@ -434,8 +440,8 @@ throws Exception { if (deployed) return; - System.out.println("Deploying"); - new org.jboss.jmx.client.Deployer().deploy("../deploy/bank.jar"); + // System.out.println("Deploying"); + // new org.jboss.jmx.client.Deployer().deploy("../deploy/bank.jar"); deployed = true; System.out.println("Remove accounts"); @@ -464,4 +470,25 @@ } } } + + public static Test suite() { + TestSuite suite = new TestSuite(); + + try { + String filename = "../deploy/bank.jar"; + System.out.println("Deploying..."); + Deploy.deploy(filename); + + suite.addTest(new TestSuite(Main.class)); + + // add a test case to undeploy our support applications + suite.addTest(new Deploy.Undeployer(filename)); + } + catch (Throwable t) { + t.printStackTrace(); + System.exit(0); + } + + return suite; + } } _______________________________________________ Jboss-development mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-development