[jboss-svn-commits] JBL Code SVN: r23298 - in labs/jbossesb/workspace/skeagh: runtime/src/main/java/org/jboss/esb/test and 1 other directory.

jboss-svn-commits at lists.jboss.org jboss-svn-commits at lists.jboss.org
Fri Oct 3 13:08:07 EDT 2008


Author: tfennelly
Date: 2008-10-03 13:08:07 -0400 (Fri, 03 Oct 2008)
New Revision: 23298

Modified:
   labs/jbossesb/workspace/skeagh/performance/src/test/java/org/jboss/esb/SimpleSoakTest.java
   labs/jbossesb/workspace/skeagh/runtime/src/main/java/org/jboss/esb/test/JBossESBTestCase.java
   labs/jbossesb/workspace/skeagh/runtime/src/main/java/org/jboss/esb/test/package.html
Log:
Javadoc updates

Modified: labs/jbossesb/workspace/skeagh/performance/src/test/java/org/jboss/esb/SimpleSoakTest.java
===================================================================
--- labs/jbossesb/workspace/skeagh/performance/src/test/java/org/jboss/esb/SimpleSoakTest.java	2008-10-03 16:36:38 UTC (rev 23297)
+++ labs/jbossesb/workspace/skeagh/performance/src/test/java/org/jboss/esb/SimpleSoakTest.java	2008-10-03 17:08:07 UTC (rev 23298)
@@ -94,6 +94,9 @@
         }
 
         public void run() {
+
+            // ************* Update the length of this loop as required
+
             for(int i = 0; i < 100; i++) {
                 inrouter.sendMessage(message, true);
                 try {

Modified: labs/jbossesb/workspace/skeagh/runtime/src/main/java/org/jboss/esb/test/JBossESBTestCase.java
===================================================================
--- labs/jbossesb/workspace/skeagh/runtime/src/main/java/org/jboss/esb/test/JBossESBTestCase.java	2008-10-03 16:36:38 UTC (rev 23297)
+++ labs/jbossesb/workspace/skeagh/runtime/src/main/java/org/jboss/esb/test/JBossESBTestCase.java	2008-10-03 17:08:07 UTC (rev 23298)
@@ -40,6 +40,59 @@
  * <li>Guarantee all deployments are undeployed and all resources are cleaned up.</li>
  * </ol>
  *
+ * <h3>Example</h3>
+ * In this sample, we launch 3 seperate deployments connected into a single
+ * shared Bus (JMS).  We test that a message passed into the test inrouter
+ * for ServiceA is routed (via the shared Bus) through a series of Services
+ * to ServiceF and then to the test outrouter (for ServiceF).  In this case
+ * the message is routed across 3 ESB deployments:
+ * <p/>
+ * <pre>
+ * public class SimpleTest extends JBossESBTestCase {
+ *    
+ *     public SimpleTest() {
+ *         // Use the JMS Bus Provider...
+ *         super(new JmsTestBusProvider());
+ *     }
+ *
+ *     protected void setUp() throws Exception {
+ *         initialize();
+ *     }
+ *
+ *     protected void tearDown() throws Exception {
+ *         uninitialize();
+ *     }
+ *
+ *     public void test() throws DeploymentException, IOException, InterruptedException {
+ *         DeploymentRuntime deployment1;
+ *         DeploymentRuntime deployment3;
+ *
+ *         deployment1 = startDeployment("deployment-01.xml");
+ *         startDeployment("deployment-02.xml");
+ *         deployment3 = startDeployment("deployment-03.xml");
+ *
+ *         // Allow deployments to sync up...
+ *         Thread.sleep(500);
+ *
+ *         ServiceName serviceA = new ServiceName("Service", "A");
+ *         ServiceName serviceF = new ServiceName("Service", "F");
+ *
+ *         // Get a handle on the test inrouter and outrouter components from
+ *         // the DeploymentRuntime instances that host them...
+ *         TestInRouter inrouterA = (TestInRouter) DeploymentUtil.getInboundRouter(serviceA, "inrouterA", deployment1).getRouter();
+ *         TestOutRouter outrouterF = (TestOutRouter) DeploymentUtil.getOutboundRouter(serviceF, "outrouterF", deployment3).getRouter();
+ *
+ *         // Send a message in through the test inrouter and wait for it to
+ *         // be routed to the test outrouter (timeout after 10 seconds)...
+ *         inrouterA.sendTestMessage("Hello World!");
+ *         outrouterF.waitForMessage(10000);
+ *
+ *         // Check the message...
+ *         assertEquals("Hello World!", outrouterF.getMessage());
+ *     }
+ * }
+ * </pre>
+ *
  * @author <a href="mailto:tom.fennelly at jboss.com">tom.fennelly at jboss.com</a>
  */
 public abstract class JBossESBTestCase extends TestCase

Modified: labs/jbossesb/workspace/skeagh/runtime/src/main/java/org/jboss/esb/test/package.html
===================================================================
--- labs/jbossesb/workspace/skeagh/runtime/src/main/java/org/jboss/esb/test/package.html	2008-10-03 16:36:38 UTC (rev 23297)
+++ labs/jbossesb/workspace/skeagh/runtime/src/main/java/org/jboss/esb/test/package.html	2008-10-03 17:08:07 UTC (rev 23298)
@@ -1,7 +1,7 @@
 <html>
 <head></head>
 <body>
-JMS test utilities.
+ESB test utilities.
 
 <h2>Package Specification</h2>
 </body>




More information about the jboss-svn-commits mailing list