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

  Modified:    src/main/org/jboss/test/naming/test TestENC.java
  Log:
   o Changed all tests which deploy one or more jars to undeploy after
     testing.
  
  Revision  Changes    Path
  1.3       +23 -2     jbosstest/src/main/org/jboss/test/naming/test/TestENC.java
  
  Index: TestENC.java
  ===================================================================
  RCS file: /cvsroot/jboss/jbosstest/src/main/org/jboss/test/naming/test/TestENC.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- TestENC.java      2001/06/10 18:28:30     1.2
  +++ TestENC.java      2001/07/06 02:29:21     1.3
  @@ -8,6 +8,7 @@
   import javax.naming.NamingException;
   import javax.rmi.PortableRemoteObject;
   
  +import junit.framework.Test;
   import junit.framework.TestCase;
   import junit.framework.TestSuite;
   
  @@ -29,7 +30,7 @@
        */
       protected void setUp() throws Exception
       {
  -        Deploy.deploy("naming.jar");
  +        // Deploy.deploy("naming.jar");
       }
   
       public void testENC() throws Exception
  @@ -61,8 +62,28 @@
       public static void main(java.lang.String[] args)
       {
           System.setErr(System.out);
  -        TestSuite suite = new TestSuite(TestENC.class);
  +        Test suite = suite();
           junit.textui.TestRunner.run(suite);
       }
   
  +    public static Test suite() {
  +        TestSuite suite = new TestSuite();
  +     
  +        try {
  +            String filename = "../deploy/naming.jar";
  +            System.out.println("Deploying...");
  +            Deploy.deploy(filename);
  +
  +            suite.addTest(new TestSuite(TestENC.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

Reply via email to