User: user57
Date: 01/07/05 19:29:20
Modified: src/main/org/jboss/test/bmp/test Main.java
Log:
o Changed all tests which deploy one or more jars to undeploy after
testing.
Revision Changes Path
1.3 +33 -8 jbosstest/src/main/org/jboss/test/bmp/test/Main.java
Index: Main.java
===================================================================
RCS file: /cvsroot/jboss/jbosstest/src/main/org/jboss/test/bmp/test/Main.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- Main.java 2001/02/27 17:28:28 1.2
+++ Main.java 2001/07/06 02:29:19 1.3
@@ -7,7 +7,11 @@
import org.jboss.test.bmp.interfaces.*;
-public class Main extends junit.framework.TestCase
+import junit.framework.*;
+import org.jboss.test.util.Deploy;
+
+public class Main
+ extends TestCase
{
private boolean deployed;
@@ -123,13 +127,13 @@
protected void setUp() throws Exception
{
- if (deployed) return;
- String deployDir = System.getProperty("jbosstest.deploy.dir");
- if( deployDir == null )
- deployDir = "../deploy";
- System.out.println("deployDir = "+deployDir);
- new org.jboss.jmx.client.Deployer().deploy(deployDir+"/bmp.jar");
- deployed = true;
+// if (deployed) return;
+// String deployDir = System.getProperty("jbosstest.deploy.dir");
+// if( deployDir == null )
+// deployDir = "../deploy";
+// System.out.println("deployDir = "+deployDir);
+// new org.jboss.jmx.client.Deployer().deploy(deployDir+"/bmp.jar");
+// deployed = true;
}
public static void main (String[] _args) throws Exception
@@ -138,4 +142,25 @@
m.setUp();
m.testBMP();
}
+
+ public static Test suite() {
+ TestSuite suite = new TestSuite();
+
+ try {
+ String filename = "../deploy/bmp.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