[jboss-cvs] JBossAS SVN: r61265 - in trunk/testsuite/src/main/org/jboss/test/jbossmq: test and 1 other directory.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Sun Mar 11 03:45:36 EDT 2007
Author: scott.stark at jboss.org
Date: 2007-03-11 03:45:36 -0400 (Sun, 11 Mar 2007)
New Revision: 61265
Removed:
trunk/testsuite/src/main/org/jboss/test/jbossmq/test/UIL2ConnectionUnitTestCase.java
trunk/testsuite/src/main/org/jboss/test/jbossmq/test/UIL2JBossMQUnitTestCase.java
Modified:
trunk/testsuite/src/main/org/jboss/test/jbossmq/MQBase.java
trunk/testsuite/src/main/org/jboss/test/jbossmq/test/HTTPConnectionUnitTestCase.java
trunk/testsuite/src/main/org/jboss/test/jbossmq/test/HTTPJBossMQUnitTestCase.java
trunk/testsuite/src/main/org/jboss/test/jbossmq/test/JBossSessionRecoverUnitTestCase.java
trunk/testsuite/src/main/org/jboss/test/jbossmq/test/LargeMessageUnitTestCase.java
trunk/testsuite/src/main/org/jboss/test/jbossmq/test/MessageBodyUnitTestCase.java
trunk/testsuite/src/main/org/jboss/test/jbossmq/test/MessageTypesUnitTestCase.java
trunk/testsuite/src/main/org/jboss/test/jbossmq/test/ScheduledDeliveryUnitTestCase.java
trunk/testsuite/src/main/org/jboss/test/jbossmq/test/UnackedUnitTestCase.java
Log:
Drop obsolete mq specific tests and add missing super.setUp calls
Modified: trunk/testsuite/src/main/org/jboss/test/jbossmq/MQBase.java
===================================================================
--- trunk/testsuite/src/main/org/jboss/test/jbossmq/MQBase.java 2007-03-11 07:40:21 UTC (rev 61264)
+++ trunk/testsuite/src/main/org/jboss/test/jbossmq/MQBase.java 2007-03-11 07:45:36 UTC (rev 61265)
@@ -142,6 +142,7 @@
*/
protected void setUp() throws Exception
{
+ super.setUp();
// Reconfigure acording to props
QUEUE_FACTORY = System.getProperty("jbosstest.queuefactory", QUEUE_FACTORY);
TOPIC_FACTORY = System.getProperty("jbosstest.topicfactory", TOPIC_FACTORY);
Modified: trunk/testsuite/src/main/org/jboss/test/jbossmq/test/HTTPConnectionUnitTestCase.java
===================================================================
--- trunk/testsuite/src/main/org/jboss/test/jbossmq/test/HTTPConnectionUnitTestCase.java 2007-03-11 07:40:21 UTC (rev 61264)
+++ trunk/testsuite/src/main/org/jboss/test/jbossmq/test/HTTPConnectionUnitTestCase.java 2007-03-11 07:45:36 UTC (rev 61265)
@@ -52,10 +52,6 @@
super(name);
}
- protected void setUp() throws Exception
- {
- }
-
public void testMultipleHTTPConnectViaJNDI() throws Exception
{
Modified: trunk/testsuite/src/main/org/jboss/test/jbossmq/test/HTTPJBossMQUnitTestCase.java
===================================================================
--- trunk/testsuite/src/main/org/jboss/test/jbossmq/test/HTTPJBossMQUnitTestCase.java 2007-03-11 07:40:21 UTC (rev 61264)
+++ trunk/testsuite/src/main/org/jboss/test/jbossmq/test/HTTPJBossMQUnitTestCase.java 2007-03-11 07:45:36 UTC (rev 61265)
@@ -46,6 +46,8 @@
{
protected void setUp() throws Exception
{
+ super.setUp();
+
this.getLog().info("HTTPJBossMQUnitTestCase started");
JBossMQUnitTest.TOPIC_FACTORY = "HTTPConnectionFactory";
JBossMQUnitTest.QUEUE_FACTORY = "HTTPConnectionFactory";
@@ -54,6 +56,8 @@
}
protected void tearDown() throws Exception
{
+ super.tearDown();
+
ClassLoader loader = Thread.currentThread().getContextClassLoader();
undeploy (loader.getResource("messaging/test-destinations-service.xml").toString());
this.getLog().info("HTTPJBossMQUnitTestCase done");
Modified: trunk/testsuite/src/main/org/jboss/test/jbossmq/test/JBossSessionRecoverUnitTestCase.java
===================================================================
--- trunk/testsuite/src/main/org/jboss/test/jbossmq/test/JBossSessionRecoverUnitTestCase.java 2007-03-11 07:40:21 UTC (rev 61264)
+++ trunk/testsuite/src/main/org/jboss/test/jbossmq/test/JBossSessionRecoverUnitTestCase.java 2007-03-11 07:45:36 UTC (rev 61265)
@@ -98,6 +98,7 @@
throws Exception
{
+ super.setUp();
this.getLog().debug("JBossSessionRecoverUnitTestCase, ConnectionFactory started");
@@ -108,6 +109,7 @@
protected void tearDown() throws Exception
{
+ super.tearDown();
this.getLog().debug("JBossSessionRecoverUnitTestCase, ConnectionFactory done");
Modified: trunk/testsuite/src/main/org/jboss/test/jbossmq/test/LargeMessageUnitTestCase.java
===================================================================
--- trunk/testsuite/src/main/org/jboss/test/jbossmq/test/LargeMessageUnitTestCase.java 2007-03-11 07:40:21 UTC (rev 61264)
+++ trunk/testsuite/src/main/org/jboss/test/jbossmq/test/LargeMessageUnitTestCase.java 2007-03-11 07:45:36 UTC (rev 61265)
@@ -54,9 +54,6 @@
super(name);
}
- protected void setUp() throws Exception
- {
- }
public void testUIL2LargeMessage() throws Exception
{
Modified: trunk/testsuite/src/main/org/jboss/test/jbossmq/test/MessageBodyUnitTestCase.java
===================================================================
--- trunk/testsuite/src/main/org/jboss/test/jbossmq/test/MessageBodyUnitTestCase.java 2007-03-11 07:40:21 UTC (rev 61264)
+++ trunk/testsuite/src/main/org/jboss/test/jbossmq/test/MessageBodyUnitTestCase.java 2007-03-11 07:45:36 UTC (rev 61265)
@@ -71,12 +71,14 @@
protected void setUp() throws Exception
{
+ super.setUp();
connect();
}
protected void tearDown() throws Exception
{
disconnect();
+ super.tearDown();
}
protected void connect() throws Exception
Modified: trunk/testsuite/src/main/org/jboss/test/jbossmq/test/MessageTypesUnitTestCase.java
===================================================================
--- trunk/testsuite/src/main/org/jboss/test/jbossmq/test/MessageTypesUnitTestCase.java 2007-03-11 07:40:21 UTC (rev 61264)
+++ trunk/testsuite/src/main/org/jboss/test/jbossmq/test/MessageTypesUnitTestCase.java 2007-03-11 07:45:36 UTC (rev 61265)
@@ -230,6 +230,7 @@
protected void setUp() throws Exception
{
+ super.setUp();
context = new InitialContext();
QueueConnectionFactory queueFactory = (QueueConnectionFactory) context.lookup(QUEUE_FACTORY);
queueConnection = queueFactory.createQueueConnection();
@@ -248,6 +249,7 @@
receiver.close();
session.close();
queueConnection.close();
+ super.tearDown();
}
private Message sendRecMsg(Message in) throws Exception
Modified: trunk/testsuite/src/main/org/jboss/test/jbossmq/test/ScheduledDeliveryUnitTestCase.java
===================================================================
--- trunk/testsuite/src/main/org/jboss/test/jbossmq/test/ScheduledDeliveryUnitTestCase.java 2007-03-11 07:40:21 UTC (rev 61264)
+++ trunk/testsuite/src/main/org/jboss/test/jbossmq/test/ScheduledDeliveryUnitTestCase.java 2007-03-11 07:45:36 UTC (rev 61265)
@@ -154,6 +154,7 @@
protected void setUp() throws Exception
{
+ super.setUp();
ScheduledDeliveryUnitTestCase.TOPIC_FACTORY = "ConnectionFactory";
ScheduledDeliveryUnitTestCase.QUEUE_FACTORY = "ConnectionFactory";
}
Deleted: trunk/testsuite/src/main/org/jboss/test/jbossmq/test/UIL2ConnectionUnitTestCase.java
===================================================================
--- trunk/testsuite/src/main/org/jboss/test/jbossmq/test/UIL2ConnectionUnitTestCase.java 2007-03-11 07:40:21 UTC (rev 61264)
+++ trunk/testsuite/src/main/org/jboss/test/jbossmq/test/UIL2ConnectionUnitTestCase.java 2007-03-11 07:45:36 UTC (rev 61265)
@@ -1,147 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY 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 along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.test.jbossmq.test;
-
-import java.util.Properties;
-
-import javax.jms.QueueConnection;
-import javax.jms.QueueConnectionFactory;
-import javax.jms.XAQueueConnection;
-import javax.jms.XAQueueConnectionFactory;
-import javax.naming.InitialContext;
-
-import junit.framework.Test;
-import junit.textui.TestRunner;
-
-import org.jboss.mq.SpyConnectionFactory;
-import org.jboss.mq.SpyXAConnectionFactory;
-import org.jboss.mq.il.uil2.UILServerILFactory;
-import org.jboss.test.JBossTestCase;
-
-/**
- * Test all the verious ways that a connection can be
- * established with JBossMQ
- *
- * @author hiram.chirino at jboss.org
- * @version $Revision$
- */
-public class UIL2ConnectionUnitTestCase extends JBossTestCase
-{
-
- public UIL2ConnectionUnitTestCase(String name)
- {
- super(name);
- }
-
- protected void setUp() throws Exception
- {
- }
-
- public void testMultipleUIL2ConnectViaJNDI() throws Exception
- {
-
- getLog().debug("Starting testMultipleUIL2ConnectViaJNDI");
-
- InitialContext ctx = new InitialContext();
-
- QueueConnectionFactory cf = (QueueConnectionFactory) ctx.lookup("UIL2ConnectionFactory");
-
- QueueConnection connections[] = new QueueConnection[10];
-
- getLog().debug("Creating " + connections.length + " connections.");
- for (int i = 0; i < connections.length; i++)
- {
- connections[i] = cf.createQueueConnection();
- }
-
- getLog().debug("Closing the connections.");
- for (int i = 0; i < connections.length; i++)
- {
- connections[i].close();
- }
-
- getLog().debug("Finished testMultipleUIL2ConnectViaJNDI");
- }
-
- public void testUIL2ConnectViaJNDI() throws Exception
- {
- InitialContext ctx = new InitialContext();
-
- QueueConnectionFactory cf = (QueueConnectionFactory) ctx.lookup("UIL2ConnectionFactory");
- QueueConnection c = cf.createQueueConnection();
- c.close();
-
- XAQueueConnectionFactory xacf = (XAQueueConnectionFactory) ctx.lookup("UIL2XAConnectionFactory");
- XAQueueConnection xac = xacf.createXAQueueConnection();
- xac.close();
- }
-
- public void testUIL2ConnectNoJNDI() throws Exception
- {
-
- Properties props = new Properties();
- props.setProperty(org.jboss.mq.il.uil2.UILServerILFactory.SERVER_IL_FACTORY_KEY,
- org.jboss.mq.il.uil2.UILServerILFactory.SERVER_IL_FACTORY);
- props.setProperty(org.jboss.mq.il.uil2.UILServerILFactory.CLIENT_IL_SERVICE_KEY,
- org.jboss.mq.il.uil2.UILServerILFactory.CLIENT_IL_SERVICE);
- props.setProperty(org.jboss.mq.il.uil2.UILServerILFactory.PING_PERIOD_KEY, "1000");
- props.setProperty(org.jboss.mq.il.uil2.UILServerILFactory.UIL_ADDRESS_KEY, getServerHost());
- props.setProperty(org.jboss.mq.il.uil2.UILServerILFactory.UIL_PORT_KEY, "8093");
- props.setProperty(org.jboss.mq.il.uil2.UILServerILFactory.UIL_RECEIVE_REPLIES_KEY, "no");
-
- QueueConnectionFactory cf = new SpyConnectionFactory(props);
- QueueConnection c = cf.createQueueConnection();
- c.close();
-
- XAQueueConnectionFactory xacf = new SpyXAConnectionFactory(props);
- XAQueueConnection xac = xacf.createXAQueueConnection();
- xac.close();
- }
- public void testOverriddenUIL2ConnectViaJNDI() throws Exception
- {
- InitialContext ctx = new InitialContext();
-
- SpyConnectionFactory cf = (SpyConnectionFactory) ctx.lookup("OverriddenUIL2ConnectionFactory");
- Properties props = cf.getProperties();
- String value = props.getProperty(UILServerILFactory.UIL_CONNECTADDRESS_KEY);
- assertEquals("Overridden Address", value);
- value = props.getProperty(UILServerILFactory.UIL_CONNECTPORT_KEY);
- assertEquals("-1000", value);
-
- cf = (SpyConnectionFactory) ctx.lookup("OverriddenUIL2XAConnectionFactory");
- props = cf.getProperties();
- value = props.getProperty(UILServerILFactory.UIL_CONNECTADDRESS_KEY);
- assertEquals("Overridden Address", value);
- value = props.getProperty(UILServerILFactory.UIL_CONNECTPORT_KEY);
- assertEquals("-1000", value);
- }
-
- public static Test suite() throws Exception
- {
- return getDeploySetup(UIL2ConnectionUnitTestCase.class, "overridden-uil2-service.xml");
- }
-
- public static void main(java.lang.String[] args)
- {
- TestRunner.run(UIL2ConnectionUnitTestCase.class);
- }
-}
Deleted: trunk/testsuite/src/main/org/jboss/test/jbossmq/test/UIL2JBossMQUnitTestCase.java
===================================================================
--- trunk/testsuite/src/main/org/jboss/test/jbossmq/test/UIL2JBossMQUnitTestCase.java 2007-03-11 07:40:21 UTC (rev 61264)
+++ trunk/testsuite/src/main/org/jboss/test/jbossmq/test/UIL2JBossMQUnitTestCase.java 2007-03-11 07:45:36 UTC (rev 61265)
@@ -1,69 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY 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 along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.test.jbossmq.test;
-
-import junit.framework.Test;
-import junit.framework.TestSuite;
-
-import org.jboss.test.JBossTestSetup;
-
-/**
- * JBossMQ tests over UIL2
- */
-public class UIL2JBossMQUnitTestCase extends JBossMQUnitTest
-{
- public UIL2JBossMQUnitTestCase(String name) throws Exception
- {
- super(name);
- }
-
- public static Test suite() throws Exception
- {
- TestSuite suite = new TestSuite();
-
- suite.addTest(new JBossTestSetup(JBossMQUnitTest.suite())
- {
- protected void setUp() throws Exception
- {
- this.getLog().info("UIL2JBossMQUnitTestCase started");
- ClassLoader loader = Thread.currentThread().getContextClassLoader();
- deploy (loader.getResource("messaging/test-destinations-service.xml").toString());
- JBossMQUnitTest.TOPIC_FACTORY = "UIL2ConnectionFactory";
- JBossMQUnitTest.QUEUE_FACTORY = "UIL2ConnectionFactory";
- }
- protected void tearDown() throws Exception
- {
- ClassLoader loader = Thread.currentThread().getContextClassLoader();
- undeploy (loader.getResource("messaging/test-destinations-service.xml").toString());
- this.getLog().info("UIL2JBossMQUnitTestCase done");
- }
- });
-
- return suite;
- }
-
- static public void main( String []args )
- {
- String newArgs[] = { "org.jboss.test.jbossmq.test.UIL2JBossMQUnitTestCase" };
- junit.swingui.TestRunner.main(newArgs);
- }
-}
Modified: trunk/testsuite/src/main/org/jboss/test/jbossmq/test/UnackedUnitTestCase.java
===================================================================
--- trunk/testsuite/src/main/org/jboss/test/jbossmq/test/UnackedUnitTestCase.java 2007-03-11 07:40:21 UTC (rev 61264)
+++ trunk/testsuite/src/main/org/jboss/test/jbossmq/test/UnackedUnitTestCase.java 2007-03-11 07:45:36 UTC (rev 61265)
@@ -531,6 +531,7 @@
*/
protected void setUp() throws Exception
{
+ super.setUp();
if (context == null)
{
context = getInitialContext();
More information about the jboss-cvs-commits
mailing list