User: user57 Date: 01/07/05 19:29:20 Modified: src/main/org/jboss/test/hello/test Main.java Log: o Changed all tests which deploy one or more jars to undeploy after testing. Revision Changes Path 1.2 +32 -3 jbosstest/src/main/org/jboss/test/hello/test/Main.java Index: Main.java =================================================================== RCS file: /cvsroot/jboss/jbosstest/src/main/org/jboss/test/hello/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:34 1.1 +++ Main.java 2001/07/06 02:29:20 1.2 @@ -12,14 +12,20 @@ import org.jboss.jmx.client.Deployer; import org.jboss.test.hello.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 ----------------------------------------------------- @@ -185,9 +191,32 @@ protected void setUp() throws Exception { + /* if (deployed) return; System.out.println("Deploying"); new org.jboss.jmx.client.Deployer().deploy("../deploy/hello.jar"); deployed = true; + */ } + + public static Test suite() { + TestSuite suite = new TestSuite(); + + try { + String filename = "../deploy/hello.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