[jboss-svn-commits] JBL Code SVN: r7145 - in labs/jbossesb/trunk: product product/install qa/junit/src/org/jboss/soa/esb/listeners/old qa/junit/src/org/jboss/soa/esb/messagestore qa/junit/src/org/jboss/soa/esb/objpersist

jboss-svn-commits at lists.jboss.org jboss-svn-commits at lists.jboss.org
Thu Oct 26 10:55:45 EDT 2006


Author: kurt.stam at jboss.com
Date: 2006-10-26 10:55:42 -0400 (Thu, 26 Oct 2006)
New Revision: 7145

Added:
   labs/jbossesb/trunk/qa/junit/src/org/jboss/soa/esb/listeners/old/RemoteDirectoryPoller_brokentest.java
   labs/jbossesb/trunk/qa/junit/src/org/jboss/soa/esb/messagestore/MessageStore_brokentest.java
   labs/jbossesb/trunk/qa/junit/src/org/jboss/soa/esb/objpersist/ObjStore_brokentest.java
Removed:
   labs/jbossesb/trunk/qa/junit/src/org/jboss/soa/esb/listeners/old/RemoteDirectoryPollerTest.java
   labs/jbossesb/trunk/qa/junit/src/org/jboss/soa/esb/messagestore/MessageStoreTest.java
   labs/jbossesb/trunk/qa/junit/src/org/jboss/soa/esb/objpersist/ObjStoreTest.java
Modified:
   labs/jbossesb/trunk/product/build.xml
   labs/jbossesb/trunk/product/install/build.xml
Log:
parking the broken tests

Modified: labs/jbossesb/trunk/product/build.xml
===================================================================
--- labs/jbossesb/trunk/product/build.xml	2006-10-26 14:30:50 UTC (rev 7144)
+++ labs/jbossesb/trunk/product/build.xml	2006-10-26 14:55:42 UTC (rev 7145)
@@ -286,9 +286,9 @@
 	<target name="javadoc" depends="org.jboss.esb.javadocs"/>
 
 	<target name="deploy" depends="install">
+		<ant dir="install" target="configure"/>
 		<copy file="${org.jboss.esb.installationdirectory}/lib/jbossesb-appl.ear"
 		     todir="${org.jboss.esb.appserver.home}/server/${org.jboss.esb.appserver.config}/deploy"/>
-		<ant dir="install" target="configure"/>
 	</target>
 
 	<target name="deploy-instr" depends="earinstr">

Modified: labs/jbossesb/trunk/product/install/build.xml
===================================================================
--- labs/jbossesb/trunk/product/install/build.xml	2006-10-26 14:30:50 UTC (rev 7144)
+++ labs/jbossesb/trunk/product/install/build.xml	2006-10-26 14:55:42 UTC (rev 7145)
@@ -21,8 +21,8 @@
 		    	<equals arg1="${org.jboss.esb.db.create.db}"  arg2="create"/>
 		    </and>
 		 </condition>
-		<echo>hsql set=${hsql.set}</echo>
-		<echo>create set=${create.set}</echo>
+		<!-- echo>hsql set=${hsql.set}</echo  -->
+		<!-- echo>create set=${create.set}</echo -->
 	</target>
 	
 	<target name="configure" depends="configure.jboss" />
@@ -46,13 +46,14 @@
 	</target>
 	
 	<target name="hsql-datasource" if="hsql.set">
-		<echo>Installing hsql datasource</echo>
+		<echo>Installing hsql datasource hypersonic JBossESB-ds.xml</echo>
+		<delete file="${org.jboss.esb.appserver.home}/server/${org.jboss.esb.appserver.config}/deploy/hsqldb-ds.xml" />
 		<copy file="${org.jboss.esb.deployment.deploy}/JBossESB-hsqldb-ds.xml" overwrite="true"
 		     tofile="${org.jboss.esb.appserver.home}/server/${org.jboss.esb.appserver.config}/deploy/JBossESB-ds.xml"/>
 	</target>
 	
 	<target name="datasource" unless="hsql.set">
-		<echo>Installing datasource</echo>
+		<echo>Installing datasource JBossESB-ds.xml</echo>
 		 <copy file="${org.jboss.esb.deployment.deploy}/JBossESB-ds.xml" overwrite="true"
 	        todir="${org.jboss.esb.appserver.home}/server/${org.jboss.esb.appserver.config}/deploy">
 		  <filterset>

Deleted: labs/jbossesb/trunk/qa/junit/src/org/jboss/soa/esb/listeners/old/RemoteDirectoryPollerTest.java
===================================================================
--- labs/jbossesb/trunk/qa/junit/src/org/jboss/soa/esb/listeners/old/RemoteDirectoryPollerTest.java	2006-10-26 14:30:50 UTC (rev 7144)
+++ labs/jbossesb/trunk/qa/junit/src/org/jboss/soa/esb/listeners/old/RemoteDirectoryPollerTest.java	2006-10-26 14:55:42 UTC (rev 7145)
@@ -1,70 +0,0 @@
-/**
- * 
- */
-package org.jboss.soa.esb.listeners.old;
-
-import java.io.File;
-
-import junit.framework.TestCase;
-
-import org.apache.log4j.Logger;
-import org.jboss.soa.esb.util.ClassUtils;
-import org.jboss.soa.esb.util.FileUtils;
-import org.jboss.soa.esb.util.ListenerUtils;
-import org.jboss.soa.esb.util.ListenerUtils.ListenersManagerExecThread;
-
-/**
- * @author b_georges
- *
- */
-public class RemoteDirectoryPollerTest extends TestCase {
-
-	private Logger log = Logger.getLogger(this.getClass());
-
-	ListenersManagerExecThread listenersMgr;
-
-	File getDir, putDir;
-
-	/**
-	 * @throws java.lang.Exception
-	 */
-	public void setUp() throws Exception {
-		log.debug("====== setUp ==========");
-		// Create the directories required by the test...
-		getDir = FileUtils.createTestDir("getDir");
-		putDir = FileUtils.createTestDir("putdir");
-
-		// Start the listener...
-		listenersMgr = ListenerUtils.startListeners(ClassUtils
-				.toResourcePath(getClass().getPackage())
-				+ "/RemoteDirectoryPollerConfig1.xml");
-	}
-
-
-	public void test() throws InterruptedException {
-		log.debug("====== test ==========");
-		// put a file to the SFTP Server
-		// get the file from the SFTP Server
-		// the rest can be processed by the DirectoryPoller
-	}
-	
-	/**
-	 * Test method for {@link org.jboss.soa.esb.listeners.old.RemoteDirectoryPoller#close()}.
-	 */
-	public void testClose() {
-		log.debug("====== testClose ==========");
-		fail("Not yet implemented"); // TODO
-	}
-
-
-	/**
-	 * @throws java.lang.Exception
-	 */
-	public void tearDown() throws Exception {
-		log.debug("====== tearDown ==========");
-		FileUtils.assertCanDelete(getDir, 10000);
-		FileUtils.assertCanDelete(putDir, 10000);
-	}
-
-	
-}

Copied: labs/jbossesb/trunk/qa/junit/src/org/jboss/soa/esb/listeners/old/RemoteDirectoryPoller_brokentest.java (from rev 7142, labs/jbossesb/trunk/qa/junit/src/org/jboss/soa/esb/listeners/old/RemoteDirectoryPollerTest.java)
===================================================================
--- labs/jbossesb/trunk/qa/junit/src/org/jboss/soa/esb/listeners/old/RemoteDirectoryPollerTest.java	2006-10-26 14:16:11 UTC (rev 7142)
+++ labs/jbossesb/trunk/qa/junit/src/org/jboss/soa/esb/listeners/old/RemoteDirectoryPoller_brokentest.java	2006-10-26 14:55:42 UTC (rev 7145)
@@ -0,0 +1,70 @@
+/**
+ * 
+ */
+package org.jboss.soa.esb.listeners.old;
+
+import java.io.File;
+
+import junit.framework.TestCase;
+
+import org.apache.log4j.Logger;
+import org.jboss.soa.esb.util.ClassUtils;
+import org.jboss.soa.esb.util.FileUtils;
+import org.jboss.soa.esb.util.ListenerUtils;
+import org.jboss.soa.esb.util.ListenerUtils.ListenersManagerExecThread;
+
+/**
+ * @author b_georges
+ *
+ */
+public class RemoteDirectoryPoller_brokentest extends TestCase {
+
+	private Logger log = Logger.getLogger(this.getClass());
+
+	ListenersManagerExecThread listenersMgr;
+
+	File getDir, putDir;
+
+	/**
+	 * @throws java.lang.Exception
+	 */
+	public void setUp() throws Exception {
+		log.debug("====== setUp ==========");
+		// Create the directories required by the test...
+		getDir = FileUtils.createTestDir("getDir");
+		putDir = FileUtils.createTestDir("putdir");
+
+		// Start the listener...
+		listenersMgr = ListenerUtils.startListeners(ClassUtils
+				.toResourcePath(getClass().getPackage())
+				+ "/RemoteDirectoryPollerConfig1.xml");
+	}
+
+
+	public void test() throws InterruptedException {
+		log.debug("====== test ==========");
+		// put a file to the SFTP Server
+		// get the file from the SFTP Server
+		// the rest can be processed by the DirectoryPoller
+	}
+	
+	/**
+	 * Test method for {@link org.jboss.soa.esb.listeners.old.RemoteDirectoryPoller#close()}.
+	 */
+	public void testClose() {
+		log.debug("====== testClose ==========");
+		fail("Not yet implemented"); // TODO
+	}
+
+
+	/**
+	 * @throws java.lang.Exception
+	 */
+	public void tearDown() throws Exception {
+		log.debug("====== tearDown ==========");
+		FileUtils.assertCanDelete(getDir, 10000);
+		FileUtils.assertCanDelete(putDir, 10000);
+	}
+
+	
+}

Deleted: labs/jbossesb/trunk/qa/junit/src/org/jboss/soa/esb/messagestore/MessageStoreTest.java
===================================================================
--- labs/jbossesb/trunk/qa/junit/src/org/jboss/soa/esb/messagestore/MessageStoreTest.java	2006-10-26 14:30:50 UTC (rev 7144)
+++ labs/jbossesb/trunk/qa/junit/src/org/jboss/soa/esb/messagestore/MessageStoreTest.java	2006-10-26 14:55:42 UTC (rev 7145)
@@ -1,118 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2006, JBoss Inc., and others contributors as indicated 
- * by the @authors tag. All rights reserved. 
- * See the copyright.txt in the distribution for a
- * full listing of individual contributors. 
- * This copyrighted material is made available to anyone wishing to use,
- * modify, copy, or redistribute it subject to the terms and conditions
- * of the GNU Lesser General Public License, v. 2.1.
- * This program is distributed in the hope that it will be useful, but WITHOUT A 
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
- * PARTICULAR PURPOSE.  See the GNU Lesser General Public License for more details.
- * You should have received a copy of the GNU Lesser General Public License,
- * v.2.1 along with this distribution; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
- * MA  02110-1301, USA.
- * 
- * (C) 2005-2006,
- * @author daniel.brum at jboss.com
- */
-
-package org.jboss.soa.esb.messagestore;
-
-import java.net.URI;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Random;
-
-import org.apache.log4j.Logger;
-import org.jboss.soa.esb.common.Configuration;
-import org.jboss.soa.esb.message.Message;
-import org.jboss.soa.esb.message.format.MessageFactory;
-import org.jboss.soa.esb.message.format.MessageType;
-import org.jboss.soa.esb.persistence.MessageStore;
-import org.jboss.soa.esb.persistence.MessageStoreFactory;
-import org.jboss.soa.esb.persistence.format.MessageStoreType;
-
-import junit.framework.TestCase;
-
-/**
- * @author dbrum
- *
- */
-public class MessageStoreTest extends TestCase {
-	private static Logger logger = Logger.getLogger(MessageStoreTest.class);
-	
-	public void test() throws Exception {
-		int requestors = 1000;	//number of persist calls to make
-		List<URI> uriList = new ArrayList<URI>();
-		
-		TestUtil.setESBPropertiesFileToUse();
-		MessageStoreTest.runBeforeAllTests();
-		
-		//get the database store
-		MessageStore store = MessageStoreFactory.getInstance().getMessageStore(MessageStoreType.DATABASE);
-		
-		//messages to persist
-		Message msg[] = { MessageFactory.getInstance().getMessage(MessageType.JBOSS_XML), 
-						 MessageFactory.getInstance().getMessage(MessageType.JAVA_SERIALIZED)};		
-		
-		//set some content inside the Messages
-		for (int x=0; x<msg.length; x++) {
-			msg[x].getBody().setContents("TEST BODY".getBytes());
-			msg[x].getProperties().setProperty("prop"+x, "val"+x);
-			msg[x].getAttachment().addItem(new String("TEST ATTACHMENT"));						
-		}
-		
-		//loop through adding the messages
-		
-		Random rndMsg = new Random();
-		for (int x=0; x<=requestors; x++) {
-			URI uid = store.addMessage(msg[rndMsg.nextInt(2)]);			
-			uriList.add(uid);			
-		}
-		
-		logger.info("total messages persisted to db: " + (uriList.size()-1));
-		
-		//loop back reading the messages from the db
-		List<Message> messages = new ArrayList<Message>();
-		for (int x=0; x<uriList.size(); x++) {
-			messages.add(store.getMessage(uriList.get(x)));
-		}
-		logger.info("total messages read from db: " + (messages.size()-1));
-		
-		MessageStoreTest.runAfterAllTests();
-		
-	}
-	
-	protected static void runBeforeAllTests() throws Exception{
-		
-		TestUtil.setESBPropertiesFileToUse();				
-					
-		if (Configuration.getStoreDriver().equals("org.hsqldb.jdbcDriver")) {
-			HsqldbUtil.startHsqldb("home/dbrum/dev/jbossesb/trunk/product/install/message-store/sql/hsqldb/create_database.sql", "jbossesb");
-		}
-		
-	}
-	
-	private static void runAfterAllTests() throws Exception{
-		
-		if (Configuration.getStoreDriver().equals("org.hsqldb.jdbcDriver")) {
-			HsqldbUtil.stopHsqldb(Configuration.getStoreUrl(),
-					Configuration.getStoreUser(),Configuration.getStorePwd() );
-		}
-	}
-	
-	public static void main(String args[]) {
-		MessageStoreTest test = new MessageStoreTest();
-		try {
-			test.test();
-		} catch (Exception e) {
-			// TODO Auto-generated catch block
-			e.printStackTrace();
-		}
-	}
-	
-	
-}

Copied: labs/jbossesb/trunk/qa/junit/src/org/jboss/soa/esb/messagestore/MessageStore_brokentest.java (from rev 7142, labs/jbossesb/trunk/qa/junit/src/org/jboss/soa/esb/messagestore/MessageStoreTest.java)
===================================================================
--- labs/jbossesb/trunk/qa/junit/src/org/jboss/soa/esb/messagestore/MessageStoreTest.java	2006-10-26 14:16:11 UTC (rev 7142)
+++ labs/jbossesb/trunk/qa/junit/src/org/jboss/soa/esb/messagestore/MessageStore_brokentest.java	2006-10-26 14:55:42 UTC (rev 7145)
@@ -0,0 +1,118 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, JBoss Inc., and others contributors as indicated 
+ * by the @authors tag. All rights reserved. 
+ * See the copyright.txt in the distribution for a
+ * full listing of individual contributors. 
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU Lesser General Public License, v. 2.1.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A 
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
+ * PARTICULAR PURPOSE.  See the GNU Lesser General Public License for more details.
+ * You should have received a copy of the GNU Lesser General Public License,
+ * v.2.1 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
+ * MA  02110-1301, USA.
+ * 
+ * (C) 2005-2006,
+ * @author daniel.brum at jboss.com
+ */
+
+package org.jboss.soa.esb.messagestore;
+
+import java.net.URI;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Random;
+
+import org.apache.log4j.Logger;
+import org.jboss.soa.esb.common.Configuration;
+import org.jboss.soa.esb.message.Message;
+import org.jboss.soa.esb.message.format.MessageFactory;
+import org.jboss.soa.esb.message.format.MessageType;
+import org.jboss.soa.esb.persistence.MessageStore;
+import org.jboss.soa.esb.persistence.MessageStoreFactory;
+import org.jboss.soa.esb.persistence.format.MessageStoreType;
+
+import junit.framework.TestCase;
+
+/**
+ * @author dbrum
+ *
+ */
+public class MessageStore_brokentest extends TestCase {
+	private static Logger logger = Logger.getLogger(MessageStore_brokentest.class);
+	
+	public void test() throws Exception {
+		int requestors = 1000;	//number of persist calls to make
+		List<URI> uriList = new ArrayList<URI>();
+		
+		TestUtil.setESBPropertiesFileToUse();
+		MessageStore_brokentest.runBeforeAllTests();
+		
+		//get the database store
+		MessageStore store = MessageStoreFactory.getInstance().getMessageStore(MessageStoreType.DATABASE);
+		
+		//messages to persist
+		Message msg[] = { MessageFactory.getInstance().getMessage(MessageType.JBOSS_XML), 
+						 MessageFactory.getInstance().getMessage(MessageType.JAVA_SERIALIZED)};		
+		
+		//set some content inside the Messages
+		for (int x=0; x<msg.length; x++) {
+			msg[x].getBody().setContents("TEST BODY".getBytes());
+			msg[x].getProperties().setProperty("prop"+x, "val"+x);
+			msg[x].getAttachment().addItem(new String("TEST ATTACHMENT"));						
+		}
+		
+		//loop through adding the messages
+		
+		Random rndMsg = new Random();
+		for (int x=0; x<=requestors; x++) {
+			URI uid = store.addMessage(msg[rndMsg.nextInt(2)]);			
+			uriList.add(uid);			
+		}
+		
+		logger.info("total messages persisted to db: " + (uriList.size()-1));
+		
+		//loop back reading the messages from the db
+		List<Message> messages = new ArrayList<Message>();
+		for (int x=0; x<uriList.size(); x++) {
+			messages.add(store.getMessage(uriList.get(x)));
+		}
+		logger.info("total messages read from db: " + (messages.size()-1));
+		
+		MessageStore_brokentest.runAfterAllTests();
+		
+	}
+	
+	protected static void runBeforeAllTests() throws Exception{
+		
+		TestUtil.setESBPropertiesFileToUse();				
+					
+		if (Configuration.getStoreDriver().equals("org.hsqldb.jdbcDriver")) {
+			HsqldbUtil.startHsqldb("home/dbrum/dev/jbossesb/trunk/product/install/message-store/sql/hsqldb/create_database.sql", "jbossesb");
+		}
+		
+	}
+	
+	private static void runAfterAllTests() throws Exception{
+		
+		if (Configuration.getStoreDriver().equals("org.hsqldb.jdbcDriver")) {
+			HsqldbUtil.stopHsqldb(Configuration.getStoreUrl(),
+					Configuration.getStoreUser(),Configuration.getStorePwd() );
+		}
+	}
+	
+	public static void main(String args[]) {
+		MessageStore_brokentest test = new MessageStore_brokentest();
+		try {
+			test.test();
+		} catch (Exception e) {
+			// TODO Auto-generated catch block
+			e.printStackTrace();
+		}
+	}
+	
+	
+}

Deleted: labs/jbossesb/trunk/qa/junit/src/org/jboss/soa/esb/objpersist/ObjStoreTest.java
===================================================================
--- labs/jbossesb/trunk/qa/junit/src/org/jboss/soa/esb/objpersist/ObjStoreTest.java	2006-10-26 14:30:50 UTC (rev 7144)
+++ labs/jbossesb/trunk/qa/junit/src/org/jboss/soa/esb/objpersist/ObjStoreTest.java	2006-10-26 14:55:42 UTC (rev 7145)
@@ -1,45 +0,0 @@
-package org.jboss.soa.esb.objpersist;
-
-import junit.framework.TestCase;
-
-import org.jboss.soa.esb.common.Configuration;
-import org.jboss.soa.esb.common.bizclasses.Person;
-import org.jboss.soa.esb.services.PersistHandlerFactory;
-import org.jboss.soa.esb.services.PersistManager;
-
-// DON'T FORGET !!
-// The Rosetta Application server has to be up and running 
-//  (set JNDI_SERVER appropriately)
-
-public class ObjStoreTest extends TestCase {
-	
-	private PersistManager m_oH;
-	
-	protected void setUp() throws Exception {
-		// get a handle to your business delegate
-		m_oH = PersistHandlerFactory.getPersistHandler("remote",
-				Configuration.getJndiServerType(), Configuration
-						.getJndiServerURL());
-	}
-
-	public void test() throws Exception {
-		// set up a Person (see TestPersonAddrPhone.class)
-		Person oPrs = TestPersonAddrPhone.getPerson();
-		long lUid = m_oH.addObject(oPrs);
-
-		oPrs.setUid(lUid);
-		oPrs.setSnap(lUid);
-
-		// retrieve it from the Object Store
-		Person oP2 = (Person) m_oH.getObject(Person.class, lUid);
-
-		// Zero the timestams because the original object won't have one
-		oPrs.setStamp(0);
-		oP2.setStamp(0);
-		
-		assertEquals(oPrs.toDTO().toXml(), oP2.toDTO().toXml());
-	}
-
-	protected void tearDown() throws Exception {
-	}
-}

Copied: labs/jbossesb/trunk/qa/junit/src/org/jboss/soa/esb/objpersist/ObjStore_brokentest.java (from rev 7142, labs/jbossesb/trunk/qa/junit/src/org/jboss/soa/esb/objpersist/ObjStoreTest.java)
===================================================================
--- labs/jbossesb/trunk/qa/junit/src/org/jboss/soa/esb/objpersist/ObjStoreTest.java	2006-10-26 14:16:11 UTC (rev 7142)
+++ labs/jbossesb/trunk/qa/junit/src/org/jboss/soa/esb/objpersist/ObjStore_brokentest.java	2006-10-26 14:55:42 UTC (rev 7145)
@@ -0,0 +1,45 @@
+package org.jboss.soa.esb.objpersist;
+
+import junit.framework.TestCase;
+
+import org.jboss.soa.esb.common.Configuration;
+import org.jboss.soa.esb.common.bizclasses.Person;
+import org.jboss.soa.esb.services.PersistHandlerFactory;
+import org.jboss.soa.esb.services.PersistManager;
+
+// DON'T FORGET !!
+// The Rosetta Application server has to be up and running 
+//  (set JNDI_SERVER appropriately)
+
+public class ObjStore_brokentest extends TestCase {
+	
+	private PersistManager m_oH;
+	
+	protected void setUp() throws Exception {
+		// get a handle to your business delegate
+		m_oH = PersistHandlerFactory.getPersistHandler("remote",
+				Configuration.getJndiServerType(), Configuration
+						.getJndiServerURL());
+	}
+
+	public void test() throws Exception {
+		// set up a Person (see TestPersonAddrPhone.class)
+		Person oPrs = TestPersonAddrPhone.getPerson();
+		long lUid = m_oH.addObject(oPrs);
+
+		oPrs.setUid(lUid);
+		oPrs.setSnap(lUid);
+
+		// retrieve it from the Object Store
+		Person oP2 = (Person) m_oH.getObject(Person.class, lUid);
+
+		// Zero the timestams because the original object won't have one
+		oPrs.setStamp(0);
+		oP2.setStamp(0);
+		
+		assertEquals(oPrs.toDTO().toXml(), oP2.toDTO().toXml());
+	}
+
+	protected void tearDown() throws Exception {
+	}
+}




More information about the jboss-svn-commits mailing list