[jboss-svn-commits] JBL Code SVN: r14536 - in labs/jbossesb/trunk/product/samples/quickstarts/tests: src/org/jboss/soa/esb/quickstart/test and 1 other directory.
jboss-svn-commits at lists.jboss.org
jboss-svn-commits at lists.jboss.org
Fri Aug 24 14:32:46 EDT 2007
Author: ldimaggi at redhat.com
Date: 2007-08-24 14:32:46 -0400 (Fri, 24 Aug 2007)
New Revision: 14536
Modified:
labs/jbossesb/trunk/product/samples/quickstarts/tests/build.xml
labs/jbossesb/trunk/product/samples/quickstarts/tests/src/org/jboss/soa/esb/quickstart/test/HelloWorldSQLActionTest.java
Log:
quickstarts/tests/src/org/jboss/soa/esb/quickstart/test/HelloWorldSQLActionTest.java
Added validation - but commented it out for now
// Commented out 20070824 - ldimaggi - the log file is not
// being written - not clear why - perhaps due to
// ESB supports DB as a transport - That type of transport does
// not support MySQL
quickstarts/tests/build.xml
Removed more_action quickstart per http://jira.jboss.com/jira/browse/JBESB-880
Modified: labs/jbossesb/trunk/product/samples/quickstarts/tests/build.xml
===================================================================
--- labs/jbossesb/trunk/product/samples/quickstarts/tests/build.xml 2007-08-24 18:20:52 UTC (rev 14535)
+++ labs/jbossesb/trunk/product/samples/quickstarts/tests/build.xml 2007-08-24 18:32:46 UTC (rev 14536)
@@ -178,8 +178,7 @@
<quickstart-clean quickstartdir="../helloworld_db_registration"/>
<quickstart-clean quickstartdir="../helloworld_file_action"/>
<quickstart-clean quickstartdir="../helloworld_sql_action"/>
- <quickstart-clean quickstartdir="../more_action"/>
- <quickstart-clean quickstartdir="../recipient_list"/>
+ <quickstart-clean quickstartdir="../recipient_list"/>
<quickstart-clean quickstartdir="../scripting_groovy"/>
<quickstart-clean quickstartdir="../simple_cbr"/>
<quickstart-clean quickstartdir="../static_router"/>
@@ -218,7 +217,6 @@
<output-esb quickstartdir="../helloworld_db_registration"/>
<output-esb quickstartdir="../helloworld_file_action"/>
<output-esb quickstartdir="../helloworld_sql_action"/>
- <output-esb quickstartdir="../more_action"/>
<output-esb quickstartdir="../recipient_list"/>
<output-esb quickstartdir="../scripting_groovy"/>
<output-esb quickstartdir="../simple_cbr"/>
Modified: labs/jbossesb/trunk/product/samples/quickstarts/tests/src/org/jboss/soa/esb/quickstart/test/HelloWorldSQLActionTest.java
===================================================================
--- labs/jbossesb/trunk/product/samples/quickstarts/tests/src/org/jboss/soa/esb/quickstart/test/HelloWorldSQLActionTest.java 2007-08-24 18:20:52 UTC (rev 14535)
+++ labs/jbossesb/trunk/product/samples/quickstarts/tests/src/org/jboss/soa/esb/quickstart/test/HelloWorldSQLActionTest.java 2007-08-24 18:32:46 UTC (rev 14536)
@@ -13,13 +13,50 @@
* @author <a href="mailto:tcunning at redhat.com">Tom Cunningham</a>
*/
public class HelloWorldSQLActionTest extends JBossTestCase {
+
+ private static final String FILE_NAME = "HelloWorldSQLActionTest.log";
+ private static final String LOG_FILE = Helpers.getTempDir(FILE_NAME)
+ + FILE_NAME;
+ private static final int EXPECTED_RECORD_COUNT = 1;
+
+
public HelloWorldSQLActionTest(String name) {
super(name);
}
public void testMessage() throws Exception {
sendMessage();
- Thread.sleep(10000); // wait for message to post.
+
+ // Commented out 20070824 - ldimaggi - the log file is not
+ // being written - not clear why - perhaps due to
+ // ESB supports DB as a transport - That type of transport does
+ // not support MySQL
+
+// /* Verify that the message file is created */
+// boolean fileExists = Helpers.checkForFile(LOG_FILE);
+// if (!fileExists) {
+// fail("Event file " + LOG_FILE
+// + " not created - test marked as failing");
+// }
+//
+// /* Verify that the message file is complete */
+// boolean fileComplete = Helpers.checkFileContent(LOG_FILE,
+// EXPECTED_RECORD_COUNT);
+// if (!fileComplete) {
+// Hashtable temp = Helpers.getMessageString(LOG_FILE);
+// File target = new File(LOG_FILE);
+// target.delete();
+// fail("Event file " + LOG_FILE + " not complete - expected "
+// + EXPECTED_RECORD_COUNT + " records - found " + temp.size()
+// + ", test marked as failing");
+// }
+//
+// Hashtable theTable = Helpers.getMessageString(LOG_FILE);
+// String theMessage = (String) theTable.get("Message1");
+// assertEquals("The strings should match", theMessage, JMS_MESSAGE);
+// File target = new File(LOG_FILE);
+// target.delete();
+
}
public void sendMessage() throws Exception {
@@ -43,18 +80,24 @@
// Could not connect to the database
}
+ String loggingInfo = Helpers.START_TAG + LOG_FILE + Helpers.END_TAG;
Vector theRecords = new Vector();
- theRecords
- .add("insert into gateway_table values(0,'data 111111 [jbesb-filename]/tmp/HelloWorldSQLActionTest.log[/jbesb-filename] ','p')");
- theRecords
- .add("insert into gateway_table values(0,'data 22 [jbesb-filename]/tmp/HelloWorldSQLActionTest.log[/jbesb-filename] ','p')");
- theRecords
- .add("insert into gateway_table values(0,'data 333333333333111111 [jbesb-filename]/tmp/HelloWorldSQLActionTest.log[/jbesb-filename] ','p')");
- theRecords
- .add("insert into gateway_table values(0,'data d d d d [jbesb-filename]/tmp/HelloWorldSQLActionTest.log[/jbesb-filename] ','p')");
- theRecords
- .add("insert into gateway_table values(0,'data last record [jbesb-filename]/tmp/HelloWorldSQLActionTest.log[/jbesb-filename] ','p')");
+
+ String tempStr = "insert into gateway_table values(0,'data 111111 " + loggingInfo + " ','p')";
+ theRecords.add(tempStr);
+ tempStr = "insert into gateway_table values(0,'data 22 " + loggingInfo + " ','p')";
+ theRecords.add(tempStr);
+
+ tempStr = "insert into gateway_table values(0,'data 333333333333111111 " + loggingInfo + " ','p')";
+ theRecords.add(tempStr);
+
+ tempStr = "insert into gateway_table values(0,'data d d d d " + loggingInfo + " ','p')";
+ theRecords.add(tempStr);
+
+ tempStr = "insert into gateway_table values(0,'data data last record " + loggingInfo + " ','p')";
+ theRecords.add(tempStr);
+
for (int i = 0; i < theRecords.size(); i++) {
try {
More information about the jboss-svn-commits
mailing list