User: user57
Date: 01/07/05 19:29:20
Modified: src/main/org/jboss/test/idgen/test Main.java
Log:
o Changed all tests which deploy one or more jars to undeploy after
testing.
Revision Changes Path
1.2 +31 -4 jbosstest/src/main/org/jboss/test/idgen/test/Main.java
Index: Main.java
===================================================================
RCS file: /cvsroot/jboss/jbosstest/src/main/org/jboss/test/idgen/test/Main.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- Main.java 2000/08/25 13:43:42 1.1
+++ Main.java 2001/07/06 02:29:20 1.2
@@ -9,13 +9,19 @@
import javax.ejb.*;
import javax.naming.*;
+import junit.framework.Test;
+import junit.framework.TestCase;
+import junit.framework.TestSuite;
+
+import org.jboss.test.util.Deploy;
+
import org.jboss.test.idgen.interfaces.*;
/**
*
* @see <related>
- * @author $Author: oberg $
- * @version $Revision: 1.1 $
+ * @author $Author: user57 $
+ * @version $Revision: 1.2 $
*/
public class Main
extends junit.framework.TestCase
@@ -55,8 +61,8 @@
throws Exception
{
if (deployed) return;
- System.out.println("Deploying");
- new org.jboss.jmx.client.Deployer().deploy("../deploy/idgen.jar");
+ // System.out.println("Deploying");
+ // new org.jboss.jmx.client.Deployer().deploy("../deploy/idgen.jar");
deployed = true;
System.out.println("Remove id counters");
@@ -72,4 +78,25 @@
}
}
}
+
+ public static Test suite() {
+ TestSuite suite = new TestSuite();
+
+ try {
+ String filename = "../deploy/idgen.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