User: user57
Date: 01/07/05 19:29:21
Modified: src/main/org/jboss/test/readahead/test Main.java
Log:
o Changed all tests which deploy one or more jars to undeploy after
testing.
Revision Changes Path
1.2 +32 -10 jbosstest/src/main/org/jboss/test/readahead/test/Main.java
Index: Main.java
===================================================================
RCS file: /cvsroot/jboss/jbosstest/src/main/org/jboss/test/readahead/test/Main.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- Main.java 2001/06/30 04:38:06 1.1
+++ Main.java 2001/07/06 02:29:21 1.2
@@ -2,17 +2,21 @@
import javax.naming.Context;
import javax.naming.InitialContext;
-import org.jboss.test.readahead.interfaces.CMPFindTestSessionHome;
-import org.jboss.test.readahead.interfaces.CMPFindTestSessionRemote;
+
import junit.framework.TestCase;
import junit.framework.Test;
import junit.framework.TestSuite;
+import org.jboss.test.readahead.interfaces.CMPFindTestSessionHome;
+import org.jboss.test.readahead.interfaces.CMPFindTestSessionRemote;
+
+import org.jboss.test.util.Deploy;
+
/**
* TestCase driver for the readahead finder tests
*
* @author <a href="mailto:[EMAIL PROTECTED]">danch (Dan Christopherson</a>
- * @version $Id: Main.java,v 1.1 2001/06/30 04:38:06 danch Exp $
+ * @version $Id: Main.java,v 1.2 2001/07/06 02:29:21 user57 Exp $
*
* Revision:
*/
@@ -24,10 +28,6 @@
super(name);
}
- public static Test suite() {
- return new TestSuite(Main.class);
- }
-
protected void tearDown() throws Exception {
if (rem != null) {
System.out.println("Removing test data");
@@ -45,8 +45,8 @@
if (rem != null)
return;
- System.out.println("Deploying");
- new org.jboss.jmx.client.Deployer().deploy("../deploy/readahead.jar");
+ // System.out.println("Deploying");
+ // new org.jboss.jmx.client.Deployer().deploy("../deploy/readahead.jar");
System.out.println("Creating test data");
Context ctx = new InitialContext();
@@ -68,4 +68,26 @@
public void testAddressByCity() throws Exception {
rem.addressByCity();
}
-}
\ No newline at end of file
+
+ public static Test suite() {
+ TestSuite suite = new TestSuite();
+
+ try {
+ String filename = "../deploy/readahead.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