[jboss-cvs] JBoss Messaging SVN: r6048 - in trunk/tests/jms-tests/src/org/jboss/test/messaging: jms and 2 other directories.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Mon Mar 9 10:45:38 EDT 2009
Author: jmesnil
Date: 2009-03-09 10:45:38 -0400 (Mon, 09 Mar 2009)
New Revision: 6048
Removed:
trunk/tests/jms-tests/src/org/jboss/test/messaging/MessagingTestCase.java
trunk/tests/jms-tests/src/org/jboss/test/messaging/tools/TestJMSProviderAdaptor.java
trunk/tests/jms-tests/src/org/jboss/test/messaging/tools/container/JBMPropertyKernelConfig.java
trunk/tests/jms-tests/src/org/jboss/test/messaging/tools/container/JNPInitialContextFactory.java
trunk/tests/jms-tests/src/org/jboss/test/messaging/tools/container/NamingDelegate.java
trunk/tests/jms-tests/src/org/jboss/test/messaging/tools/misc/
Modified:
trunk/tests/jms-tests/src/org/jboss/test/messaging/jms/SecurityTest.java
trunk/tests/jms-tests/src/org/jboss/test/messaging/tools/ServerManagement.java
trunk/tests/jms-tests/src/org/jboss/test/messaging/tools/container/LocalTestServer.java
trunk/tests/jms-tests/src/org/jboss/test/messaging/tools/container/Server.java
Log:
test suite cleanup
* removed unused legacy code
Deleted: trunk/tests/jms-tests/src/org/jboss/test/messaging/MessagingTestCase.java
===================================================================
--- trunk/tests/jms-tests/src/org/jboss/test/messaging/MessagingTestCase.java 2009-03-09 14:00:59 UTC (rev 6047)
+++ trunk/tests/jms-tests/src/org/jboss/test/messaging/MessagingTestCase.java 2009-03-09 14:45:38 UTC (rev 6048)
@@ -1,80 +0,0 @@
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2005-2008, Red Hat Middleware LLC, and individual contributors
-* 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.messaging;
-
-import org.jboss.messaging.core.logging.Logger;
-import org.jboss.test.messaging.util.ProxyAssertSupport;
-
-/**
- * The base case for messaging tests.
- *
- * @author <a href="mailto:adrian at jboss.org">Adrian Brock</a>
- * @author <a href="mailto:ovidiu at feodorov.com">Ovidiu Feodorov</a>
- * @author <a href="mailto:tim.fox at jboss.org">Tim Fox</a>
- * @author <a href="mailto:juha at jboss.org">Juha Lindfors</a>
- *
- * @version <tt>$Revision$</tt>
- * $Id$
- */
-public class MessagingTestCase extends ProxyAssertSupport
-{
- // Constants -----------------------------------------------------
-
- // Static --------------------------------------------------------
-
- // Attributes ----------------------------------------------------
-
- protected Logger log = Logger.getLogger(getClass());
-
- // Constructors --------------------------------------------------
-
- // Public --------------------------------------------------------
-
- // Package protected ---------------------------------------------
-
- // Protected -----------------------------------------------------
-
- protected void setUp() throws Exception
- {
- System.setProperty("java.naming.factory.initial", "org.jnp.interfaces.LocalOnlyContextFactory");
- //System.setProperty("java.naming.factory.url.pkgs", "org.jboss.naming:org.jnp.interfaces");
-
- String banner =
- "####################################################### Start " +
- " test: " + getName();
-
- log.info(banner);
- }
-
- protected void tearDown() throws Exception
- {
- String banner =
- "####################################################### Stop " +
- " test: " + getName();
-
- log.info(banner);
- }
-
- // Private -------------------------------------------------------
-
- // Inner classes -------------------------------------------------
-}
Modified: trunk/tests/jms-tests/src/org/jboss/test/messaging/jms/SecurityTest.java
===================================================================
--- trunk/tests/jms-tests/src/org/jboss/test/messaging/jms/SecurityTest.java 2009-03-09 14:00:59 UTC (rev 6047)
+++ trunk/tests/jms-tests/src/org/jboss/test/messaging/jms/SecurityTest.java 2009-03-09 14:45:38 UTC (rev 6048)
@@ -39,7 +39,6 @@
import org.jboss.messaging.core.logging.Logger;
import org.jboss.messaging.core.security.Role;
-import org.jboss.test.messaging.tools.ServerManagement;
/**
* Test JMS Security.
Modified: trunk/tests/jms-tests/src/org/jboss/test/messaging/tools/ServerManagement.java
===================================================================
--- trunk/tests/jms-tests/src/org/jboss/test/messaging/tools/ServerManagement.java 2009-03-09 14:00:59 UTC (rev 6047)
+++ trunk/tests/jms-tests/src/org/jboss/test/messaging/tools/ServerManagement.java 2009-03-09 14:45:38 UTC (rev 6048)
@@ -163,57 +163,6 @@
}
- /**
- * This method make sure that all servers that have been implicitely spawned when as a side
- * effect of create() and/or start() are killed. The method is important because a forked
- * ant junit task won't exit if processes created by it are still active. If you run tests
- * from ant, always call killSpawnedServers() in tearDown().
- * <p/>
- * The servers created directed invoking spawn() are not subject to destroySpawnedServers(); they
- * need to be explicitely killed.
- *
- * @return a List<Integer> containing the indexes of the destroyed servers.
- */
- public static synchronized List destroySpawnedServers() throws Exception
- {
- log.info("################# Destroying spawned servers****");
- List destroyed = new ArrayList();
-
- for (Server server : servers)
- {
- destroyed.add(new Integer(server.getServerID()));
-
- log.info("Killing spawned server " + server.getServerID());
-
- try
- {
- server.kill();
- }
- catch (Throwable t)
- {
- }
- }
-
- return destroyed;
- }
-
- public static void log(int level, String text)
- {
- log(level, text, 0);
- }
-
- public static void log(int level, String text, int index)
- {
- try
- {
- servers.get(0).log(level, text);
- }
- catch (Exception e)
- {
- log.error("failed to forward the logging request to the remote server", e);
- }
- }
-
public static void startServerPeer() throws Exception
{
startServerPeer(0);
Deleted: trunk/tests/jms-tests/src/org/jboss/test/messaging/tools/TestJMSProviderAdaptor.java
===================================================================
--- trunk/tests/jms-tests/src/org/jboss/test/messaging/tools/TestJMSProviderAdaptor.java 2009-03-09 14:00:59 UTC (rev 6047)
+++ trunk/tests/jms-tests/src/org/jboss/test/messaging/tools/TestJMSProviderAdaptor.java 2009-03-09 14:45:38 UTC (rev 6048)
@@ -1,117 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005-2008, Red Hat Middleware LLC, and individual contributors
- * 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.messaging.tools;
-
-import java.util.Properties;
-
-import javax.naming.Context;
-import javax.naming.InitialContext;
-import javax.naming.NamingException;
-
-//import org.jboss.jms.jndi.JMSProviderAdapter;
-
-/**
- * A TestJMSProviderAdaptor
- *
- * @author <a href="mailto:tim.fox at jboss.com">Tim Fox</a>
- * @version <tt>$Revision: 1.1 $</tt>
- *
- * $Id$
- *
- */
-public class TestJMSProviderAdaptor //implements JMSProviderAdapter
-{
- private static final long serialVersionUID = 8064613007110300720L;
-
- private Properties props;
-
- private String cfLookup;
-
- private String name;
-
- public TestJMSProviderAdaptor(Properties props, String cfLookup, String name)
- {
- this.props = props;
-
- this.cfLookup = cfLookup;
-
- this.name = name;
- }
-
- public String getFactoryRef()
- {
- return cfLookup;
- }
-
- public Context getInitialContext() throws NamingException
- {
- return new InitialContext(props);
- }
-
- public String getName()
- {
- return name;
- }
-
- public Properties getProperties()
- {
- return props;
- }
-
- public String getQueueFactoryRef()
- {
- return cfLookup;
- }
-
- public String getTopicFactoryRef()
- {
- return cfLookup;
- }
-
- public void setFactoryRef(String lookup)
- {
- this.cfLookup = lookup;
- }
-
- public void setName(String name)
- {
- this.name = name;
- }
-
- public void setProperties(Properties props)
- {
- this.props = props;
- }
-
- public void setQueueFactoryRef(String lookup)
- {
- this.cfLookup = lookup;
- }
-
- public void setTopicFactoryRef(String lookup)
- {
- this.cfLookup = lookup;
- }
-
-
-}
-
Deleted: trunk/tests/jms-tests/src/org/jboss/test/messaging/tools/container/JBMPropertyKernelConfig.java
===================================================================
--- trunk/tests/jms-tests/src/org/jboss/test/messaging/tools/container/JBMPropertyKernelConfig.java 2009-03-09 14:00:59 UTC (rev 6047)
+++ trunk/tests/jms-tests/src/org/jboss/test/messaging/tools/container/JBMPropertyKernelConfig.java 2009-03-09 14:45:38 UTC (rev 6048)
@@ -1,39 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005-2008, Red Hat Middleware LLC, and individual contributors
- * 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.messaging.tools.container;
-
-import java.util.Properties;
-
-import org.jboss.kernel.plugins.config.property.PropertyKernelConfig;
-
-/**
- * used for setting the server id and used by the configuration helper
- * @author <a href="ataylor at redhat.com">Andy Taylor</a>
- */
-public class JBMPropertyKernelConfig extends PropertyKernelConfig
-{
- public JBMPropertyKernelConfig(Properties properties)
- {
- super(properties); //To change body of overridden methods use File | Settings | File Templates.
- }
-
-}
Deleted: trunk/tests/jms-tests/src/org/jboss/test/messaging/tools/container/JNPInitialContextFactory.java
===================================================================
--- trunk/tests/jms-tests/src/org/jboss/test/messaging/tools/container/JNPInitialContextFactory.java 2009-03-09 14:00:59 UTC (rev 6047)
+++ trunk/tests/jms-tests/src/org/jboss/test/messaging/tools/container/JNPInitialContextFactory.java 2009-03-09 14:45:38 UTC (rev 6048)
@@ -1,75 +0,0 @@
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2005-2008, Red Hat Middleware LLC, and individual contributors
-* 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.messaging.tools.container;
-
-import java.util.Hashtable;
-
-import javax.naming.Context;
-import javax.naming.InitialContext;
-import javax.naming.NamingException;
-import javax.naming.spi.InitialContextFactory;
-
-/**
- * An InitialContextFactory providing InitialContext to JNDI on a remote JBoss instance.
-
- * @author <a href="mailto:tim.fox at jboss.com">Tim Fox</a>
- * @version <tt>$Revision: 2685 $</tt>
- *
- * $Id: JNPInitialContextFactory.java 2685 2007-05-15 07:56:12Z timfox $
- */
-public class JNPInitialContextFactory implements InitialContextFactory
-{
- // Constants -----------------------------------------------------
-
- // Static --------------------------------------------------------
-
- /**
- * @return the JNDI environment to use to get this InitialContextFactory.
- */
- public static Hashtable getJNDIEnvironment()
- {
- Hashtable env = new Hashtable();
- env.put("java.naming.factory.initial", "org.jnp.interfaces.NamingContextFactory");
- env.put("java.naming.provider.url", "jnp://localhost:1099");
- env.put("java.naming.factory.url.pkg", "org.jboss.naming:org.jnp.interfaces");
- return env;
- }
-
- // Attributes ----------------------------------------------------
-
- // Constructors --------------------------------------------------
-
- // Public --------------------------------------------------------
-
- public Context getInitialContext(Hashtable environment) throws NamingException
- {
- return new InitialContext(environment);
- }
-
- // Package protected ---------------------------------------------
-
- // Protected -----------------------------------------------------
-
- // Private -------------------------------------------------------
-
- // Inner classes -------------------------------------------------
-}
Modified: trunk/tests/jms-tests/src/org/jboss/test/messaging/tools/container/LocalTestServer.java
===================================================================
--- trunk/tests/jms-tests/src/org/jboss/test/messaging/tools/container/LocalTestServer.java 2009-03-09 14:00:59 UTC (rev 6047)
+++ trunk/tests/jms-tests/src/org/jboss/test/messaging/tools/container/LocalTestServer.java 2009-03-09 14:45:38 UTC (rev 6048)
@@ -40,6 +40,7 @@
import javax.management.ObjectName;
import javax.naming.InitialContext;
+import org.jboss.kernel.plugins.config.property.PropertyKernelConfig;
import org.jboss.messaging.core.client.impl.ClientSessionFactoryImpl;
import org.jboss.messaging.core.config.TransportConfiguration;
import org.jboss.messaging.core.logging.Logger;
@@ -58,8 +59,6 @@
import org.jboss.messaging.jms.server.management.TopicControlMBean;
import org.jboss.messaging.utils.Pair;
import org.jboss.messaging.utils.SimpleString;
-import org.jboss.test.messaging.tools.ConfigurationHelper;
-import org.jboss.test.messaging.tools.ServerManagement;
/**
* @author <a href="mailto:ovidiu at feodorov.com">Ovidiu Feodorov</a>
@@ -98,15 +97,10 @@
// Constructors ---------------------------------------------------------------------------------
- public LocalTestServer()
+ public LocalTestServer(int serverIndex)
{
super();
- }
- public LocalTestServer(int serverIndex)
- {
- this();
-
this.serverIndex = serverIndex;
}
@@ -117,16 +111,16 @@
return serverIndex;
}
- public synchronized void start(String[] containerConfig, HashMap<String, Object> configuration, boolean clearDatabase) throws Exception
+ public synchronized void start(String[] containerConfig, HashMap<String, Object> configuration, boolean clearJournal) throws Exception
{
if (isStarted())
{
return;
}
- log.info("** deleting database?" + clearDatabase);
+ log.info("** deleting journal?" + clearJournal);
- if (clearDatabase)
+ if (clearJournal)
{
// Delete the Journal environment
@@ -137,9 +131,7 @@
log.info("Deleted dir: " + dir.getAbsolutePath() + " deleted: " + deleted);
}
- ConfigurationHelper.addServerConfig(getServerID(), configuration);
-
- JBMPropertyKernelConfig propertyKernelConfig = new JBMPropertyKernelConfig(System.getProperties());
+ PropertyKernelConfig propertyKernelConfig = new PropertyKernelConfig(System.getProperties());
// propertyKernelConfig.setServerID(getServerID());
bootstrap = new JBMBootstrapServer(containerConfig, propertyKernelConfig);
System.setProperty(Constants.SERVER_INDEX_PROPERTY_NAME, "" + getServerID());
@@ -187,39 +179,6 @@
stop();
}
- public void log(int level, String text)
- {
- if (ServerManagement.FATAL == level)
- {
- log.fatal(text);
- }
- else if (ServerManagement.ERROR == level)
- {
- log.error(text);
- }
- else if (ServerManagement.WARN == level)
- {
- log.warn(text);
- }
- else if (ServerManagement.INFO == level)
- {
- log.info(text);
- }
- else if (ServerManagement.DEBUG == level)
- {
- log.debug(text);
- }
- else if (ServerManagement.TRACE == level)
- {
- log.trace(text);
- }
- else
- {
- // log everything else as INFO
- log.info(text);
- }
- }
-
public synchronized boolean isStarted() throws Exception
{
return started;
Deleted: trunk/tests/jms-tests/src/org/jboss/test/messaging/tools/container/NamingDelegate.java
===================================================================
--- trunk/tests/jms-tests/src/org/jboss/test/messaging/tools/container/NamingDelegate.java 2009-03-09 14:00:59 UTC (rev 6047)
+++ trunk/tests/jms-tests/src/org/jboss/test/messaging/tools/container/NamingDelegate.java 2009-03-09 14:45:38 UTC (rev 6048)
@@ -1,39 +0,0 @@
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2005-2008, Red Hat Middleware LLC, and individual contributors
-* 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.messaging.tools.container;
-
-import java.rmi.Remote;
-
-/**
- * The remote naming interface.
- *
- * @author <a href="mailto:ovidiu at feodorov.com">Ovidiu Feodorov</a>
- * @version <tt>$Revision: 2868 $</tt>
- *
- * $Id: NamingDelegate.java 2868 2007-07-10 20:22:16Z timfox $
- */
-public interface NamingDelegate extends Remote
-{
- Object lookup(String name) throws Exception;
-
- void bind(String name, Object obj) throws Exception;
-}
Modified: trunk/tests/jms-tests/src/org/jboss/test/messaging/tools/container/Server.java
===================================================================
--- trunk/tests/jms-tests/src/org/jboss/test/messaging/tools/container/Server.java 2009-03-09 14:00:59 UTC (rev 6047)
+++ trunk/tests/jms-tests/src/org/jboss/test/messaging/tools/container/Server.java 2009-03-09 14:45:38 UTC (rev 6048)
@@ -72,11 +72,6 @@
void ping() throws Exception;
/**
- * Only for remote use!
- */
- void log(int level, String text) throws Exception;
-
- /**
* @param serverPeerID - if null, the jboss-service.xml value will be used.
*/
void startServerPeer(int serverPeerID) throws Exception;
More information about the jboss-cvs-commits
mailing list