[jboss-cvs] JBossAS SVN: r112175 - branches/JBPAPP_5_1_JBPAPP-6716/testsuite/src/main/org/jboss/test/deployment.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Wed Aug 31 01:20:44 EDT 2011


Author: bmaxwell
Date: 2011-08-31 01:20:44 -0400 (Wed, 31 Aug 2011)
New Revision: 112175

Modified:
   branches/JBPAPP_5_1_JBPAPP-6716/testsuite/src/main/org/jboss/test/deployment/JBPAPP6716UnitTestCase.java
Log:
[JBPAPP-6716] clean up test case

Modified: branches/JBPAPP_5_1_JBPAPP-6716/testsuite/src/main/org/jboss/test/deployment/JBPAPP6716UnitTestCase.java
===================================================================
--- branches/JBPAPP_5_1_JBPAPP-6716/testsuite/src/main/org/jboss/test/deployment/JBPAPP6716UnitTestCase.java	2011-08-30 23:15:12 UTC (rev 112174)
+++ branches/JBPAPP_5_1_JBPAPP-6716/testsuite/src/main/org/jboss/test/deployment/JBPAPP6716UnitTestCase.java	2011-08-31 05:20:44 UTC (rev 112175)
@@ -96,16 +96,7 @@
       super.tearDown();
       setSecurity((Principal) previousSecurity[0], previousSecurity[1]);      
    }
-      
-   private void setSecurity(Principal username, Object password)
-   {
-      previousSecurity[0] = SecurityAssociation.getPrincipal();
-      previousSecurity[1] = SecurityAssociation.getCredential();
-      
-      SecurityAssociation.setPrincipal(username);
-      SecurityAssociation.setCredential(password);       
-   }
-   
+           
    //***** Deploy Tests *****//
 
    /* this tests these methods:
@@ -171,20 +162,10 @@
       }
    }
    
-   
+   // run tests using $JBOSS_HOME/bin/twiddle.sh
    public void testTwiddle()
    {
-      // run commands and check result
-//      
-//      /bin/twiddle.sh -u admin -p admin invoke "jboss.system:service=MainDeployer" listDeployed > twiddleListTestResults.txt
-//      <jboss_home>/bin/twiddle.sh -u admin -p admin invoke "jboss.system:service=MainDeployer" listDeployedAsString >> twiddleListTestResults.txt
-//      <jboss_home>/bin/twiddle.sh -u admin -p admin invoke "jboss.system:service=MainDeployer" listDeployedModules >> twiddleListTestResults.txt
-//      <jboss_home>/bin/twiddle.sh -u admin -p admin invoke "jboss.system:service=MainDeployer" listDeployedModulesSimpleNames >> twiddleListTestResults.txt
-//      twiddle("-u admin -p admin invoke \"jboss.system:service=MainDeployer\" listDeployed", "");
-      
-      // this was a test to confirm exit code failure would occur
-//     twiddle(invoke + "undeploy "+ "file:/tmp/invalid.war", null);
-      
+      // $JBOSS_HOME/bin/twiddle.sh -u admin -p admin invoke jboss.system:service=MainDeployer listDeployedAsString      
       String invoke = "-u admin -p admin invoke jboss.system:service=MainDeployer ";
       String[] deployments = new String[] 
                                         { 
@@ -315,18 +296,6 @@
          }                  
       }
    }      
-
-   private void cleanUp()
-   {
-      try
-      {
-         deployer.undeploy(dummyUrl);
-      }
-      catch(Exception e)
-      {
-         // eat it
-      }
-   }
    
    //***** Listing Methods *****//
 
@@ -377,6 +346,29 @@
       }
    }
    
+   /** Utility Methods **/
+   
+   private void cleanUp()
+   {
+      try
+      {
+         deployer.undeploy(dummyUrl);
+      }
+      catch(Exception e)
+      {
+         // eat it
+      }
+   }
+   
+   private void setSecurity(Principal username, Object password)
+   {
+      previousSecurity[0] = SecurityAssociation.getPrincipal();
+      previousSecurity[1] = SecurityAssociation.getCredential();
+      
+      SecurityAssociation.setPrincipal(username);
+      SecurityAssociation.setCredential(password);       
+   }
+   
    /**
     * Verifies that a given module is acutally deployed. Waits for a while,
     * checking every few seconds, to see if the module has deployed yet.



More information about the jboss-cvs-commits mailing list