User: user57  
  Date: 01/07/05 19:29:21

  Modified:    src/main/org/jboss/test/lock/test Main.java
  Log:
   o Changed all tests which deploy one or more jars to undeploy after
     testing.
  
  Revision  Changes    Path
  1.4       +29 -1     jbosstest/src/main/org/jboss/test/lock/test/Main.java
  
  Index: Main.java
  ===================================================================
  RCS file: /cvsroot/jboss/jbosstest/src/main/org/jboss/test/lock/test/Main.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- Main.java 2001/04/18 19:48:28     1.3
  +++ Main.java 2001/07/06 02:29:21     1.4
  @@ -13,7 +13,12 @@
   import org.jboss.test.lock.interfaces.EnterpriseEntityHome;
   import org.jboss.test.lock.interfaces.EnterpriseEntity;
   
  +import junit.framework.Test;
  +import junit.framework.TestCase;
  +import junit.framework.TestSuite;
   
  +import org.jboss.test.util.Deploy;
  +
   public class Main extends junit.framework.TestCase
   {
        
  @@ -112,6 +117,7 @@
        
        
        protected void deploy() throws Exception {
  +        /*
                if (deployed) return;
                        
                System.out.println("_____________________________________________");
  @@ -128,9 +134,31 @@
                new org.jboss.jmx.client.Deployer().deploy("../deploy/locktest.jar");
                deployed = true;
                System.out.println("done!");
  +             */
        }
        
  +
  +    public static Test suite() {
  +        TestSuite suite = new TestSuite();
        
  +        try {
  +            String filename = "../deploy/locktest.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;
  +    }
  +     
        public class Worker extends Thread {
                public String name;
                public boolean running;
  @@ -166,6 +194,6 @@
                        long end = System.currentTimeMillis();
                        System.out.println(name + ": did " + i + " iterations in " + 
(end-start) + "ms");
                }
  -     }          
  +     }
   }
   
  
  
  

_______________________________________________
Jboss-development mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/jboss-development

Reply via email to