[jboss-cvs] JBossAS SVN: r104610 - branches/JBPAPP_5_1/testsuite/src/main/org/jboss/test/scripts/test.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Mon May 10 12:35:13 EDT 2010


Author: rachmatowicz at jboss.com
Date: 2010-05-10 12:35:12 -0400 (Mon, 10 May 2010)
New Revision: 104610

Modified:
   branches/JBPAPP_5_1/testsuite/src/main/org/jboss/test/scripts/test/ProbeTestCase.java
Log:
Update ProbeTestCase to incorporate changes made from EAP 4.3 to EAP 5.1.


Modified: branches/JBPAPP_5_1/testsuite/src/main/org/jboss/test/scripts/test/ProbeTestCase.java
===================================================================
--- branches/JBPAPP_5_1/testsuite/src/main/org/jboss/test/scripts/test/ProbeTestCase.java	2010-05-10 16:24:30 UTC (rev 104609)
+++ branches/JBPAPP_5_1/testsuite/src/main/org/jboss/test/scripts/test/ProbeTestCase.java	2010-05-10 16:35:12 UTC (rev 104610)
@@ -31,11 +31,11 @@
 /**
  * Unit tests of probe.sh and probe.bat.
  * 
- * Requires testing against the all config.
+ * Requires testing against the 'all' config which includes JGroups.
  * 
  * There are a number of tests which need covering and their priority:
  * (high) - that we get at least 4 responses (for the four channels in the AS) [DONE]
- * (high) - that -match Tomcat-Cluster returns only one response (need isolation, need negative assertion) [DONE]
+ * (high) - that -match DeafultPartition-JMS-CTRL returns only one response (need isolation, need negative assertion) [DONE]
  * (low)  - that -addr and -port when used in conjunction with server which has had 
  * its diagnostics address and port changed returns exactly 4 replies
  * 
@@ -93,7 +93,7 @@
    }  
 
    /**
-    * Tests probe receives a response for every channel in the AS 
+    * Tests probe receives a response for every channel in the AS (AS 5)
     *  
     * @throws Exception
     */
@@ -116,25 +116,25 @@
 
 	   // check assertions
 	   getShellScriptExecutor().assertOnOutputStream("#4","Less than 4 channel responses found in command output") ;
-	   getShellScriptExecutor().assertOnOutputStream("DefaultPartition-SFSBCache","DefaultPartition-SFSBCache channel response not found in command output") ;
-	   getShellScriptExecutor().assertOnOutputStream("DefaultPartition-EntityCache","DefaultPartition-EntityCache channel response not found in command output") ;
+	   getShellScriptExecutor().assertOnOutputStream("DefaultPartition-HAPartitionCache","DefaultPartition-HAPartitionCache channel response not found in command output") ;
+	   getShellScriptExecutor().assertOnOutputStream("DefaultPartition-JMS-DATA","DefaultPartition-JMS-DATA channel response not found in command output") ;
+	   getShellScriptExecutor().assertOnOutputStream("DefaultPartition-JMS-CTRL","DefaultPartition-JMS-CTRL channel response not found in command output") ;
 	   getShellScriptExecutor().assertOnOutputStream("DefaultPartition","DefaultPartition channel response not found in command output") ;
-	   getShellScriptExecutor().assertOnOutputStream("Tomcat-Cluster","Tomcat-Cluster channel response not found in command output") ;
    }  
    
    
    /**
-    * Tests probe -query jmx command (returns a list of JMX statistics for each protocol)
+    * Tests probe keys command (returns a list of keys which can be queried)
     *  
     * @throws Exception
     */
-   public void testQueryJMX() throws Exception
+   public void testKeyKeys() throws Exception
    {
 	   // build the shell command to execute
 	   // supply the command name prefix, any options as a string, and any args
 	   String command = "probe" ;
 	   String options = null ;  
-	   String args = "-query jmx" ;
+	   String args = "keys" ;
 	   String[] shellCommand = getShellCommand(command, options, args) ;
 	   
 	   // set the environment if necessary 
@@ -146,7 +146,35 @@
 	   getShellScriptExecutor().runShellCommand(shellCommand, envp, workingDir) ; 
 
 	   // check assertions
-	   getShellScriptExecutor().assertOnOutputStream("stats:","'stats:' string not found in command output") ;
+	   getShellScriptExecutor().assertOnOutputStream("jmx","'jmx' string not found in command output") ;
+	   getShellScriptExecutor().assertOnOutputStream("info","'info' string not found in command output") ;
+	   getShellScriptExecutor().assertOnOutputStream("dump","'dump' string not found in command output") ;
+   } 
+   
+   /**
+    * Tests probe jmx=udp command (returns a list of JMX statistics for protocol udp)
+    *  
+    * @throws Exception
+    */
+   public void testKeyJMX() throws Exception
+   {
+	   // build the shell command to execute
+	   // supply the command name prefix, any options as a string, and any args
+	   String command = "probe" ;
+	   String options = null ;  
+	   String args = "jmx" ;
+	   String[] shellCommand = getShellCommand(command, options, args) ;
+	   
+	   // set the environment if necessary 
+	   String[] envp = null ;
+	   // set the working directory
+	   File workingDir = new File(getBinDir()) ;
+
+	   // execute command
+	   getShellScriptExecutor().runShellCommand(shellCommand, envp, workingDir) ; 
+
+	   // check assertions
+	   getShellScriptExecutor().assertOnOutputStream("UDP","'UDP' string not found in command output") ;
    }  
    
    /**
@@ -154,13 +182,13 @@
     *  
     * @throws Exception
     */
-   public void testQueryProps() throws Exception
+   public void testKeyDump() throws Exception
    {
 	   // build the shell command to execute
 	   // supply the command name prefix, any options as a string, and any args
 	   String command = "probe" ;
 	   String options = null ;  
-	   String args = "-query props" ;
+	   String args = "dump" ;
 	   String[] shellCommand = getShellCommand(command, options, args) ;
 	   
 	   // set the environment if necessary 
@@ -172,7 +200,7 @@
 	   getShellScriptExecutor().runShellCommand(shellCommand, envp, workingDir) ; 
 
 	   // check assertions
-	   getShellScriptExecutor().assertOnOutputStream("props:","'props:' string not found in command output") ;
+	   getShellScriptExecutor().assertOnOutputStream("JBoss System Threads","'JBoss System Threads' string not found in command output") ;
    }  
    
    /**
@@ -186,7 +214,7 @@
 	   // supply the command name prefix, any options as a string, and any args
 	   String command = "probe" ;
 	   String options = null ;  
-	   String args = "-match Tomcat-Cluster" ;
+	   String args = "-match JMS-CTRL" ;
 	   String[] shellCommand = getShellCommand(command, options, args) ;
 	   
 	   // set the environment if necessary 
@@ -200,7 +228,7 @@
 	   // check assertions
 	   // need to check the absence of a string here!
 	   // assertNotOnOutputStream("Default-Partition", "'Default-Partition' found in match list")
-	   getShellScriptExecutor().assertOnOutputStream("Tomcat-Cluster","'Tomcat-Cluster' string not found in command output") ;
+	   getShellScriptExecutor().assertOnOutputStream("DefaultPartition-JMS-CTRL","'DefaultPartition-JMS-CTRL' string not found in command output") ;
    }  
   
    /* 




More information about the jboss-cvs-commits mailing list