Author: clebert.suconic(a)jboss.com
Date: 2010-12-29 21:44:46 -0500 (Wed, 29 Dec 2010)
New Revision: 10089
Modified:
trunk/tests/src/org/hornetq/tests/concurrent/stomp/ConcurrentStompTest.java
trunk/tests/src/org/hornetq/tests/integration/String64KLimitTest.java
trunk/tests/src/org/hornetq/tests/integration/client/ConsumerCloseTest.java
trunk/tests/src/org/hornetq/tests/integration/client/CoreClientTest.java
trunk/tests/src/org/hornetq/tests/integration/client/DeadLetterAddressTest.java
trunk/tests/src/org/hornetq/tests/integration/client/ExpiryAddressTest.java
trunk/tests/src/org/hornetq/tests/integration/client/FailureDeadlockTest.java
trunk/tests/src/org/hornetq/tests/integration/client/HornetQCrashTest.java
trunk/tests/src/org/hornetq/tests/integration/client/MessageGroupingConnectionFactoryTest.java
trunk/tests/src/org/hornetq/tests/integration/client/MessageGroupingTest.java
trunk/tests/src/org/hornetq/tests/integration/client/MessagePriorityTest.java
trunk/tests/src/org/hornetq/tests/integration/client/NIOvsOIOTest.java
trunk/tests/src/org/hornetq/tests/integration/client/NewDeadLetterAddressTest.java
trunk/tests/src/org/hornetq/tests/integration/client/ProducerCloseTest.java
trunk/tests/src/org/hornetq/tests/integration/client/RequestorTest.java
trunk/tests/src/org/hornetq/tests/integration/client/SessionCloseTest.java
trunk/tests/src/org/hornetq/tests/integration/client/SessionClosedOnRemotingConnectionFailureTest.java
trunk/tests/src/org/hornetq/tests/integration/client/SessionFactoryTest.java
trunk/tests/src/org/hornetq/tests/integration/client/WildCardRoutingTest.java
trunk/tests/src/org/hornetq/tests/integration/cluster/bridge/BridgeTestBase.java
trunk/tests/src/org/hornetq/tests/integration/cluster/distribution/ClusterTestBase.java
trunk/tests/src/org/hornetq/tests/integration/cluster/failover/RemoteMultipleLivesMultipleBackupsFailoverTest.java
trunk/tests/src/org/hornetq/tests/integration/cluster/failover/RemoteSingleLiveMultipleBackupsFailoverTest.java
trunk/tests/src/org/hornetq/tests/integration/cluster/failover/remote/FailoverWithSharedStoreTest.java
trunk/tests/src/org/hornetq/tests/integration/cluster/reattach/MultiThreadRandomReattachTest.java
trunk/tests/src/org/hornetq/tests/integration/cluster/reattach/NettyMultiThreadRandomReattachTest.java
trunk/tests/src/org/hornetq/tests/integration/cluster/reattach/RandomReattachTest.java
trunk/tests/src/org/hornetq/tests/integration/http/CoreClientOverHttpTest.java
trunk/tests/src/org/hornetq/tests/integration/jms/FloodServerTest.java
trunk/tests/src/org/hornetq/tests/integration/jms/HornetQConnectionFactoryTest.java
trunk/tests/src/org/hornetq/tests/integration/jms/ManualReconnectionToSingleServerTest.java
trunk/tests/src/org/hornetq/tests/integration/jms/bridge/BridgeTestBase.java
trunk/tests/src/org/hornetq/tests/integration/jms/cluster/JMSFailoverTest.java
trunk/tests/src/org/hornetq/tests/integration/jms/cluster/JMSReconnectTest.java
trunk/tests/src/org/hornetq/tests/integration/jms/cluster/ReplicatedJMSFailoverTest.java
trunk/tests/src/org/hornetq/tests/integration/jms/connection/ExceptionListenerTest.java
trunk/tests/src/org/hornetq/tests/integration/jms/server/JMSServerDeployerTest.java
trunk/tests/src/org/hornetq/tests/integration/jms/server/management/JMSQueueControlTest.java
trunk/tests/src/org/hornetq/tests/integration/jms/server/management/JMSServerControl2Test.java
trunk/tests/src/org/hornetq/tests/integration/jms/server/management/JMSServerControlTest.java
trunk/tests/src/org/hornetq/tests/integration/jms/server/management/TopicControlTest.java
trunk/tests/src/org/hornetq/tests/integration/jms/server/management/TopicControlUsingJMSTest.java
trunk/tests/src/org/hornetq/tests/integration/logging/LogDelegateTest.java
trunk/tests/src/org/hornetq/tests/integration/management/AcceptorControlTest.java
trunk/tests/src/org/hornetq/tests/integration/management/AddressControlTest.java
trunk/tests/src/org/hornetq/tests/integration/management/AddressControlUsingCoreTest.java
trunk/tests/src/org/hornetq/tests/integration/management/BridgeControlTest.java
trunk/tests/src/org/hornetq/tests/integration/management/BridgeControlUsingCoreTest.java
trunk/tests/src/org/hornetq/tests/integration/management/BroadcastGroupControlTest.java
trunk/tests/src/org/hornetq/tests/integration/management/ClusterConnectionControl2Test.java
trunk/tests/src/org/hornetq/tests/integration/management/ClusterConnectionControlTest.java
trunk/tests/src/org/hornetq/tests/integration/management/DivertControlTest.java
trunk/tests/src/org/hornetq/tests/integration/management/JMXDomainTest.java
trunk/tests/src/org/hornetq/tests/integration/management/ManagementServiceImplTest.java
trunk/tests/src/org/hornetq/tests/integration/management/ManagementWithStompTest.java
trunk/tests/src/org/hornetq/tests/integration/management/NotificationTest.java
trunk/tests/src/org/hornetq/tests/integration/management/QueueControlTest.java
trunk/tests/src/org/hornetq/tests/integration/management/SecurityManagementWithConfiguredAdminUserTest.java
trunk/tests/src/org/hornetq/tests/integration/management/SecurityManagementWithDefaultConfigurationTest.java
trunk/tests/src/org/hornetq/tests/integration/management/SecurityManagementWithModifiedConfigurationTest.java
trunk/tests/src/org/hornetq/tests/integration/management/SecurityNotificationTest.java
trunk/tests/src/org/hornetq/tests/integration/remoting/BatchDelayTest.java
trunk/tests/src/org/hornetq/tests/integration/remoting/DirectDeliverTest.java
trunk/tests/src/org/hornetq/tests/integration/security/NettySecurityClientTest.java
trunk/tests/src/org/hornetq/tests/integration/server/ExpiryRunnerTest.java
trunk/tests/src/org/hornetq/tests/integration/server/LVQTest.java
trunk/tests/src/org/hornetq/tests/integration/ssl/CoreClientOverSSLTest.java
trunk/tests/src/org/hornetq/tests/integration/stomp/StompTestBase.java
trunk/tests/src/org/hornetq/tests/integration/stomp/StompWebSocketTest.java
trunk/tests/src/org/hornetq/tests/integration/xa/XaTimeoutTest.java
trunk/tests/src/org/hornetq/tests/stress/stomp/StompStressTest.java
trunk/tests/src/org/hornetq/tests/timing/jms/bridge/impl/JMSBridgeImplTest.java
trunk/tests/src/org/hornetq/tests/unit/jms/misc/ManifestTest.java
trunk/tests/src/org/hornetq/tests/util/ServiceTestBase.java
trunk/tests/src/org/hornetq/tests/util/UnitTestCase.java
Log:
Encapsulating new ConfigurationImpl on the testsuite
Modified: trunk/tests/src/org/hornetq/tests/concurrent/stomp/ConcurrentStompTest.java
===================================================================
--- trunk/tests/src/org/hornetq/tests/concurrent/stomp/ConcurrentStompTest.java 2010-12-29
20:51:10 UTC (rev 10088)
+++ trunk/tests/src/org/hornetq/tests/concurrent/stomp/ConcurrentStompTest.java 2010-12-30
02:44:46 UTC (rev 10089)
@@ -133,7 +133,7 @@
private HornetQServer createServer() throws Exception
{
- Configuration config = new ConfigurationImpl();
+ Configuration config = createBasicConfig();
config.setSecurityEnabled(false);
config.setPersistenceEnabled(false);
Modified: trunk/tests/src/org/hornetq/tests/integration/String64KLimitTest.java
===================================================================
--- trunk/tests/src/org/hornetq/tests/integration/String64KLimitTest.java 2010-12-29
20:51:10 UTC (rev 10088)
+++ trunk/tests/src/org/hornetq/tests/integration/String64KLimitTest.java 2010-12-30
02:44:46 UTC (rev 10089)
@@ -202,7 +202,7 @@
{
super.setUp();
- Configuration config = new ConfigurationImpl();
+ Configuration config = createBasicConfig();
config.setSecurityEnabled(false);
config.getAcceptorConfigurations().add(new
TransportConfiguration(InVMAcceptorFactory.class.getName()));
server = HornetQServers.newHornetQServer(config, false);
Modified: trunk/tests/src/org/hornetq/tests/integration/client/ConsumerCloseTest.java
===================================================================
--- trunk/tests/src/org/hornetq/tests/integration/client/ConsumerCloseTest.java 2010-12-29
20:51:10 UTC (rev 10088)
+++ trunk/tests/src/org/hornetq/tests/integration/client/ConsumerCloseTest.java 2010-12-30
02:44:46 UTC (rev 10089)
@@ -17,12 +17,17 @@
import org.hornetq.api.core.HornetQException;
import org.hornetq.api.core.SimpleString;
import org.hornetq.api.core.TransportConfiguration;
-import org.hornetq.api.core.client.*;
+import org.hornetq.api.core.client.ClientConsumer;
+import org.hornetq.api.core.client.ClientMessage;
+import org.hornetq.api.core.client.ClientProducer;
+import org.hornetq.api.core.client.ClientSession;
+import org.hornetq.api.core.client.ClientSessionFactory;
+import org.hornetq.api.core.client.HornetQClient;
+import org.hornetq.api.core.client.MessageHandler;
+import org.hornetq.api.core.client.ServerLocator;
import org.hornetq.core.config.Configuration;
-import org.hornetq.core.config.impl.ConfigurationImpl;
import org.hornetq.core.logging.Logger;
import org.hornetq.core.remoting.impl.invm.InVMAcceptorFactory;
-import org.hornetq.core.remoting.impl.invm.InVMConnectorFactory;
import org.hornetq.core.server.HornetQServer;
import org.hornetq.core.server.HornetQServers;
import org.hornetq.tests.util.RandomUtil;
@@ -148,7 +153,7 @@
{
super.setUp();
- Configuration config = new ConfigurationImpl();
+ Configuration config = createDefaultConfig();
config.getAcceptorConfigurations().add(new
TransportConfiguration(InVMAcceptorFactory.class.getCanonicalName()));
config.setSecurityEnabled(false);
server = HornetQServers.newHornetQServer(config, false);
Modified: trunk/tests/src/org/hornetq/tests/integration/client/CoreClientTest.java
===================================================================
--- trunk/tests/src/org/hornetq/tests/integration/client/CoreClientTest.java 2010-12-29
20:51:10 UTC (rev 10088)
+++ trunk/tests/src/org/hornetq/tests/integration/client/CoreClientTest.java 2010-12-30
02:44:46 UTC (rev 10089)
@@ -18,7 +18,13 @@
import org.hornetq.api.core.HornetQBuffer;
import org.hornetq.api.core.SimpleString;
import org.hornetq.api.core.TransportConfiguration;
-import org.hornetq.api.core.client.*;
+import org.hornetq.api.core.client.ClientConsumer;
+import org.hornetq.api.core.client.ClientMessage;
+import org.hornetq.api.core.client.ClientProducer;
+import org.hornetq.api.core.client.ClientSession;
+import org.hornetq.api.core.client.ClientSessionFactory;
+import org.hornetq.api.core.client.HornetQClient;
+import org.hornetq.api.core.client.ServerLocator;
import org.hornetq.core.config.Configuration;
import org.hornetq.core.config.impl.ConfigurationImpl;
import org.hornetq.core.logging.Logger;
@@ -26,9 +32,8 @@
import org.hornetq.core.server.HornetQServers;
import org.hornetq.jms.client.HornetQTextMessage;
import org.hornetq.tests.util.ServiceTestBase;
-import org.hornetq.tests.util.UnitTestCase;
-public class CoreClientTest extends UnitTestCase
+public class CoreClientTest extends ServiceTestBase
{
private static final Logger log = Logger.getLogger(CoreClientTest.class);
@@ -58,7 +63,7 @@
{
final SimpleString QUEUE = new SimpleString("CoreClientTestQueue");
- Configuration conf = new ConfigurationImpl();
+ Configuration conf = createDefaultConfig();
conf.setSecurityEnabled(false);
Modified: trunk/tests/src/org/hornetq/tests/integration/client/DeadLetterAddressTest.java
===================================================================
---
trunk/tests/src/org/hornetq/tests/integration/client/DeadLetterAddressTest.java 2010-12-29
20:51:10 UTC (rev 10088)
+++
trunk/tests/src/org/hornetq/tests/integration/client/DeadLetterAddressTest.java 2010-12-30
02:44:46 UTC (rev 10089)
@@ -23,20 +23,28 @@
import org.hornetq.api.core.Message;
import org.hornetq.api.core.SimpleString;
import org.hornetq.api.core.TransportConfiguration;
-import org.hornetq.api.core.client.*;
-import org.hornetq.core.config.impl.ConfigurationImpl;
+import org.hornetq.api.core.client.ClientConsumer;
+import org.hornetq.api.core.client.ClientMessage;
+import org.hornetq.api.core.client.ClientProducer;
+import org.hornetq.api.core.client.ClientSession;
+import org.hornetq.api.core.client.ClientSessionFactory;
+import org.hornetq.api.core.client.HornetQClient;
+import org.hornetq.api.core.client.MessageHandler;
+import org.hornetq.api.core.client.ServerLocator;
+import org.hornetq.core.config.Configuration;
import org.hornetq.core.logging.Logger;
import org.hornetq.core.server.HornetQServer;
import org.hornetq.core.server.HornetQServers;
import org.hornetq.core.server.Queue;
import org.hornetq.core.settings.impl.AddressSettings;
import org.hornetq.tests.util.RandomUtil;
+import org.hornetq.tests.util.ServiceTestBase;
import org.hornetq.tests.util.UnitTestCase;
/**
* @author <a href="mailto:andy.taylor@jboss.org">Andy Taylor</a>
*/
-public class DeadLetterAddressTest extends UnitTestCase
+public class DeadLetterAddressTest extends ServiceTestBase
{
private static final Logger log = Logger.getLogger(DeadLetterAddressTest.class);
@@ -458,7 +466,7 @@
{
super.setUp();
- ConfigurationImpl configuration = new ConfigurationImpl();
+ Configuration configuration = createDefaultConfig();
configuration.setSecurityEnabled(false);
TransportConfiguration transportConfig = new
TransportConfiguration(UnitTestCase.INVM_ACCEPTOR_FACTORY);
configuration.getAcceptorConfigurations().add(transportConfig);
Modified: trunk/tests/src/org/hornetq/tests/integration/client/ExpiryAddressTest.java
===================================================================
--- trunk/tests/src/org/hornetq/tests/integration/client/ExpiryAddressTest.java 2010-12-29
20:51:10 UTC (rev 10088)
+++ trunk/tests/src/org/hornetq/tests/integration/client/ExpiryAddressTest.java 2010-12-30
02:44:46 UTC (rev 10089)
@@ -19,6 +19,7 @@
import org.hornetq.api.core.SimpleString;
import org.hornetq.api.core.TransportConfiguration;
import org.hornetq.api.core.client.*;
+import org.hornetq.core.config.Configuration;
import org.hornetq.core.config.impl.ConfigurationImpl;
import org.hornetq.core.logging.Logger;
import org.hornetq.core.server.HornetQServer;
@@ -31,7 +32,7 @@
/**
* @author <a href="mailto:andy.taylor@jboss.org">Andy Taylor</a>
*/
-public class ExpiryAddressTest extends UnitTestCase
+public class ExpiryAddressTest extends ServiceTestBase
{
private static final Logger log = Logger.getLogger(ExpiryAddressTest.class);
@@ -305,7 +306,7 @@
{
super.setUp();
- ConfigurationImpl configuration = new ConfigurationImpl();
+ Configuration configuration = createDefaultConfig();
configuration.setSecurityEnabled(false);
TransportConfiguration transportConfig = new
TransportConfiguration(UnitTestCase.INVM_ACCEPTOR_FACTORY);
configuration.getAcceptorConfigurations().add(transportConfig);
Modified: trunk/tests/src/org/hornetq/tests/integration/client/FailureDeadlockTest.java
===================================================================
---
trunk/tests/src/org/hornetq/tests/integration/client/FailureDeadlockTest.java 2010-12-29
20:51:10 UTC (rev 10088)
+++
trunk/tests/src/org/hornetq/tests/integration/client/FailureDeadlockTest.java 2010-12-30
02:44:46 UTC (rev 10089)
@@ -32,6 +32,7 @@
import org.hornetq.jms.server.impl.JMSServerManagerImpl;
import org.hornetq.spi.core.protocol.RemotingConnection;
import org.hornetq.tests.integration.jms.server.management.NullInitialContext;
+import org.hornetq.tests.util.ServiceTestBase;
import org.hornetq.tests.util.UnitTestCase;
/**
@@ -42,7 +43,7 @@
*
*
*/
-public class FailureDeadlockTest extends UnitTestCase
+public class FailureDeadlockTest extends ServiceTestBase
{
private static final Logger log = Logger.getLogger(FailureDeadlockTest.class);
@@ -59,7 +60,7 @@
{
super.setUp();
- Configuration conf = new ConfigurationImpl();
+ Configuration conf = createDefaultConfig();
conf.setSecurityEnabled(false);
conf.getAcceptorConfigurations()
.add(new
TransportConfiguration("org.hornetq.core.remoting.impl.invm.InVMAcceptorFactory"));
Modified: trunk/tests/src/org/hornetq/tests/integration/client/HornetQCrashTest.java
===================================================================
--- trunk/tests/src/org/hornetq/tests/integration/client/HornetQCrashTest.java 2010-12-29
20:51:10 UTC (rev 10088)
+++ trunk/tests/src/org/hornetq/tests/integration/client/HornetQCrashTest.java 2010-12-30
02:44:46 UTC (rev 10089)
@@ -1,31 +1,35 @@
package org.hornetq.tests.integration.client;
import junit.framework.Assert;
-import junit.framework.TestCase;
import org.hornetq.api.core.HornetQException;
import org.hornetq.api.core.Interceptor;
import org.hornetq.api.core.Message;
import org.hornetq.api.core.TransportConfiguration;
-import org.hornetq.api.core.client.*;
+import org.hornetq.api.core.client.ClientMessage;
+import org.hornetq.api.core.client.ClientProducer;
+import org.hornetq.api.core.client.ClientSession;
+import org.hornetq.api.core.client.ClientSessionFactory;
+import org.hornetq.api.core.client.HornetQClient;
+import org.hornetq.api.core.client.SendAcknowledgementHandler;
+import org.hornetq.api.core.client.ServerLocator;
import org.hornetq.core.config.Configuration;
-import org.hornetq.core.config.impl.ConfigurationImpl;
import org.hornetq.core.logging.Logger;
import org.hornetq.core.protocol.core.Packet;
import org.hornetq.core.protocol.core.impl.PacketImpl;
import org.hornetq.core.remoting.impl.invm.InVMAcceptorFactory;
-import org.hornetq.core.remoting.impl.invm.InVMConnectorFactory;
import org.hornetq.core.server.HornetQServer;
import org.hornetq.core.server.HornetQServers;
import org.hornetq.spi.core.protocol.RemotingConnection;
import org.hornetq.tests.util.ServiceTestBase;
+import org.hornetq.tests.util.UnitTestCase;
/**
*
* From
https://jira.jboss.org/jira/browse/HORNETQ-144
*
*/
-public class HornetQCrashTest extends TestCase
+public class HornetQCrashTest extends UnitTestCase
{
private static final Logger log = Logger.getLogger(HornetQCrashTest.class);
@@ -36,7 +40,7 @@
public void testHang() throws Exception
{
- Configuration configuration = new ConfigurationImpl();
+ Configuration configuration = createDefaultConfig();
configuration.setPersistenceEnabled(false);
configuration.setSecurityEnabled(false);
configuration.getAcceptorConfigurations().add(new
TransportConfiguration(InVMAcceptorFactory.class.getName()));
Modified:
trunk/tests/src/org/hornetq/tests/integration/client/MessageGroupingConnectionFactoryTest.java
===================================================================
---
trunk/tests/src/org/hornetq/tests/integration/client/MessageGroupingConnectionFactoryTest.java 2010-12-29
20:51:10 UTC (rev 10088)
+++
trunk/tests/src/org/hornetq/tests/integration/client/MessageGroupingConnectionFactoryTest.java 2010-12-30
02:44:46 UTC (rev 10089)
@@ -22,6 +22,7 @@
import org.hornetq.api.core.SimpleString;
import org.hornetq.api.core.TransportConfiguration;
import org.hornetq.api.core.client.*;
+import org.hornetq.core.config.Configuration;
import org.hornetq.core.config.impl.ConfigurationImpl;
import org.hornetq.core.logging.Logger;
import org.hornetq.core.server.HornetQServer;
@@ -143,7 +144,7 @@
{
super.setUp();
- ConfigurationImpl configuration = new ConfigurationImpl();
+ Configuration configuration = createDefaultConfig();
configuration.setSecurityEnabled(false);
TransportConfiguration transportConfig = new
TransportConfiguration(UnitTestCase.INVM_ACCEPTOR_FACTORY);
configuration.getAcceptorConfigurations().add(transportConfig);
Modified: trunk/tests/src/org/hornetq/tests/integration/client/MessageGroupingTest.java
===================================================================
---
trunk/tests/src/org/hornetq/tests/integration/client/MessageGroupingTest.java 2010-12-29
20:51:10 UTC (rev 10088)
+++
trunk/tests/src/org/hornetq/tests/integration/client/MessageGroupingTest.java 2010-12-30
02:44:46 UTC (rev 10089)
@@ -26,6 +26,7 @@
import org.hornetq.api.core.SimpleString;
import org.hornetq.api.core.TransportConfiguration;
import org.hornetq.api.core.client.*;
+import org.hornetq.core.config.Configuration;
import org.hornetq.core.config.impl.ConfigurationImpl;
import org.hornetq.core.logging.Logger;
import org.hornetq.core.server.HornetQServer;
@@ -565,7 +566,7 @@
{
super.setUp();
- ConfigurationImpl configuration = new ConfigurationImpl();
+ Configuration configuration = createDefaultConfig();
configuration.setSecurityEnabled(false);
TransportConfiguration transportConfig = new
TransportConfiguration(UnitTestCase.INVM_ACCEPTOR_FACTORY);
configuration.getAcceptorConfigurations().add(transportConfig);
Modified: trunk/tests/src/org/hornetq/tests/integration/client/MessagePriorityTest.java
===================================================================
---
trunk/tests/src/org/hornetq/tests/integration/client/MessagePriorityTest.java 2010-12-29
20:51:10 UTC (rev 10088)
+++
trunk/tests/src/org/hornetq/tests/integration/client/MessagePriorityTest.java 2010-12-30
02:44:46 UTC (rev 10089)
@@ -273,7 +273,7 @@
{
super.setUp();
- Configuration config = new ConfigurationImpl();
+ Configuration config = createDefaultConfig();
config.getAcceptorConfigurations().add(new
TransportConfiguration(InVMAcceptorFactory.class.getCanonicalName()));
config.setSecurityEnabled(false);
server = HornetQServers.newHornetQServer(config, false);
Modified: trunk/tests/src/org/hornetq/tests/integration/client/NIOvsOIOTest.java
===================================================================
--- trunk/tests/src/org/hornetq/tests/integration/client/NIOvsOIOTest.java 2010-12-29
20:51:10 UTC (rev 10088)
+++ trunk/tests/src/org/hornetq/tests/integration/client/NIOvsOIOTest.java 2010-12-30
02:44:46 UTC (rev 10089)
@@ -156,7 +156,7 @@
{
String acceptorFactoryClassName =
"org.hornetq.core.remoting.impl.netty.NettyAcceptorFactory";
- Configuration conf = new ConfigurationImpl();
+ Configuration conf = createDefaultConfig();
conf.setSecurityEnabled(false);
Modified:
trunk/tests/src/org/hornetq/tests/integration/client/NewDeadLetterAddressTest.java
===================================================================
---
trunk/tests/src/org/hornetq/tests/integration/client/NewDeadLetterAddressTest.java 2010-12-29
20:51:10 UTC (rev 10088)
+++
trunk/tests/src/org/hornetq/tests/integration/client/NewDeadLetterAddressTest.java 2010-12-30
02:44:46 UTC (rev 10089)
@@ -18,6 +18,7 @@
import org.hornetq.api.core.SimpleString;
import org.hornetq.api.core.TransportConfiguration;
import org.hornetq.api.core.client.*;
+import org.hornetq.core.config.Configuration;
import org.hornetq.core.config.impl.ConfigurationImpl;
import org.hornetq.core.server.HornetQServer;
import org.hornetq.core.server.HornetQServers;
@@ -64,7 +65,7 @@
{
super.setUp();
- ConfigurationImpl configuration = new ConfigurationImpl();
+ Configuration configuration = createDefaultConfig();
configuration.setSecurityEnabled(false);
TransportConfiguration transportConfig = new
TransportConfiguration(UnitTestCase.INVM_ACCEPTOR_FACTORY);
configuration.getAcceptorConfigurations().add(transportConfig);
Modified: trunk/tests/src/org/hornetq/tests/integration/client/ProducerCloseTest.java
===================================================================
--- trunk/tests/src/org/hornetq/tests/integration/client/ProducerCloseTest.java 2010-12-29
20:51:10 UTC (rev 10088)
+++ trunk/tests/src/org/hornetq/tests/integration/client/ProducerCloseTest.java 2010-12-30
02:44:46 UTC (rev 10089)
@@ -76,7 +76,7 @@
protected void setUp() throws Exception
{
super.setUp();
- Configuration config = new ConfigurationImpl();
+ Configuration config = createDefaultConfig();
config.getAcceptorConfigurations().add(new
TransportConfiguration(InVMAcceptorFactory.class.getCanonicalName()));
config.setSecurityEnabled(false);
server = HornetQServers.newHornetQServer(config, false);
Modified: trunk/tests/src/org/hornetq/tests/integration/client/RequestorTest.java
===================================================================
--- trunk/tests/src/org/hornetq/tests/integration/client/RequestorTest.java 2010-12-29
20:51:10 UTC (rev 10088)
+++ trunk/tests/src/org/hornetq/tests/integration/client/RequestorTest.java 2010-12-30
02:44:46 UTC (rev 10089)
@@ -216,7 +216,7 @@
{
super.setUp();
- Configuration conf = new ConfigurationImpl();
+ Configuration conf = createDefaultConfig();
conf.setSecurityEnabled(false);
conf.getAcceptorConfigurations().add(new
TransportConfiguration(InVMAcceptorFactory.class.getName()));
service = HornetQServers.newHornetQServer(conf, false);
Modified: trunk/tests/src/org/hornetq/tests/integration/client/SessionCloseTest.java
===================================================================
--- trunk/tests/src/org/hornetq/tests/integration/client/SessionCloseTest.java 2010-12-29
20:51:10 UTC (rev 10088)
+++ trunk/tests/src/org/hornetq/tests/integration/client/SessionCloseTest.java 2010-12-30
02:44:46 UTC (rev 10089)
@@ -245,7 +245,7 @@
{
super.setUp();
- Configuration config = new ConfigurationImpl();
+ Configuration config = createDefaultConfig();
config.getAcceptorConfigurations().add(new
TransportConfiguration(InVMAcceptorFactory.class.getCanonicalName()));
config.setSecurityEnabled(false);
server = HornetQServers.newHornetQServer(config, false);
Modified:
trunk/tests/src/org/hornetq/tests/integration/client/SessionClosedOnRemotingConnectionFailureTest.java
===================================================================
---
trunk/tests/src/org/hornetq/tests/integration/client/SessionClosedOnRemotingConnectionFailureTest.java 2010-12-29
20:51:10 UTC (rev 10088)
+++
trunk/tests/src/org/hornetq/tests/integration/client/SessionClosedOnRemotingConnectionFailureTest.java 2010-12-30
02:44:46 UTC (rev 10089)
@@ -112,7 +112,7 @@
{
super.setUp();
- Configuration config = new ConfigurationImpl();
+ Configuration config = createDefaultConfig();
config.getAcceptorConfigurations().add(new
TransportConfiguration(InVMAcceptorFactory.class.getCanonicalName()));
config.setSecurityEnabled(false);
server = HornetQServers.newHornetQServer(config, false);
Modified: trunk/tests/src/org/hornetq/tests/integration/client/SessionFactoryTest.java
===================================================================
---
trunk/tests/src/org/hornetq/tests/integration/client/SessionFactoryTest.java 2010-12-29
20:51:10 UTC (rev 10088)
+++
trunk/tests/src/org/hornetq/tests/integration/client/SessionFactoryTest.java 2010-12-30
02:44:46 UTC (rev 10089)
@@ -30,7 +30,6 @@
import org.hornetq.api.core.client.ServerLocator;
import org.hornetq.core.config.BroadcastGroupConfiguration;
import org.hornetq.core.config.Configuration;
-import org.hornetq.core.config.impl.ConfigurationImpl;
import org.hornetq.core.logging.Logger;
import org.hornetq.core.remoting.impl.invm.InVMAcceptorFactory;
import org.hornetq.core.remoting.impl.invm.InVMConnectorFactory;
@@ -100,6 +99,8 @@
ServerLocator csi = (ServerLocator)ois.readObject();
Assert.assertNotNull(csi);
+
+ locator.close();
}
public void testCloseUnusedClientSessionFactoryWithoutGlobalPools() throws Exception
@@ -562,7 +563,7 @@
private void startServer() throws Exception
{
- Configuration liveConf = new ConfigurationImpl();
+ Configuration liveConf = createDefaultConfig();
liveConf.setSecurityEnabled(false);
liveTC = new TransportConfiguration(InVMConnectorFactory.class.getName());
liveConf.getAcceptorConfigurations().add(new
TransportConfiguration(InVMAcceptorFactory.class.getName()));
Modified: trunk/tests/src/org/hornetq/tests/integration/client/WildCardRoutingTest.java
===================================================================
---
trunk/tests/src/org/hornetq/tests/integration/client/WildCardRoutingTest.java 2010-12-29
20:51:10 UTC (rev 10088)
+++
trunk/tests/src/org/hornetq/tests/integration/client/WildCardRoutingTest.java 2010-12-30
02:44:46 UTC (rev 10089)
@@ -18,6 +18,7 @@
import org.hornetq.api.core.SimpleString;
import org.hornetq.api.core.TransportConfiguration;
import org.hornetq.api.core.client.*;
+import org.hornetq.core.config.Configuration;
import org.hornetq.core.config.impl.ConfigurationImpl;
import org.hornetq.core.server.HornetQServer;
import org.hornetq.core.server.HornetQServers;
@@ -753,7 +754,7 @@
{
super.setUp();
- ConfigurationImpl configuration = new ConfigurationImpl();
+ Configuration configuration = createDefaultConfig();
configuration.setWildcardRoutingEnabled(true);
configuration.setSecurityEnabled(false);
configuration.setTransactionTimeoutScanPeriod(500);
Modified:
trunk/tests/src/org/hornetq/tests/integration/cluster/bridge/BridgeTestBase.java
===================================================================
---
trunk/tests/src/org/hornetq/tests/integration/cluster/bridge/BridgeTestBase.java 2010-12-29
20:51:10 UTC (rev 10088)
+++
trunk/tests/src/org/hornetq/tests/integration/cluster/bridge/BridgeTestBase.java 2010-12-30
02:44:46 UTC (rev 10089)
@@ -16,6 +16,8 @@
import java.util.ArrayList;
import java.util.Map;
+import javax.management.MBeanServer;
+
import org.hornetq.api.core.TransportConfiguration;
import org.hornetq.core.config.Configuration;
import org.hornetq.core.config.impl.ConfigurationImpl;
@@ -26,11 +28,8 @@
import org.hornetq.core.server.NodeManager;
import org.hornetq.core.server.impl.HornetQServerImpl;
import org.hornetq.spi.core.security.HornetQSecurityManager;
-import org.hornetq.tests.integration.cluster.distribution.ClusterTestBase;
import org.hornetq.tests.util.UnitTestCase;
-import javax.management.MBeanServer;
-
/**
* A BridgeTestBase
*
@@ -94,7 +93,7 @@
final boolean netty,
final NodeManager nodeManager)
{
- Configuration serviceConf = new ConfigurationImpl();
+ Configuration serviceConf = createBasicConfig();
serviceConf.setClustered(true);
serviceConf.setSecurityEnabled(false);
serviceConf.setSharedStore(true);
@@ -142,7 +141,7 @@
final int liveId,
final NodeManager nodeManager)
{
- Configuration serviceConf = new ConfigurationImpl();
+ Configuration serviceConf = createBasicConfig();
serviceConf.setClustered(true);
serviceConf.setSecurityEnabled(false);
serviceConf.setBackup(true);
Modified:
trunk/tests/src/org/hornetq/tests/integration/cluster/distribution/ClusterTestBase.java
===================================================================
---
trunk/tests/src/org/hornetq/tests/integration/cluster/distribution/ClusterTestBase.java 2010-12-29
20:51:10 UTC (rev 10088)
+++
trunk/tests/src/org/hornetq/tests/integration/cluster/distribution/ClusterTestBase.java 2010-12-30
02:44:46 UTC (rev 10089)
@@ -1295,7 +1295,7 @@
throw new IllegalArgumentException("Already a server at node " +
node);
}
- Configuration configuration = new ConfigurationImpl();
+ Configuration configuration = createBasicConfig();
configuration.setSecurityEnabled(false);
configuration.setJournalMinFiles(2);
@@ -1363,7 +1363,7 @@
throw new IllegalArgumentException("Already a server at node " +
node);
}
- Configuration configuration = new ConfigurationImpl();
+ Configuration configuration = createBasicConfig();
configuration.setSecurityEnabled(false);
configuration.setJournalMinFiles(2);
@@ -1438,7 +1438,7 @@
throw new IllegalArgumentException("Already a server at node " +
node);
}
- Configuration configuration = new ConfigurationImpl();
+ Configuration configuration = createBasicConfig();
configuration.setSecurityEnabled(false);
configuration.setBindingsDirectory(getBindingsDir(node, false));
@@ -1517,7 +1517,7 @@
throw new IllegalArgumentException("Already a server at node " +
node);
}
- Configuration configuration = new ConfigurationImpl();
+ Configuration configuration = createBasicConfig();
configuration.setSecurityEnabled(false);
configuration.setSharedStore(sharedStorage);
Modified:
trunk/tests/src/org/hornetq/tests/integration/cluster/failover/RemoteMultipleLivesMultipleBackupsFailoverTest.java
===================================================================
---
trunk/tests/src/org/hornetq/tests/integration/cluster/failover/RemoteMultipleLivesMultipleBackupsFailoverTest.java 2010-12-29
20:51:10 UTC (rev 10088)
+++
trunk/tests/src/org/hornetq/tests/integration/cluster/failover/RemoteMultipleLivesMultipleBackupsFailoverTest.java 2010-12-30
02:44:46 UTC (rev 10089)
@@ -149,7 +149,7 @@
protected static Configuration createBackupConfiguration(int liveNode, int nodeid,
boolean createClusterConnections, int[] otherBackupNodes, int... otherClusterNodes)
{
- Configuration config1 = new ConfigurationImpl();
+ Configuration config1 = createBasicConfig();
config1.getAcceptorConfigurations().add(createTransportConfiguration(true, true,
generateParams(nodeid, true)));
config1.setSecurityEnabled(false);
config1.setSharedStore(true);
@@ -189,7 +189,7 @@
protected static Configuration createLiveConfiguration(int liveNode, int...
otherLiveNodes)
{
- Configuration config0 = new ConfigurationImpl();
+ Configuration config0 = createBasicConfig();
TransportConfiguration liveConnector = createTransportConfiguration(true, false,
generateParams(liveNode, true));
config0.getConnectorConfigurations().put(liveConnector.getName(), liveConnector);
config0.getAcceptorConfigurations().add(createTransportConfiguration(true, true,
generateParams(liveNode, true)));
Modified:
trunk/tests/src/org/hornetq/tests/integration/cluster/failover/RemoteSingleLiveMultipleBackupsFailoverTest.java
===================================================================
---
trunk/tests/src/org/hornetq/tests/integration/cluster/failover/RemoteSingleLiveMultipleBackupsFailoverTest.java 2010-12-29
20:51:10 UTC (rev 10088)
+++
trunk/tests/src/org/hornetq/tests/integration/cluster/failover/RemoteSingleLiveMultipleBackupsFailoverTest.java 2010-12-30
02:44:46 UTC (rev 10089)
@@ -38,7 +38,7 @@
// Attributes ----------------------------------------------------
private static Map<Integer, String> backups = new HashMap<Integer,
String>();
-
+
// Static --------------------------------------------------------
// Constructors --------------------------------------------------
@@ -78,7 +78,7 @@
System.out.println("restarting live node as a backup");
createBackupConfig(0, 0, false, 1, 2, 3);
servers.get(0).start();
-
+
System.out.println("stopping waiting nodes");
for (int i = 1; i <= 3; i++)
{
@@ -88,19 +88,19 @@
servers.get(i).stop();
}
}
-
+
System.out.println("failing node " + backupNode);
servers.get(backupNode).crash(session);
session.close();
backupNode = waitForNewLive(5, true, servers, 0);
assertEquals(0, backupNode);
session = sendAndConsume(sf, false);
-
+
locator.close();
-
+
servers.get(0).stop();
}
-
+
// Package protected ---------------------------------------------
// Protected -----------------------------------------------------
@@ -122,7 +122,7 @@
protected void tearDown() throws Exception
{
super.tearDown();
- //make sure
+ // make sure
for (TestableServer testableServer : servers.values())
{
try
@@ -131,7 +131,7 @@
}
catch (Exception e)
{
- e.printStackTrace(); //To change body of catch statement use File | Settings
| File Templates.
+ e.printStackTrace(); // To change body of catch statement use File | Settings
| File Templates.
}
}
@@ -147,17 +147,16 @@
{
servers.put(liveNode, new
RemoteProcessHornetQServer(SharedLiveServerConfiguration.class.getName()));
}
-
protected void createBackupConfig(int liveNode, int nodeid, boolean
createClusterConnections, int... nodes)
{
servers.put(nodeid, new RemoteProcessHornetQServer(backups.get(nodeid)));
}
-
+
// Private -------------------------------------------------------
// Inner classes -------------------------------------------------
-
+
public static class SharedLiveServerConfiguration extends RemoteServerConfiguration
{
@Override
@@ -165,11 +164,15 @@
{
int liveNode = 0;
int[] otherLiveNodes = new int[0];
-
- Configuration config0 = new ConfigurationImpl();
- TransportConfiguration liveConnector = createTransportConfiguration(true, false,
generateParams(liveNode, true));
+
+ Configuration config0 = createBasicConfig();
+ TransportConfiguration liveConnector = createTransportConfiguration(true,
+ false,
+
generateParams(liveNode, true));
config0.getConnectorConfigurations().put(liveConnector.getName(),
liveConnector);
- config0.getAcceptorConfigurations().add(createTransportConfiguration(true, true,
generateParams(liveNode, true)));
+ config0.getAcceptorConfigurations().add(createTransportConfiguration(true,
+ true,
+
generateParams(liveNode, true)));
config0.setSecurityEnabled(false);
config0.setSharedStore(true);
config0.setJournalType(JournalType.NIO);
@@ -177,13 +180,23 @@
List<String> pairs = new ArrayList<String>();
for (int node : otherLiveNodes)
{
- TransportConfiguration otherLiveConnector =
createTransportConfiguration(true, false, generateParams(node, true));
+ TransportConfiguration otherLiveConnector =
createTransportConfiguration(true,
+
false,
+
generateParams(node, true));
config0.getConnectorConfigurations().put(otherLiveConnector.getName(),
otherLiveConnector);
- pairs.add(otherLiveConnector.getName());
+ pairs.add(otherLiveConnector.getName());
}
- ClusterConnectionConfiguration ccc0 = new
ClusterConnectionConfiguration("cluster1", "jms",
liveConnector.getName(), -1, false, false, 1, 1,
- pairs, false);
+ ClusterConnectionConfiguration ccc0 = new
ClusterConnectionConfiguration("cluster1",
+
"jms",
+
liveConnector.getName(),
+ -1,
+ false,
+ false,
+ 1,
+ 1,
+ pairs,
+
false);
config0.getClusterConfigurations().add(ccc0);
config0.getConnectorConfigurations().put(liveConnector.getName(),
liveConnector);
@@ -191,7 +204,7 @@
config0.setJournalDirectory(config0.getJournalDirectory() + "_" +
liveNode);
config0.setPagingDirectory(config0.getPagingDirectory() + "_" +
liveNode);
config0.setLargeMessagesDirectory(config0.getLargeMessagesDirectory() +
"_" + liveNode);
-
+
return config0;
}
}
@@ -204,13 +217,13 @@
return createBackupConfiguration(0, 0, false, 1, 2, 3, 4, 5);
}
}
-
+
public static class SharedBackupServerConfiguration1 extends
RemoteServerConfiguration
{
@Override
public Configuration getConfiguration()
{
- return createBackupConfiguration(0, 1, false, 0, 2, 3, 4, 5);
+ return createBackupConfiguration(0, 1, false, 0, 2, 3, 4, 5);
}
}
@@ -219,7 +232,7 @@
@Override
public Configuration getConfiguration()
{
- return createBackupConfiguration(0, 2, false, 0, 1, 3, 4, 5);
+ return createBackupConfiguration(0, 2, false, 0, 1, 3, 4, 5);
}
}
@@ -228,7 +241,7 @@
@Override
public Configuration getConfiguration()
{
- return createBackupConfiguration(0, 3, false, 0, 1, 2, 4, 5);
+ return createBackupConfiguration(0, 3, false, 0, 1, 2, 4, 5);
}
}
@@ -237,7 +250,7 @@
@Override
public Configuration getConfiguration()
{
- return createBackupConfiguration(0, 4, false, 0, 1, 2, 3, 5);
+ return createBackupConfiguration(0, 4, false, 0, 1, 2, 3, 5);
}
}
@@ -246,13 +259,16 @@
@Override
public Configuration getConfiguration()
{
- return createBackupConfiguration(0, 5, false, 0, 1, 2, 3, 4);
+ return createBackupConfiguration(0, 5, false, 0, 1, 2, 3, 4);
}
}
- protected static Configuration createBackupConfiguration(int liveNode, int nodeid,
boolean createClusterConnections, int... nodes)
+ protected static Configuration createBackupConfiguration(int liveNode,
+ int nodeid,
+ boolean
createClusterConnections,
+ int... nodes)
{
- Configuration config1 = new ConfigurationImpl();
+ Configuration config1 = createBasicConfig();
config1.getAcceptorConfigurations().add(createTransportConfiguration(true, true,
generateParams(nodeid, true)));
config1.setSecurityEnabled(false);
config1.setSharedStore(true);
@@ -269,12 +285,21 @@
}
TransportConfiguration backupConnector = createTransportConfiguration(true, false,
generateParams(nodeid, true));
List<String> pairs = null;
- ClusterConnectionConfiguration ccc1 = new
ClusterConnectionConfiguration("cluster1", "jms",
backupConnector.getName(), -1, false, false, 1, 1,
- createClusterConnections? staticConnectors:pairs, false);
+ ClusterConnectionConfiguration ccc1 = new
ClusterConnectionConfiguration("cluster1",
+
"jms",
+
backupConnector.getName(),
+ -1,
+ false,
+ false,
+ 1,
+ 1,
+
createClusterConnections ? staticConnectors
+
: pairs,
+ false);
config1.getClusterConfigurations().add(ccc1);
config1.getConnectorConfigurations().put(backupConnector.getName(),
backupConnector);
-System.out.println(config1.getBindingsDirectory());
+ System.out.println(config1.getBindingsDirectory());
config1.setBindingsDirectory(config1.getBindingsDirectory() + "_" +
liveNode);
config1.setJournalDirectory(config1.getJournalDirectory() + "_" +
liveNode);
config1.setPagingDirectory(config1.getPagingDirectory() + "_" +
liveNode);
Modified:
trunk/tests/src/org/hornetq/tests/integration/cluster/failover/remote/FailoverWithSharedStoreTest.java
===================================================================
---
trunk/tests/src/org/hornetq/tests/integration/cluster/failover/remote/FailoverWithSharedStoreTest.java 2010-12-29
20:51:10 UTC (rev 10088)
+++
trunk/tests/src/org/hornetq/tests/integration/cluster/failover/remote/FailoverWithSharedStoreTest.java 2010-12-30
02:44:46 UTC (rev 10089)
@@ -27,7 +27,6 @@
import org.hornetq.api.core.client.ServerLocator;
import org.hornetq.core.config.ClusterConnectionConfiguration;
import org.hornetq.core.config.Configuration;
-import org.hornetq.core.config.impl.ConfigurationImpl;
import org.hornetq.core.remoting.impl.netty.NettyConnectorFactory;
import org.hornetq.core.server.JournalType;
import org.hornetq.tests.integration.cluster.distribution.ClusterTestBase;
@@ -61,7 +60,7 @@
@Override
public Configuration getConfiguration()
{
- Configuration config = new ConfigurationImpl();
+ Configuration config = createBasicConfig();
config.setSecurityEnabled(false);
config.setJournalType(JournalType.NIO);
config.setSharedStore(true);
@@ -89,7 +88,7 @@
@Override
public Configuration getConfiguration()
{
- Configuration config = new ConfigurationImpl();
+ Configuration config = createBasicConfig();
config.setSecurityEnabled(false);
config.setJournalType(JournalType.NIO);
config.setSharedStore(true);
Modified:
trunk/tests/src/org/hornetq/tests/integration/cluster/reattach/MultiThreadRandomReattachTest.java
===================================================================
---
trunk/tests/src/org/hornetq/tests/integration/cluster/reattach/MultiThreadRandomReattachTest.java 2010-12-29
20:51:10 UTC (rev 10088)
+++
trunk/tests/src/org/hornetq/tests/integration/cluster/reattach/MultiThreadRandomReattachTest.java 2010-12-30
02:44:46 UTC (rev 10089)
@@ -35,7 +35,7 @@
@Override
protected void start() throws Exception
{
- Configuration liveConf = new ConfigurationImpl();
+ Configuration liveConf = createDefaultConfig();
liveConf.setSecurityEnabled(false);
liveConf.getAcceptorConfigurations()
.add(new
TransportConfiguration("org.hornetq.core.remoting.impl.invm.InVMAcceptorFactory"));
Modified:
trunk/tests/src/org/hornetq/tests/integration/cluster/reattach/NettyMultiThreadRandomReattachTest.java
===================================================================
---
trunk/tests/src/org/hornetq/tests/integration/cluster/reattach/NettyMultiThreadRandomReattachTest.java 2010-12-29
20:51:10 UTC (rev 10088)
+++
trunk/tests/src/org/hornetq/tests/integration/cluster/reattach/NettyMultiThreadRandomReattachTest.java 2010-12-30
02:44:46 UTC (rev 10089)
@@ -36,7 +36,7 @@
@Override
protected void start() throws Exception
{
- Configuration liveConf = new ConfigurationImpl();
+ Configuration liveConf = createDefaultConfig();
liveConf.setJMXManagementEnabled(false);
liveConf.setSecurityEnabled(false);
liveConf.getAcceptorConfigurations().clear();
Modified:
trunk/tests/src/org/hornetq/tests/integration/cluster/reattach/RandomReattachTest.java
===================================================================
---
trunk/tests/src/org/hornetq/tests/integration/cluster/reattach/RandomReattachTest.java 2010-12-29
20:51:10 UTC (rev 10088)
+++
trunk/tests/src/org/hornetq/tests/integration/cluster/reattach/RandomReattachTest.java 2010-12-30
02:44:46 UTC (rev 10089)
@@ -1469,7 +1469,7 @@
private void start() throws Exception
{
- Configuration liveConf = new ConfigurationImpl();
+ Configuration liveConf = createDefaultConfig();
liveConf.setSecurityEnabled(false);
liveConf.getAcceptorConfigurations()
.add(new
TransportConfiguration("org.hornetq.core.remoting.impl.invm.InVMAcceptorFactory"));
Modified: trunk/tests/src/org/hornetq/tests/integration/http/CoreClientOverHttpTest.java
===================================================================
---
trunk/tests/src/org/hornetq/tests/integration/http/CoreClientOverHttpTest.java 2010-12-29
20:51:10 UTC (rev 10088)
+++
trunk/tests/src/org/hornetq/tests/integration/http/CoreClientOverHttpTest.java 2010-12-30
02:44:46 UTC (rev 10089)
@@ -39,7 +39,7 @@
{
final SimpleString QUEUE = new
SimpleString("CoreClientOverHttpTestQueue");
- Configuration conf = new ConfigurationImpl();
+ Configuration conf = createDefaultConfig();
conf.setSecurityEnabled(false);
@@ -51,7 +51,8 @@
server.start();
- ServerLocator locator = HornetQClient.createServerLocatorWithoutHA(new
TransportConfiguration(NettyConnectorFactory.class.getName(), params));
+ ServerLocator locator = HornetQClient.createServerLocatorWithoutHA(new
TransportConfiguration(NettyConnectorFactory.class.getName(),
+
params));
ClientSessionFactory sf = locator.createSessionFactory();
ClientSession session = sf.createSession(false, true, true);
@@ -65,10 +66,10 @@
for (int i = 0; i < numMessages; i++)
{
ClientMessage message = session.createMessage(HornetQTextMessage.TYPE,
- false,
- 0,
- System.currentTimeMillis(),
- (byte)1);
+ false,
+ 0,
+ System.currentTimeMillis(),
+ (byte)1);
message.getBodyBuffer().writeString("CoreClientOverHttpTest");
producer.send(message);
}
@@ -90,7 +91,6 @@
locator.close();
-
server.stop();
}
@@ -98,7 +98,7 @@
{
final SimpleString QUEUE = new
SimpleString("CoreClientOverHttpTestQueue");
- Configuration conf = new ConfigurationImpl();
+ Configuration conf = createDefaultConfig();
conf.setSecurityEnabled(false);
@@ -110,7 +110,8 @@
server.start();
- ServerLocator locator = HornetQClient.createServerLocatorWithoutHA(new
TransportConfiguration(NettyConnectorFactory.class.getName(), params));
+ ServerLocator locator = HornetQClient.createServerLocatorWithoutHA(new
TransportConfiguration(NettyConnectorFactory.class.getName(),
+
params));
locator.setConnectionTTL(500);
ClientSessionFactory sf = locator.createSessionFactory();
@@ -129,12 +130,12 @@
server.stop();
}
- //https://issues.jboss.org/browse/JBPAPP-5542
+ //
https://issues.jboss.org/browse/JBPAPP-5542
public void testCoreHttpClient8kPlus() throws Exception
{
final SimpleString QUEUE = new
SimpleString("CoreClientOverHttpTestQueue");
- Configuration conf = new ConfigurationImpl();
+ Configuration conf = createDefaultConfig();
conf.setSecurityEnabled(false);
@@ -146,7 +147,8 @@
server.start();
- ServerLocator locator = HornetQClient.createServerLocatorWithoutHA(new
TransportConfiguration(NettyConnectorFactory.class.getName(), params));
+ ServerLocator locator = HornetQClient.createServerLocatorWithoutHA(new
TransportConfiguration(NettyConnectorFactory.class.getName(),
+
params));
ClientSessionFactory sf = locator.createSessionFactory();
ClientSession session = sf.createSession(false, true, true);
@@ -158,15 +160,15 @@
final int numMessages = 100;
String[] content = new String[numMessages];
-
+
for (int i = 0; i < numMessages; i++)
{
ClientMessage message = session.createMessage(HornetQTextMessage.TYPE,
- false,
- 0,
- System.currentTimeMillis(),
- (byte)1);
- content[i] = this.getFixedSizeString(i*1024*8);
+ false,
+ 0,
+ System.currentTimeMillis(),
+ (byte)1);
+ content[i] = this.getFixedSizeString(((i % 5) + 1) * 1024 * 8);
message.getBodyBuffer().writeString(content[i]);
producer.send(message);
}
Modified: trunk/tests/src/org/hornetq/tests/integration/jms/FloodServerTest.java
===================================================================
--- trunk/tests/src/org/hornetq/tests/integration/jms/FloodServerTest.java 2010-12-29
20:51:10 UTC (rev 10088)
+++ trunk/tests/src/org/hornetq/tests/integration/jms/FloodServerTest.java 2010-12-30
02:44:46 UTC (rev 10089)
@@ -80,7 +80,7 @@
{
super.setUp();
- Configuration conf = new ConfigurationImpl();
+ Configuration conf = createBasicConfig();
conf.setSecurityEnabled(false);
conf.setJMXManagementEnabled(true);
conf.getAcceptorConfigurations().add(new
TransportConfiguration(NettyAcceptorFactory.class.getName()));
Modified:
trunk/tests/src/org/hornetq/tests/integration/jms/HornetQConnectionFactoryTest.java
===================================================================
---
trunk/tests/src/org/hornetq/tests/integration/jms/HornetQConnectionFactoryTest.java 2010-12-29
20:51:10 UTC (rev 10088)
+++
trunk/tests/src/org/hornetq/tests/integration/jms/HornetQConnectionFactoryTest.java 2010-12-30
02:44:46 UTC (rev 10089)
@@ -704,7 +704,7 @@
private void startServer() throws Exception
{
- Configuration liveConf = new ConfigurationImpl();
+ Configuration liveConf = createBasicConfig();
liveConf.setSecurityEnabled(false);
liveTC = new
TransportConfiguration("org.hornetq.core.remoting.impl.invm.InVMConnectorFactory");
liveConf.getAcceptorConfigurations()
Modified:
trunk/tests/src/org/hornetq/tests/integration/jms/ManualReconnectionToSingleServerTest.java
===================================================================
---
trunk/tests/src/org/hornetq/tests/integration/jms/ManualReconnectionToSingleServerTest.java 2010-12-29
20:51:10 UTC (rev 10088)
+++
trunk/tests/src/org/hornetq/tests/integration/jms/ManualReconnectionToSingleServerTest.java 2010-12-30
02:44:46 UTC (rev 10089)
@@ -156,7 +156,7 @@
{
super.setUp();
- Configuration conf = new ConfigurationImpl();
+ Configuration conf = createBasicConfig();
conf.setSecurityEnabled(false);
conf.setJMXManagementEnabled(true);
conf.getAcceptorConfigurations().add(new
TransportConfiguration(NettyAcceptorFactory.class.getName()));
Modified: trunk/tests/src/org/hornetq/tests/integration/jms/bridge/BridgeTestBase.java
===================================================================
---
trunk/tests/src/org/hornetq/tests/integration/jms/bridge/BridgeTestBase.java 2010-12-29
20:51:10 UTC (rev 10088)
+++
trunk/tests/src/org/hornetq/tests/integration/jms/bridge/BridgeTestBase.java 2010-12-30
02:44:46 UTC (rev 10089)
@@ -109,7 +109,9 @@
super.setUp();
// Start the servers
- Configuration conf0 = new ConfigurationImpl();
+ Configuration conf0 = createBasicConfig();
+ conf0.setJournalDirectory(getJournalDir(0, false));
+ conf0.setBindingsDirectory(getBindingsDir(0, false));
conf0.setSecurityEnabled(false);
conf0.getAcceptorConfigurations()
.add(new
TransportConfiguration("org.hornetq.core.remoting.impl.invm.InVMAcceptorFactory"));
@@ -120,8 +122,10 @@
jmsServer0.setContext(context0);
jmsServer0.start();
- Configuration conf1 = new ConfigurationImpl();
+ Configuration conf1 = createBasicConfig();
conf1.setSecurityEnabled(false);
+ conf1.setJournalDirectory(getJournalDir(1, false));
+ conf1.setBindingsDirectory(getBindingsDir(1, false));
params1 = new HashMap<String, Object>();
params1.put(TransportConstants.SERVER_ID_PROP_NAME, 1);
conf1.getAcceptorConfigurations()
@@ -181,11 +185,11 @@
server0.stop();
cff0 = cff1 = null;
-
+
cff0xa = cff1xa = null;
cf0 = cf1 = null;
-
+
cf0xa = cf1xa = null;
sourceQueueFactory = targetQueueFactory = localTargetQueueFactory =
sourceTopicFactory = null;
@@ -215,7 +219,8 @@
{
public ConnectionFactory createConnectionFactory() throws Exception
{
- HornetQConnectionFactory cf = (HornetQConnectionFactory)
HornetQJMSClient.createConnectionFactoryWithoutHA(JMSFactoryType.CF, new
TransportConfiguration(InVMConnectorFactory.class.getName()));
+ HornetQConnectionFactory cf =
(HornetQConnectionFactory)HornetQJMSClient.createConnectionFactoryWithoutHA(JMSFactoryType.CF,
+
new
TransportConfiguration(InVMConnectorFactory.class.getName()));
// Note! We disable automatic reconnection on the session factory. The bridge
needs to do the reconnection
cf.setReconnectAttempts(0);
@@ -223,7 +228,7 @@
cf.setBlockOnDurableSend(true);
cf.setCacheLargeMessagesClient(true);
- return (ConnectionFactory) cf;
+ return (ConnectionFactory)cf;
}
};
@@ -232,7 +237,8 @@
{
public Object createConnectionFactory() throws Exception
{
- HornetQXAConnectionFactory cf =
(HornetQXAConnectionFactory)HornetQJMSClient.createConnectionFactoryWithoutHA(JMSFactoryType.XA_CF,new
TransportConfiguration(InVMConnectorFactory.class.getName()));
+ HornetQXAConnectionFactory cf =
(HornetQXAConnectionFactory)HornetQJMSClient.createConnectionFactoryWithoutHA(JMSFactoryType.XA_CF,
+
new
TransportConfiguration(InVMConnectorFactory.class.getName()));
// Note! We disable automatic reconnection on the session factory. The bridge
needs to do the reconnection
cf.setReconnectAttempts(0);
@@ -253,8 +259,9 @@
public ConnectionFactory createConnectionFactory() throws Exception
{
- HornetQJMSConnectionFactory cf = (HornetQJMSConnectionFactory)
HornetQJMSClient.createConnectionFactoryWithoutHA(JMSFactoryType.CF, new
TransportConfiguration(InVMConnectorFactory.class.getName(),
-
params1));
+ HornetQJMSConnectionFactory cf =
(HornetQJMSConnectionFactory)HornetQJMSClient.createConnectionFactoryWithoutHA(JMSFactoryType.CF,
+
new
TransportConfiguration(InVMConnectorFactory.class.getName(),
+
params1));
// Note! We disable automatic reconnection on the session factory. The bridge
needs to do the reconnection
cf.setReconnectAttempts(0);
@@ -271,8 +278,9 @@
public XAConnectionFactory createConnectionFactory() throws Exception
{
- HornetQXAConnectionFactory cf = (HornetQXAConnectionFactory)
HornetQJMSClient.createConnectionFactoryWithoutHA(JMSFactoryType.XA_CF, new
TransportConfiguration(InVMConnectorFactory.class.getName(),
-
params1));
+ HornetQXAConnectionFactory cf =
(HornetQXAConnectionFactory)HornetQJMSClient.createConnectionFactoryWithoutHA(JMSFactoryType.XA_CF,
+
new
TransportConfiguration(InVMConnectorFactory.class.getName(),
+
params1));
// Note! We disable automatic reconnection on the session factory. The bridge
needs to do the reconnection
cf.setReconnectAttempts(0);
Modified: trunk/tests/src/org/hornetq/tests/integration/jms/cluster/JMSFailoverTest.java
===================================================================
---
trunk/tests/src/org/hornetq/tests/integration/jms/cluster/JMSFailoverTest.java 2010-12-29
20:51:10 UTC (rev 10088)
+++
trunk/tests/src/org/hornetq/tests/integration/jms/cluster/JMSFailoverTest.java 2010-12-30
02:44:46 UTC (rev 10089)
@@ -58,7 +58,7 @@
import org.hornetq.tests.integration.jms.server.management.JMSUtil;
import org.hornetq.tests.unit.util.InVMContext;
import org.hornetq.tests.util.RandomUtil;
-import org.hornetq.tests.util.UnitTestCase;
+import org.hornetq.tests.util.ServiceTestBase;
/**
*
@@ -73,33 +73,36 @@
*
*
*/
-public class JMSFailoverTest extends UnitTestCase
+public class JMSFailoverTest extends ServiceTestBase
{
private static final Logger log = Logger.getLogger(JMSFailoverTest.class);
// Constants -----------------------------------------------------
// Attributes ----------------------------------------------------
-
+
protected InVMContext ctx1 = new InVMContext();
-
+
protected InVMContext ctx2 = new InVMContext();
-
+
protected Configuration backupConf;
-
+
protected Configuration liveConf;
-
+
protected JMSServerManager liveJMSService;
protected HornetQServer liveService;
-
+
protected JMSServerManager backupJMSService;
protected HornetQServer backupService;
protected Map<String, Object> backupParams = new HashMap<String,
Object>();
+
private TransportConfiguration backuptc;
+
private TransportConfiguration livetc;
+
private TransportConfiguration liveAcceptortc;
private TransportConfiguration backupAcceptortc;
@@ -131,19 +134,17 @@
JMSUtil.crash(liveService, coreSession);
-
assertNotNull(ctx2.lookup("/queue/queue1"));
}
finally
{
- if(conn != null)
+ if (conn != null)
{
conn.close();
}
}
}
-
public void testCreateTopic() throws Exception
{
liveJMSService.createTopic(true, "topic", "/topic/t1");
@@ -169,7 +170,7 @@
}
finally
{
- if(conn != null)
+ if (conn != null)
{
conn.close();
}
@@ -232,7 +233,7 @@
Thread.sleep(2000);
- JMSUtil.crash(liveService, ((HornetQSession) sess).getCoreSession());
+ JMSUtil.crash(liveService, ((HornetQSession)sess).getCoreSession());
for (int i = 0; i < numMessages; i++)
{
@@ -255,13 +256,15 @@
public void testManualFailover() throws Exception
{
- HornetQConnectionFactory jbcfLive =
HornetQJMSClient.createConnectionFactoryWithoutHA(JMSFactoryType.CF, new
TransportConfiguration("org.hornetq.core.remoting.impl.invm.InVMConnectorFactory"));
+ HornetQConnectionFactory jbcfLive =
HornetQJMSClient.createConnectionFactoryWithoutHA(JMSFactoryType.CF,
+
new
TransportConfiguration("org.hornetq.core.remoting.impl.invm.InVMConnectorFactory"));
jbcfLive.setBlockOnNonDurableSend(true);
jbcfLive.setBlockOnDurableSend(true);
- HornetQConnectionFactory jbcfBackup =
HornetQJMSClient.createConnectionFactoryWithoutHA(JMSFactoryType.CF, new
TransportConfiguration("org.hornetq.core.remoting.impl.invm.InVMConnectorFactory",
-
backupParams));
+ HornetQConnectionFactory jbcfBackup =
HornetQJMSClient.createConnectionFactoryWithoutHA(JMSFactoryType.CF,
+
new
TransportConfiguration("org.hornetq.core.remoting.impl.invm.InVMConnectorFactory",
+
backupParams));
jbcfBackup.setBlockOnNonDurableSend(true);
jbcfBackup.setBlockOnDurableSend(true);
jbcfBackup.setInitialConnectAttempts(-1);
@@ -345,25 +348,31 @@
protected void startServers() throws Exception
{
NodeManager nodeManager = new InVMNodeManager();
- backuptc = new
TransportConfiguration("org.hornetq.core.remoting.impl.invm.InVMConnectorFactory",
- backupParams);
+ backuptc = new
TransportConfiguration("org.hornetq.core.remoting.impl.invm.InVMConnectorFactory",
backupParams);
livetc = new
TransportConfiguration("org.hornetq.core.remoting.impl.invm.InVMConnectorFactory");
liveAcceptortc = new
TransportConfiguration("org.hornetq.core.remoting.impl.invm.InVMAcceptorFactory");
-
backupAcceptortc = new
TransportConfiguration("org.hornetq.core.remoting.impl.invm.InVMAcceptorFactory",
- backupParams);
-
- backupConf = new ConfigurationImpl();
+ backupParams);
+ backupConf = createBasicConfig(0);
+
backupConf.getAcceptorConfigurations().add(backupAcceptortc);
backupConf.getConnectorConfigurations().put(livetc.getName(), livetc);
backupConf.getConnectorConfigurations().put(backuptc.getName(), backuptc);
ArrayList<String> staticConnectors = new ArrayList<String>();
staticConnectors.add(livetc.getName());
- ClusterConnectionConfiguration cccBackup = new
ClusterConnectionConfiguration("cluster1", "jms", backuptc.getName(),
-1, false, false, 1, 1,
- staticConnectors, false);
+ ClusterConnectionConfiguration cccBackup = new
ClusterConnectionConfiguration("cluster1",
+
"jms",
+
backuptc.getName(),
+ -1,
+
false,
+
false,
+ 1,
+ 1,
+
staticConnectors,
+
false);
backupConf.getClusterConfigurations().add(cccBackup);
backupConf.setSecurityEnabled(false);
@@ -383,20 +392,29 @@
backupService = new InVMNodeManagerServer(backupConf, nodeManager);
backupJMSService = new JMSServerManagerImpl(backupService);
-
+
backupJMSService.setContext(ctx2);
-
+
backupJMSService.start();
-
+ liveConf = createBasicConfig(0);
- liveConf = new ConfigurationImpl();
+ liveConf.setJournalDirectory(getJournalDir());
+ liveConf.setBindingsDirectory(getBindingsDir());
+
liveConf.setSecurityEnabled(false);
- liveConf.getAcceptorConfigurations()
- .add(liveAcceptortc);
- List<String> pairs = null;
- ClusterConnectionConfiguration ccc0 = new
ClusterConnectionConfiguration("cluster1", "jms", livetc.getName(),
-1, false, false, 1, 1,
- pairs, false);
+ liveConf.getAcceptorConfigurations().add(liveAcceptortc);
+ List<String> pairs = null;
+ ClusterConnectionConfiguration ccc0 = new
ClusterConnectionConfiguration("cluster1",
+
"jms",
+
livetc.getName(),
+ -1,
+ false,
+ false,
+ 1,
+ 1,
+ pairs,
+ false);
liveConf.getClusterConfigurations().add(ccc0);
liveConf.setSharedStore(true);
liveConf.setJournalType(getDefaultJournalType());
@@ -409,14 +427,14 @@
liveConf.setPersistenceEnabled(true);
liveConf.setClustered(true);
liveService = new InVMNodeManagerServer(liveConf, nodeManager);
-
+
liveJMSService = new JMSServerManagerImpl(liveService);
-
+
liveJMSService.setContext(ctx1);
liveJMSService.start();
- JMSUtil.waitForServer(backupService);
+ JMSUtil.waitForServer(backupService);
}
@Override
@@ -429,13 +447,13 @@
Assert.assertEquals(0, InVMRegistry.instance.size());
liveService = null;
-
+
liveJMSService = null;
-
+
backupJMSService = null;
-
+
ctx1 = null;
-
+
ctx2 = null;
backupService = null;
@@ -459,11 +477,11 @@
}
}
-
// Inner classes -------------------------------------------------
class InVMNodeManagerServer extends HornetQServerImpl
{
final NodeManager nodeManager;
+
public InVMNodeManagerServer(NodeManager nodeManager)
{
super();
@@ -482,13 +500,18 @@
this.nodeManager = nodeManager;
}
- public InVMNodeManagerServer(Configuration configuration, HornetQSecurityManager
securityManager, NodeManager nodeManager)
+ public InVMNodeManagerServer(Configuration configuration,
+ HornetQSecurityManager securityManager,
+ NodeManager nodeManager)
{
super(configuration, securityManager);
this.nodeManager = nodeManager;
}
- public InVMNodeManagerServer(Configuration configuration, MBeanServer mbeanServer,
HornetQSecurityManager securityManager, NodeManager nodeManager)
+ public InVMNodeManagerServer(Configuration configuration,
+ MBeanServer mbeanServer,
+ HornetQSecurityManager securityManager,
+ NodeManager nodeManager)
{
super(configuration, mbeanServer, securityManager);
this.nodeManager = nodeManager;
Modified: trunk/tests/src/org/hornetq/tests/integration/jms/cluster/JMSReconnectTest.java
===================================================================
---
trunk/tests/src/org/hornetq/tests/integration/jms/cluster/JMSReconnectTest.java 2010-12-29
20:51:10 UTC (rev 10088)
+++
trunk/tests/src/org/hornetq/tests/integration/jms/cluster/JMSReconnectTest.java 2010-12-30
02:44:46 UTC (rev 10089)
@@ -323,7 +323,7 @@
{
super.setUp();
- Configuration liveConf = new ConfigurationImpl();
+ Configuration liveConf = createBasicConfig();
liveConf.setSecurityEnabled(false);
liveConf.setJournalType(getDefaultJournalType());
liveConf.getAcceptorConfigurations()
Modified:
trunk/tests/src/org/hornetq/tests/integration/jms/cluster/ReplicatedJMSFailoverTest.java
===================================================================
---
trunk/tests/src/org/hornetq/tests/integration/jms/cluster/ReplicatedJMSFailoverTest.java 2010-12-29
20:51:10 UTC (rev 10088)
+++
trunk/tests/src/org/hornetq/tests/integration/jms/cluster/ReplicatedJMSFailoverTest.java 2010-12-30
02:44:46 UTC (rev 10089)
@@ -48,7 +48,7 @@
@Override
protected void startServers() throws Exception
{
- backupConf = new ConfigurationImpl();
+ backupConf = createBasicConfig();
backupConf.setJournalType(getDefaultJournalType());
backupConf.setSecurityEnabled(false);
backupParams.put(TransportConstants.SERVER_ID_PROP_NAME, 1);
@@ -71,7 +71,7 @@
- liveConf = new ConfigurationImpl();
+ liveConf = createBasicConfig();
liveConf.setSecurityEnabled(false);
liveConf.setJournalType(getDefaultJournalType());
Modified:
trunk/tests/src/org/hornetq/tests/integration/jms/connection/ExceptionListenerTest.java
===================================================================
---
trunk/tests/src/org/hornetq/tests/integration/jms/connection/ExceptionListenerTest.java 2010-12-29
20:51:10 UTC (rev 10088)
+++
trunk/tests/src/org/hornetq/tests/integration/jms/connection/ExceptionListenerTest.java 2010-12-30
02:44:46 UTC (rev 10089)
@@ -61,7 +61,7 @@
{
super.setUp();
- Configuration conf = new ConfigurationImpl();
+ Configuration conf = createBasicConfig();
conf.setSecurityEnabled(false);
conf.setJMXManagementEnabled(true);
conf.getAcceptorConfigurations()
Modified:
trunk/tests/src/org/hornetq/tests/integration/jms/server/JMSServerDeployerTest.java
===================================================================
---
trunk/tests/src/org/hornetq/tests/integration/jms/server/JMSServerDeployerTest.java 2010-12-29
20:51:10 UTC (rev 10088)
+++
trunk/tests/src/org/hornetq/tests/integration/jms/server/JMSServerDeployerTest.java 2010-12-30
02:44:46 UTC (rev 10089)
@@ -335,7 +335,7 @@
{
super.setUp();
- config = new ConfigurationImpl();
+ config = createBasicConfig();
config.getConnectorConfigurations().put("netty",
new
TransportConfiguration(NettyConnectorFactory.class.getName()));
Modified:
trunk/tests/src/org/hornetq/tests/integration/jms/server/management/JMSQueueControlTest.java
===================================================================
---
trunk/tests/src/org/hornetq/tests/integration/jms/server/management/JMSQueueControlTest.java 2010-12-29
20:51:10 UTC (rev 10088)
+++
trunk/tests/src/org/hornetq/tests/integration/jms/server/management/JMSQueueControlTest.java 2010-12-30
02:44:46 UTC (rev 10089)
@@ -1064,7 +1064,7 @@
{
super.setUp();
- Configuration conf = new ConfigurationImpl();
+ Configuration conf = createBasicConfig();
conf.setSecurityEnabled(false);
conf.setJMXManagementEnabled(true);
conf.getAcceptorConfigurations().add(new
TransportConfiguration(InVMAcceptorFactory.class.getName()));
Modified:
trunk/tests/src/org/hornetq/tests/integration/jms/server/management/JMSServerControl2Test.java
===================================================================
---
trunk/tests/src/org/hornetq/tests/integration/jms/server/management/JMSServerControl2Test.java 2010-12-29
20:51:10 UTC (rev 10088)
+++
trunk/tests/src/org/hornetq/tests/integration/jms/server/management/JMSServerControl2Test.java 2010-12-30
02:44:46 UTC (rev 10089)
@@ -87,7 +87,7 @@
private void startHornetQServer(final String acceptorFactory) throws Exception
{
- Configuration conf = new ConfigurationImpl();
+ Configuration conf = createBasicConfig();
conf.setSecurityEnabled(false);
conf.setJMXManagementEnabled(true);
conf.getAcceptorConfigurations().add(new TransportConfiguration(acceptorFactory));
Modified:
trunk/tests/src/org/hornetq/tests/integration/jms/server/management/JMSServerControlTest.java
===================================================================
---
trunk/tests/src/org/hornetq/tests/integration/jms/server/management/JMSServerControlTest.java 2010-12-29
20:51:10 UTC (rev 10088)
+++
trunk/tests/src/org/hornetq/tests/integration/jms/server/management/JMSServerControlTest.java 2010-12-30
02:44:46 UTC (rev 10089)
@@ -580,7 +580,7 @@
{
super.setUp();
- Configuration conf = new ConfigurationImpl();
+ Configuration conf = createBasicConfig();
conf.setSecurityEnabled(false);
conf.setJMXManagementEnabled(true);
conf.getAcceptorConfigurations().add(new
TransportConfiguration(InVMAcceptorFactory.class.getName()));
@@ -652,7 +652,7 @@
private JMSServerManager startHornetQServer(final int discoveryPort) throws Exception
{
- Configuration conf = new ConfigurationImpl();
+ Configuration conf = createBasicConfig();
conf.setSecurityEnabled(false);
conf.setJMXManagementEnabled(true);
conf.getDiscoveryGroupConfigurations()
Modified:
trunk/tests/src/org/hornetq/tests/integration/jms/server/management/TopicControlTest.java
===================================================================
---
trunk/tests/src/org/hornetq/tests/integration/jms/server/management/TopicControlTest.java 2010-12-29
20:51:10 UTC (rev 10088)
+++
trunk/tests/src/org/hornetq/tests/integration/jms/server/management/TopicControlTest.java 2010-12-30
02:44:46 UTC (rev 10089)
@@ -494,7 +494,7 @@
{
super.setUp();
- Configuration conf = new ConfigurationImpl();
+ Configuration conf = createBasicConfig();
conf.setSecurityEnabled(false);
conf.setJMXManagementEnabled(true);
conf.getAcceptorConfigurations()
Modified:
trunk/tests/src/org/hornetq/tests/integration/jms/server/management/TopicControlUsingJMSTest.java
===================================================================
---
trunk/tests/src/org/hornetq/tests/integration/jms/server/management/TopicControlUsingJMSTest.java 2010-12-29
20:51:10 UTC (rev 10088)
+++
trunk/tests/src/org/hornetq/tests/integration/jms/server/management/TopicControlUsingJMSTest.java 2010-12-30
02:44:46 UTC (rev 10089)
@@ -420,7 +420,7 @@
{
super.setUp();
- Configuration conf = new ConfigurationImpl();
+ Configuration conf = createBasicConfig();
conf.setSecurityEnabled(false);
conf.setJMXManagementEnabled(true);
conf.getAcceptorConfigurations()
Modified: trunk/tests/src/org/hornetq/tests/integration/logging/LogDelegateTest.java
===================================================================
--- trunk/tests/src/org/hornetq/tests/integration/logging/LogDelegateTest.java 2010-12-29
20:51:10 UTC (rev 10088)
+++ trunk/tests/src/org/hornetq/tests/integration/logging/LogDelegateTest.java 2010-12-30
02:44:46 UTC (rev 10089)
@@ -36,7 +36,7 @@
{
public void testConfigureJULViaConfiguration() throws Exception
{
- Configuration config = new ConfigurationImpl();
+ Configuration config = createBasicConfig();
String className = JULLogDelegateFactory.class.getCanonicalName();
@@ -55,7 +55,7 @@
public void testConfigureLog4jViaConfiguration() throws Exception
{
- Configuration config = new ConfigurationImpl();
+ Configuration config = createBasicConfig();
String className = Log4jLogDelegateFactory.class.getCanonicalName();
@@ -105,7 +105,7 @@
public void testDefaultWithConfiguration() throws Exception
{
- Configuration config = new ConfigurationImpl();
+ Configuration config = createBasicConfig();
HornetQServer server = super.createServer(false, config);
@@ -120,7 +120,7 @@
public void testUserDefinedLogger() throws Exception
{
- Configuration config = new ConfigurationImpl();
+ Configuration config = createBasicConfig();
String className = MyLogDelegateFactory.class.getCanonicalName();
Modified:
trunk/tests/src/org/hornetq/tests/integration/management/AcceptorControlTest.java
===================================================================
---
trunk/tests/src/org/hornetq/tests/integration/management/AcceptorControlTest.java 2010-12-29
20:51:10 UTC (rev 10088)
+++
trunk/tests/src/org/hornetq/tests/integration/management/AcceptorControlTest.java 2010-12-30
02:44:46 UTC (rev 10089)
@@ -69,7 +69,7 @@
new
HashMap<String, Object>(),
RandomUtil.randomString());
- Configuration conf = new ConfigurationImpl();
+ Configuration conf = createBasicConfig();
conf.setSecurityEnabled(false);
conf.setJMXManagementEnabled(true);
conf.getAcceptorConfigurations().add(acceptorConfig);
@@ -87,7 +87,7 @@
TransportConfiguration acceptorConfig = new
TransportConfiguration(InVMAcceptorFactory.class.getName(),
new
HashMap<String, Object>(),
RandomUtil.randomString());
- Configuration conf = new ConfigurationImpl();
+ Configuration conf = createBasicConfig();
conf.setSecurityEnabled(false);
conf.setJMXManagementEnabled(true);
conf.getAcceptorConfigurations().add(acceptorConfig);
@@ -147,7 +147,7 @@
TransportConfiguration acceptorConfig = new
TransportConfiguration(InVMAcceptorFactory.class.getName(),
new
HashMap<String, Object>(),
RandomUtil.randomString());
- Configuration conf = new ConfigurationImpl();
+ Configuration conf = createBasicConfig();
conf.setSecurityEnabled(false);
conf.setJMXManagementEnabled(true);
conf.getAcceptorConfigurations().add(acceptorConfig);
Modified:
trunk/tests/src/org/hornetq/tests/integration/management/AddressControlTest.java
===================================================================
---
trunk/tests/src/org/hornetq/tests/integration/management/AddressControlTest.java 2010-12-29
20:51:10 UTC (rev 10088)
+++
trunk/tests/src/org/hornetq/tests/integration/management/AddressControlTest.java 2010-12-30
02:44:46 UTC (rev 10089)
@@ -298,7 +298,7 @@
{
super.setUp();
- Configuration conf = new ConfigurationImpl();
+ Configuration conf = createBasicConfig();
conf.setSecurityEnabled(false);
conf.setJMXManagementEnabled(true);
conf.getAcceptorConfigurations().add(new
TransportConfiguration(InVMAcceptorFactory.class.getName()));
Modified:
trunk/tests/src/org/hornetq/tests/integration/management/AddressControlUsingCoreTest.java
===================================================================
---
trunk/tests/src/org/hornetq/tests/integration/management/AddressControlUsingCoreTest.java 2010-12-29
20:51:10 UTC (rev 10088)
+++
trunk/tests/src/org/hornetq/tests/integration/management/AddressControlUsingCoreTest.java 2010-12-30
02:44:46 UTC (rev 10089)
@@ -180,7 +180,7 @@
{
super.setUp();
- Configuration conf = new ConfigurationImpl();
+ Configuration conf = createBasicConfig();
conf.setSecurityEnabled(false);
conf.setJMXManagementEnabled(true);
conf.getAcceptorConfigurations().add(new
TransportConfiguration(InVMAcceptorFactory.class.getName()));
Modified: trunk/tests/src/org/hornetq/tests/integration/management/BridgeControlTest.java
===================================================================
---
trunk/tests/src/org/hornetq/tests/integration/management/BridgeControlTest.java 2010-12-29
20:51:10 UTC (rev 10088)
+++
trunk/tests/src/org/hornetq/tests/integration/management/BridgeControlTest.java 2010-12-30
02:44:46 UTC (rev 10089)
@@ -177,14 +177,14 @@
ConfigurationImpl.DEFAULT_CLUSTER_USER,
ConfigurationImpl.DEFAULT_CLUSTER_PASSWORD);
- Configuration conf_1 = new ConfigurationImpl();
+ Configuration conf_1 = createBasicConfig();
conf_1.setSecurityEnabled(false);
conf_1.setJMXManagementEnabled(true);
conf_1.setClustered(true);
conf_1.getAcceptorConfigurations().add(acceptorConfig);
conf_1.getQueueConfigurations().add(targetQueueConfig);
- Configuration conf_0 = new ConfigurationImpl();
+ Configuration conf_0 = createBasicConfig();
conf_0.setSecurityEnabled(false);
conf_0.setJMXManagementEnabled(true);
conf_0.setClustered(true);
Modified:
trunk/tests/src/org/hornetq/tests/integration/management/BridgeControlUsingCoreTest.java
===================================================================
---
trunk/tests/src/org/hornetq/tests/integration/management/BridgeControlUsingCoreTest.java 2010-12-29
20:51:10 UTC (rev 10088)
+++
trunk/tests/src/org/hornetq/tests/integration/management/BridgeControlUsingCoreTest.java 2010-12-30
02:44:46 UTC (rev 10089)
@@ -155,14 +155,14 @@
ConfigurationImpl.DEFAULT_CLUSTER_USER,
ConfigurationImpl.DEFAULT_CLUSTER_PASSWORD);
- Configuration conf_1 = new ConfigurationImpl();
+ Configuration conf_1 = createBasicConfig();
conf_1.setSecurityEnabled(false);
conf_1.setJMXManagementEnabled(true);
conf_1.setClustered(true);
conf_1.getAcceptorConfigurations().add(acceptorConfig);
conf_1.getQueueConfigurations().add(targetQueueConfig);
- Configuration conf_0 = new ConfigurationImpl();
+ Configuration conf_0 = createBasicConfig();
conf_0.setSecurityEnabled(false);
conf_0.setJMXManagementEnabled(true);
conf_0.setClustered(true);
Modified:
trunk/tests/src/org/hornetq/tests/integration/management/BroadcastGroupControlTest.java
===================================================================
---
trunk/tests/src/org/hornetq/tests/integration/management/BroadcastGroupControlTest.java 2010-12-29
20:51:10 UTC (rev 10088)
+++
trunk/tests/src/org/hornetq/tests/integration/management/BroadcastGroupControlTest.java 2010-12-30
02:44:46 UTC (rev 10089)
@@ -79,7 +79,7 @@
connectorInfos.add(connectorConfiguration.getName());
BroadcastGroupConfiguration broadcastGroupConfig =
BroadcastGroupControlTest.randomBroadcastGroupConfiguration(connectorInfos);
- Configuration conf = new ConfigurationImpl();
+ Configuration conf = createBasicConfig();
conf.setSecurityEnabled(false);
conf.setJMXManagementEnabled(true);
conf.setClustered(true);
@@ -118,7 +118,7 @@
connectorInfos.add(connectorConfiguration.getName());
BroadcastGroupConfiguration broadcastGroupConfig =
BroadcastGroupControlTest.randomBroadcastGroupConfiguration(connectorInfos);
- Configuration conf = new ConfigurationImpl();
+ Configuration conf = createBasicConfig();
conf.setSecurityEnabled(false);
conf.setJMXManagementEnabled(true);
conf.setClustered(true);
Modified:
trunk/tests/src/org/hornetq/tests/integration/management/ClusterConnectionControl2Test.java
===================================================================
---
trunk/tests/src/org/hornetq/tests/integration/management/ClusterConnectionControl2Test.java 2010-12-29
20:51:10 UTC (rev 10088)
+++
trunk/tests/src/org/hornetq/tests/integration/management/ClusterConnectionControl2Test.java 2010-12-30
02:44:46 UTC (rev 10089)
@@ -155,7 +155,7 @@
0,
0);
- Configuration conf_1 = new ConfigurationImpl();
+ Configuration conf_1 = createBasicConfig();
conf_1.setSecurityEnabled(false);
conf_1.setJMXManagementEnabled(true);
conf_1.setClustered(true);
@@ -165,7 +165,7 @@
conf_1.getDiscoveryGroupConfigurations().put(discoveryName, discoveryGroupConfig);
conf_1.getBroadcastGroupConfigurations().add(broadcastGroupConfig);
- Configuration conf_0 = new ConfigurationImpl();
+ Configuration conf_0 = createBasicConfig();
conf_0.setSecurityEnabled(false);
conf_0.setJMXManagementEnabled(true);
conf_0.setClustered(true);
Modified:
trunk/tests/src/org/hornetq/tests/integration/management/ClusterConnectionControlTest.java
===================================================================
---
trunk/tests/src/org/hornetq/tests/integration/management/ClusterConnectionControlTest.java 2010-12-29
20:51:10 UTC (rev 10088)
+++
trunk/tests/src/org/hornetq/tests/integration/management/ClusterConnectionControlTest.java 2010-12-30
02:44:46 UTC (rev 10089)
@@ -226,14 +226,14 @@
RandomUtil.randomPositiveInt(),
discoveryGroupName);
- Configuration conf_1 = new ConfigurationImpl();
+ Configuration conf_1 = createBasicConfig();
conf_1.setSecurityEnabled(false);
conf_1.setJMXManagementEnabled(true);
conf_1.setClustered(true);
conf_1.getAcceptorConfigurations().add(acceptorConfig);
conf_1.getQueueConfigurations().add(queueConfig);
- Configuration conf_0 = new ConfigurationImpl();
+ Configuration conf_0 = createBasicConfig();
conf_0.setSecurityEnabled(false);
conf_0.setJMXManagementEnabled(true);
conf_0.setClustered(true);
Modified: trunk/tests/src/org/hornetq/tests/integration/management/DivertControlTest.java
===================================================================
---
trunk/tests/src/org/hornetq/tests/integration/management/DivertControlTest.java 2010-12-29
20:51:10 UTC (rev 10088)
+++
trunk/tests/src/org/hornetq/tests/integration/management/DivertControlTest.java 2010-12-30
02:44:46 UTC (rev 10089)
@@ -100,7 +100,7 @@
RandomUtil.randomBoolean(),
null,
null);
- Configuration conf = new ConfigurationImpl();
+ Configuration conf = createBasicConfig();
conf.setSecurityEnabled(false);
conf.setJMXManagementEnabled(true);
conf.setClustered(true);
Modified: trunk/tests/src/org/hornetq/tests/integration/management/JMXDomainTest.java
===================================================================
--- trunk/tests/src/org/hornetq/tests/integration/management/JMXDomainTest.java 2010-12-29
20:51:10 UTC (rev 10088)
+++ trunk/tests/src/org/hornetq/tests/integration/management/JMXDomainTest.java 2010-12-30
02:44:46 UTC (rev 10089)
@@ -53,7 +53,7 @@
String jmxDomain_1 = ConfigurationImpl.DEFAULT_JMX_DOMAIN + ".1";
- Configuration config_1 = new ConfigurationImpl();
+ Configuration config_1 = createBasicConfig();
Map<String, Object> params = new HashMap<String, Object>();
params.put(TransportConstants.SERVER_ID_PROP_NAME, 1);
config_1.getAcceptorConfigurations().add(new
TransportConfiguration(InVMAcceptorFactory.class.getName(), params));
Modified:
trunk/tests/src/org/hornetq/tests/integration/management/ManagementServiceImplTest.java
===================================================================
---
trunk/tests/src/org/hornetq/tests/integration/management/ManagementServiceImplTest.java 2010-12-29
20:51:10 UTC (rev 10088)
+++
trunk/tests/src/org/hornetq/tests/integration/management/ManagementServiceImplTest.java 2010-12-30
02:44:46 UTC (rev 10089)
@@ -59,7 +59,7 @@
String queue = RandomUtil.randomString();
String address = RandomUtil.randomString();
- Configuration conf = new ConfigurationImpl();
+ Configuration conf = createBasicConfig();
conf.setJMXManagementEnabled(false);
HornetQServer server = HornetQServers.newHornetQServer(conf, false);
@@ -78,7 +78,7 @@
public void testHandleManagementMessageWithOperationWhichFails() throws Exception
{
- Configuration conf = new ConfigurationImpl();
+ Configuration conf = createBasicConfig();
conf.setJMXManagementEnabled(false);
HornetQServer server = HornetQServers.newHornetQServer(conf, false);
@@ -97,7 +97,7 @@
public void testHandleManagementMessageWithUnknowResource() throws Exception
{
- Configuration conf = new ConfigurationImpl();
+ Configuration conf = createBasicConfig();
conf.setJMXManagementEnabled(false);
HornetQServer server = HornetQServers.newHornetQServer(conf, false);
@@ -116,7 +116,7 @@
public void testHandleManagementMessageWithUnknownAttribute() throws Exception
{
- Configuration conf = new ConfigurationImpl();
+ Configuration conf = createBasicConfig();
conf.setJMXManagementEnabled(false);
HornetQServer server = HornetQServers.newHornetQServer(conf, false);
@@ -136,7 +136,7 @@
public void testHandleManagementMessageWithKnownAttribute() throws Exception
{
- Configuration conf = new ConfigurationImpl();
+ Configuration conf = createBasicConfig();
conf.setJMXManagementEnabled(false);
HornetQServer server = HornetQServers.newHornetQServer(conf, false);
@@ -156,7 +156,7 @@
public void testGetResources() throws Exception
{
- Configuration conf = new ConfigurationImpl();
+ Configuration conf = createBasicConfig();
conf.setJMXManagementEnabled(false);
ManagementServiceImpl managementService = new ManagementServiceImpl(null, conf);
managementService.setStorageManager(new NullStorageManager());
Modified:
trunk/tests/src/org/hornetq/tests/integration/management/ManagementWithStompTest.java
===================================================================
---
trunk/tests/src/org/hornetq/tests/integration/management/ManagementWithStompTest.java 2010-12-29
20:51:10 UTC (rev 10088)
+++
trunk/tests/src/org/hornetq/tests/integration/management/ManagementWithStompTest.java 2010-12-30
02:44:46 UTC (rev 10089)
@@ -165,7 +165,7 @@
{
super.setUp();
- Configuration conf = new ConfigurationImpl();
+ Configuration conf = createBasicConfig();
conf.setSecurityEnabled(false);
conf.setJMXManagementEnabled(true);
Map<String, Object> params = new HashMap<String, Object>();
Modified: trunk/tests/src/org/hornetq/tests/integration/management/NotificationTest.java
===================================================================
---
trunk/tests/src/org/hornetq/tests/integration/management/NotificationTest.java 2010-12-29
20:51:10 UTC (rev 10088)
+++
trunk/tests/src/org/hornetq/tests/integration/management/NotificationTest.java 2010-12-30
02:44:46 UTC (rev 10089)
@@ -208,7 +208,7 @@
{
super.setUp();
- Configuration conf = new ConfigurationImpl();
+ Configuration conf = createBasicConfig();
conf.setSecurityEnabled(false);
// the notifications are independent of JMX
conf.setJMXManagementEnabled(false);
Modified: trunk/tests/src/org/hornetq/tests/integration/management/QueueControlTest.java
===================================================================
---
trunk/tests/src/org/hornetq/tests/integration/management/QueueControlTest.java 2010-12-29
20:51:10 UTC (rev 10088)
+++
trunk/tests/src/org/hornetq/tests/integration/management/QueueControlTest.java 2010-12-30
02:44:46 UTC (rev 10089)
@@ -1308,7 +1308,7 @@
{
super.setUp();
- Configuration conf = new ConfigurationImpl();
+ Configuration conf = createBasicConfig();
conf.setSecurityEnabled(false);
conf.setJMXManagementEnabled(true);
conf.getAcceptorConfigurations().add(new
TransportConfiguration(InVMAcceptorFactory.class.getName()));
Modified:
trunk/tests/src/org/hornetq/tests/integration/management/SecurityManagementWithConfiguredAdminUserTest.java
===================================================================
---
trunk/tests/src/org/hornetq/tests/integration/management/SecurityManagementWithConfiguredAdminUserTest.java 2010-12-29
20:51:10 UTC (rev 10088)
+++
trunk/tests/src/org/hornetq/tests/integration/management/SecurityManagementWithConfiguredAdminUserTest.java 2010-12-30
02:44:46 UTC (rev 10089)
@@ -85,7 +85,7 @@
@Override
protected HornetQServer setupAndStartHornetQServer() throws Exception
{
- Configuration conf = new ConfigurationImpl();
+ Configuration conf = createBasicConfig();
conf.setSecurityEnabled(true);
conf.getAcceptorConfigurations().add(new
TransportConfiguration(InVMAcceptorFactory.class.getName()));
HornetQServer server = HornetQServers.newHornetQServer(conf, false);
Modified:
trunk/tests/src/org/hornetq/tests/integration/management/SecurityManagementWithDefaultConfigurationTest.java
===================================================================
---
trunk/tests/src/org/hornetq/tests/integration/management/SecurityManagementWithDefaultConfigurationTest.java 2010-12-29
20:51:10 UTC (rev 10088)
+++
trunk/tests/src/org/hornetq/tests/integration/management/SecurityManagementWithDefaultConfigurationTest.java 2010-12-30
02:44:46 UTC (rev 10089)
@@ -62,7 +62,7 @@
@Override
protected HornetQServer setupAndStartHornetQServer() throws Exception
{
- Configuration conf = new ConfigurationImpl();
+ Configuration conf = createBasicConfig();
conf.setSecurityEnabled(true);
conf.getAcceptorConfigurations().add(new
TransportConfiguration(InVMAcceptorFactory.class.getName()));
HornetQServer server = HornetQServers.newHornetQServer(conf, false);
Modified:
trunk/tests/src/org/hornetq/tests/integration/management/SecurityManagementWithModifiedConfigurationTest.java
===================================================================
---
trunk/tests/src/org/hornetq/tests/integration/management/SecurityManagementWithModifiedConfigurationTest.java 2010-12-29
20:51:10 UTC (rev 10088)
+++
trunk/tests/src/org/hornetq/tests/integration/management/SecurityManagementWithModifiedConfigurationTest.java 2010-12-30
02:44:46 UTC (rev 10089)
@@ -68,7 +68,7 @@
@Override
protected HornetQServer setupAndStartHornetQServer() throws Exception
{
- ConfigurationImpl conf = new ConfigurationImpl();
+ ConfigurationImpl conf = createBasicConfig();
conf.setSecurityEnabled(true);
conf.setClusterPassword(configuredClusterPassword);
conf.getAcceptorConfigurations().add(new
TransportConfiguration(InVMAcceptorFactory.class.getName()));
Modified:
trunk/tests/src/org/hornetq/tests/integration/management/SecurityNotificationTest.java
===================================================================
---
trunk/tests/src/org/hornetq/tests/integration/management/SecurityNotificationTest.java 2010-12-29
20:51:10 UTC (rev 10088)
+++
trunk/tests/src/org/hornetq/tests/integration/management/SecurityNotificationTest.java 2010-12-30
02:44:46 UTC (rev 10089)
@@ -138,7 +138,7 @@
{
super.setUp();
- Configuration conf = new ConfigurationImpl();
+ Configuration conf = createBasicConfig();
conf.setSecurityEnabled(true);
// the notifications are independent of JMX
conf.setJMXManagementEnabled(false);
Modified: trunk/tests/src/org/hornetq/tests/integration/remoting/BatchDelayTest.java
===================================================================
--- trunk/tests/src/org/hornetq/tests/integration/remoting/BatchDelayTest.java 2010-12-29
20:51:10 UTC (rev 10088)
+++ trunk/tests/src/org/hornetq/tests/integration/remoting/BatchDelayTest.java 2010-12-30
02:44:46 UTC (rev 10089)
@@ -68,7 +68,7 @@
TransportConfiguration tc = new
TransportConfiguration(NettyAcceptorFactory.class.getName(), params);
- Configuration config = new ConfigurationImpl();
+ Configuration config = createBasicConfig();
config.getAcceptorConfigurations().add(tc);
config.setSecurityEnabled(false);
Modified: trunk/tests/src/org/hornetq/tests/integration/remoting/DirectDeliverTest.java
===================================================================
---
trunk/tests/src/org/hornetq/tests/integration/remoting/DirectDeliverTest.java 2010-12-29
20:51:10 UTC (rev 10088)
+++
trunk/tests/src/org/hornetq/tests/integration/remoting/DirectDeliverTest.java 2010-12-30
02:44:46 UTC (rev 10089)
@@ -78,7 +78,7 @@
TransportConfiguration tc = new
TransportConfiguration(NettyAcceptorFactory.class.getName(), params);
- Configuration config = new ConfigurationImpl();
+ Configuration config = createBasicConfig();
config.getAcceptorConfigurations().add(tc);
config.setSecurityEnabled(false);
Modified:
trunk/tests/src/org/hornetq/tests/integration/security/NettySecurityClientTest.java
===================================================================
---
trunk/tests/src/org/hornetq/tests/integration/security/NettySecurityClientTest.java 2010-12-29
20:51:10 UTC (rev 10088)
+++
trunk/tests/src/org/hornetq/tests/integration/security/NettySecurityClientTest.java 2010-12-30
02:44:46 UTC (rev 10089)
@@ -72,7 +72,7 @@
{
super.setUp();
- ConfigurationImpl config = new ConfigurationImpl();
+ ConfigurationImpl config = createBasicConfig();
config.setSecurityEnabled(false);
config.getAcceptorConfigurations().add(new
TransportConfiguration(NettyAcceptorFactory.class.getName()));
messagingService = HornetQServers.newHornetQServer(config, false);
Modified: trunk/tests/src/org/hornetq/tests/integration/server/ExpiryRunnerTest.java
===================================================================
--- trunk/tests/src/org/hornetq/tests/integration/server/ExpiryRunnerTest.java 2010-12-29
20:51:10 UTC (rev 10088)
+++ trunk/tests/src/org/hornetq/tests/integration/server/ExpiryRunnerTest.java 2010-12-30
02:44:46 UTC (rev 10089)
@@ -248,7 +248,7 @@
{
super.setUp();
- ConfigurationImpl configuration = new ConfigurationImpl();
+ ConfigurationImpl configuration = createBasicConfig();
configuration.setSecurityEnabled(false);
configuration.setMessageExpiryScanPeriod(1000);
TransportConfiguration transportConfig = new
TransportConfiguration(UnitTestCase.INVM_ACCEPTOR_FACTORY);
Modified: trunk/tests/src/org/hornetq/tests/integration/server/LVQTest.java
===================================================================
--- trunk/tests/src/org/hornetq/tests/integration/server/LVQTest.java 2010-12-29 20:51:10
UTC (rev 10088)
+++ trunk/tests/src/org/hornetq/tests/integration/server/LVQTest.java 2010-12-30 02:44:46
UTC (rev 10089)
@@ -589,7 +589,7 @@
{
super.setUp();
- ConfigurationImpl configuration = new ConfigurationImpl();
+ ConfigurationImpl configuration = createBasicConfig();
configuration.setSecurityEnabled(false);
TransportConfiguration transportConfig = new
TransportConfiguration(UnitTestCase.INVM_ACCEPTOR_FACTORY);
configuration.getAcceptorConfigurations().add(transportConfig);
Modified: trunk/tests/src/org/hornetq/tests/integration/ssl/CoreClientOverSSLTest.java
===================================================================
---
trunk/tests/src/org/hornetq/tests/integration/ssl/CoreClientOverSSLTest.java 2010-12-29
20:51:10 UTC (rev 10088)
+++
trunk/tests/src/org/hornetq/tests/integration/ssl/CoreClientOverSSLTest.java 2010-12-30
02:44:46 UTC (rev 10089)
@@ -140,7 +140,7 @@
@Override
protected void setUp() throws Exception
{
- ConfigurationImpl config = new ConfigurationImpl();
+ ConfigurationImpl config = createBasicConfig();
config.setSecurityEnabled(false);
Map<String, Object> params = new HashMap<String, Object>();
params.put(TransportConstants.SSL_ENABLED_PROP_NAME, true);
Modified: trunk/tests/src/org/hornetq/tests/integration/stomp/StompTestBase.java
===================================================================
--- trunk/tests/src/org/hornetq/tests/integration/stomp/StompTestBase.java 2010-12-29
20:51:10 UTC (rev 10088)
+++ trunk/tests/src/org/hornetq/tests/integration/stomp/StompTestBase.java 2010-12-30
02:44:46 UTC (rev 10089)
@@ -108,7 +108,7 @@
*/
protected JMSServerManager createServer() throws Exception
{
- Configuration config = new ConfigurationImpl();
+ Configuration config = createBasicConfig();
config.setSecurityEnabled(false);
config.setPersistenceEnabled(false);
Modified: trunk/tests/src/org/hornetq/tests/integration/stomp/StompWebSocketTest.java
===================================================================
--- trunk/tests/src/org/hornetq/tests/integration/stomp/StompWebSocketTest.java 2010-12-29
20:51:10 UTC (rev 10088)
+++ trunk/tests/src/org/hornetq/tests/integration/stomp/StompWebSocketTest.java 2010-12-30
02:44:46 UTC (rev 10089)
@@ -20,12 +20,9 @@
import java.util.HashMap;
import java.util.Map;
-import junit.framework.TestCase;
-
import org.hornetq.api.core.TransportConfiguration;
import org.hornetq.core.config.Configuration;
import org.hornetq.core.config.CoreQueueConfiguration;
-import org.hornetq.core.config.impl.ConfigurationImpl;
import org.hornetq.core.logging.Logger;
import org.hornetq.core.remoting.impl.invm.InVMAcceptorFactory;
import org.hornetq.core.remoting.impl.netty.NettyAcceptorFactory;
@@ -37,8 +34,9 @@
import org.hornetq.jms.server.config.impl.JMSConfigurationImpl;
import org.hornetq.jms.server.impl.JMSServerManagerImpl;
import org.hornetq.spi.core.protocol.ProtocolType;
+import org.hornetq.tests.util.UnitTestCase;
-public class StompWebSocketTest extends TestCase {
+public class StompWebSocketTest extends UnitTestCase {
private static final transient Logger log =
Logger.getLogger(StompWebSocketTest.class);
private JMSServerManager server;
@@ -64,7 +62,7 @@
*/
private JMSServerManager createServer() throws Exception
{
- Configuration config = new ConfigurationImpl();
+ Configuration config = createBasicConfig();
config.setSecurityEnabled(false);
config.setPersistenceEnabled(false);
Modified: trunk/tests/src/org/hornetq/tests/integration/xa/XaTimeoutTest.java
===================================================================
--- trunk/tests/src/org/hornetq/tests/integration/xa/XaTimeoutTest.java 2010-12-29
20:51:10 UTC (rev 10088)
+++ trunk/tests/src/org/hornetq/tests/integration/xa/XaTimeoutTest.java 2010-12-30
02:44:46 UTC (rev 10089)
@@ -71,7 +71,7 @@
super.setUp();
addressSettings.clear();
- configuration = new ConfigurationImpl();
+ configuration = createBasicConfig();
configuration.setSecurityEnabled(false);
configuration.setTransactionTimeoutScanPeriod(500);
TransportConfiguration transportConfig = new
TransportConfiguration(UnitTestCase.INVM_ACCEPTOR_FACTORY);
Modified: trunk/tests/src/org/hornetq/tests/stress/stomp/StompStressTest.java
===================================================================
--- trunk/tests/src/org/hornetq/tests/stress/stomp/StompStressTest.java 2010-12-29
20:51:10 UTC (rev 10088)
+++ trunk/tests/src/org/hornetq/tests/stress/stomp/StompStressTest.java 2010-12-30
02:44:46 UTC (rev 10089)
@@ -99,7 +99,7 @@
private HornetQServer createServer() throws Exception
{
- Configuration config = new ConfigurationImpl();
+ Configuration config = createBasicConfig();
config.setSecurityEnabled(false);
config.setPersistenceEnabled(false);
Modified: trunk/tests/src/org/hornetq/tests/timing/jms/bridge/impl/JMSBridgeImplTest.java
===================================================================
---
trunk/tests/src/org/hornetq/tests/timing/jms/bridge/impl/JMSBridgeImplTest.java 2010-12-29
20:51:10 UTC (rev 10088)
+++
trunk/tests/src/org/hornetq/tests/timing/jms/bridge/impl/JMSBridgeImplTest.java 2010-12-30
02:44:46 UTC (rev 10089)
@@ -527,7 +527,7 @@
{
super.setUp();
- Configuration config = new ConfigurationImpl();
+ Configuration config = createBasicConfig();
config.setFileDeploymentEnabled(false);
config.setSecurityEnabled(false);
config.getAcceptorConfigurations().add(new
TransportConfiguration(InVMAcceptorFactory.class.getName()));
Modified: trunk/tests/src/org/hornetq/tests/unit/jms/misc/ManifestTest.java
===================================================================
--- trunk/tests/src/org/hornetq/tests/unit/jms/misc/ManifestTest.java 2010-12-29 20:51:10
UTC (rev 10088)
+++ trunk/tests/src/org/hornetq/tests/unit/jms/misc/ManifestTest.java 2010-12-30 02:44:46
UTC (rev 10089)
@@ -67,7 +67,7 @@
try
{
- HornetQServer server = HornetQServers.newHornetQServer(new
ConfigurationImpl());
+ HornetQServer server = HornetQServers.newHornetQServer(createBasicConfig());
ConnectionMetaData meta = new HornetQConnectionMetaData(server.getVersion());
Modified: trunk/tests/src/org/hornetq/tests/util/ServiceTestBase.java
===================================================================
--- trunk/tests/src/org/hornetq/tests/util/ServiceTestBase.java 2010-12-29 20:51:10 UTC
(rev 10088)
+++ trunk/tests/src/org/hornetq/tests/util/ServiceTestBase.java 2010-12-30 02:44:46 UTC
(rev 10089)
@@ -348,93 +348,6 @@
new HashMap<String, AddressSettings>());
}
}
-
- protected Configuration createDefaultConfig()
- {
- return createDefaultConfig(false);
- }
-
- protected Configuration createDefaultConfig(final boolean netty)
- {
- if (netty)
- {
- return createDefaultConfig(new HashMap<String, Object>(),
- INVM_ACCEPTOR_FACTORY,
- NETTY_ACCEPTOR_FACTORY);
- }
- else
- {
- return createDefaultConfig(new HashMap<String, Object>(),
INVM_ACCEPTOR_FACTORY);
- }
- }
-
- protected Configuration createClusteredDefaultConfig(final int index,
- final Map<String, Object>
params,
- final String... acceptors)
- {
- Configuration config = createDefaultConfig(index, params, acceptors);
-
- config.setClustered(true);
-
- return config;
- }
-
- protected Configuration createDefaultConfig(final int index,
- final Map<String, Object> params,
- final String... acceptors)
- {
- Configuration configuration = new ConfigurationImpl();
- configuration.setSecurityEnabled(false);
- configuration.setBindingsDirectory(getBindingsDir(index, false));
- configuration.setJournalMinFiles(2);
- configuration.setJournalDirectory(getJournalDir(index, false));
- configuration.setJournalFileSize(100 * 1024);
- configuration.setJournalType(getDefaultJournalType());
- configuration.setPagingDirectory(getPageDir(index, false));
- configuration.setLargeMessagesDirectory(getLargeMessagesDir(index, false));
- configuration.setJournalCompactMinFiles(0);
- configuration.setJournalCompactPercentage(0);
-
- configuration.getAcceptorConfigurations().clear();
-
- for (String acceptor : acceptors)
- {
- TransportConfiguration transportConfig = new TransportConfiguration(acceptor,
params);
- configuration.getAcceptorConfigurations().add(transportConfig);
- }
-
- return configuration;
- }
-
- protected static Configuration createDefaultConfig(final Map<String, Object>
params, final String... acceptors)
- {
- Configuration configuration = new ConfigurationImpl();
- configuration.setSecurityEnabled(false);
- configuration.setJMXManagementEnabled(false);
- configuration.setBindingsDirectory(getBindingsDir());
- configuration.setJournalMinFiles(2);
- configuration.setJournalDirectory(getJournalDir());
- configuration.setJournalFileSize(100 * 1024);
- configuration.setPagingDirectory(getPageDir());
- configuration.setLargeMessagesDirectory(getLargeMessagesDir());
- configuration.setJournalCompactMinFiles(0);
- configuration.setJournalCompactPercentage(0);
-
- configuration.setFileDeploymentEnabled(false);
-
- configuration.setJournalType(getDefaultJournalType());
-
- configuration.getAcceptorConfigurations().clear();
-
- for (String acceptor : acceptors)
- {
- TransportConfiguration transportConfig = new TransportConfiguration(acceptor,
params);
- configuration.getAcceptorConfigurations().add(transportConfig);
- }
-
- return configuration;
- }
-
protected ServerLocator createFactory(final boolean isNetty) throws Exception
{
if (isNetty)
Modified: trunk/tests/src/org/hornetq/tests/util/UnitTestCase.java
===================================================================
--- trunk/tests/src/org/hornetq/tests/util/UnitTestCase.java 2010-12-29 20:51:10 UTC (rev
10088)
+++ trunk/tests/src/org/hornetq/tests/util/UnitTestCase.java 2010-12-30 02:44:46 UTC (rev
10089)
@@ -31,6 +31,7 @@
import java.net.ServerSocket;
import java.nio.ByteBuffer;
import java.util.ArrayList;
+import java.util.HashMap;
import java.util.HashSet;
import java.util.Iterator;
import java.util.List;
@@ -53,6 +54,8 @@
import org.hornetq.api.core.client.ClientMessage;
import org.hornetq.api.core.client.ClientSession;
import org.hornetq.core.asyncio.impl.AsynchronousFileImpl;
+import org.hornetq.core.config.Configuration;
+import org.hornetq.core.config.impl.ConfigurationImpl;
import org.hornetq.core.journal.impl.AIOSequentialFileFactory;
import org.hornetq.core.logging.Logger;
import org.hornetq.core.persistence.impl.journal.OperationContextImpl;
@@ -104,6 +107,109 @@
// Static --------------------------------------------------------
+ protected Configuration createDefaultConfig()
+ {
+ return createDefaultConfig(false);
+ }
+
+ protected Configuration createDefaultConfig(final boolean netty)
+ {
+ if (netty)
+ {
+ return createDefaultConfig(new HashMap<String, Object>(),
+ INVM_ACCEPTOR_FACTORY,
+ NETTY_ACCEPTOR_FACTORY);
+ }
+ else
+ {
+ return createDefaultConfig(new HashMap<String, Object>(),
INVM_ACCEPTOR_FACTORY);
+ }
+ }
+
+ protected static Configuration createClusteredDefaultConfig(final int index,
+ final Map<String, Object>
params,
+ final String... acceptors)
+ {
+ Configuration config = createDefaultConfig(index, params, acceptors);
+
+ config.setClustered(true);
+
+ return config;
+ }
+
+ protected static Configuration createDefaultConfig(final int index,
+ final Map<String, Object> params,
+ final String... acceptors)
+ {
+ Configuration configuration = createBasicConfig(index);
+
+ configuration.getAcceptorConfigurations().clear();
+
+ for (String acceptor : acceptors)
+ {
+ TransportConfiguration transportConfig = new TransportConfiguration(acceptor,
params);
+ configuration.getAcceptorConfigurations().add(transportConfig);
+ }
+
+ return configuration;
+ }
+
+ protected static ConfigurationImpl createBasicConfig()
+ {
+ return createBasicConfig(0);
+ }
+
+
+ /**
+ * @param serverID
+ * @return
+ */
+ protected static ConfigurationImpl createBasicConfig(final int serverID)
+ {
+ ConfigurationImpl configuration = new ConfigurationImpl();
+ configuration.setSecurityEnabled(false);
+ configuration.setBindingsDirectory(getBindingsDir(serverID, false));
+ configuration.setJournalMinFiles(2);
+ configuration.setJournalDirectory(getJournalDir(serverID, false));
+ configuration.setJournalFileSize(100 * 1024);
+ configuration.setJournalType(getDefaultJournalType());
+ configuration.setPagingDirectory(getPageDir(serverID, false));
+ configuration.setLargeMessagesDirectory(getLargeMessagesDir(serverID, false));
+ configuration.setJournalCompactMinFiles(0);
+ configuration.setJournalCompactPercentage(0);
+ return configuration;
+ }
+
+ protected static Configuration createDefaultConfig(final Map<String, Object>
params, final String... acceptors)
+ {
+ Configuration configuration = new ConfigurationImpl();
+ configuration.setSecurityEnabled(false);
+ configuration.setJMXManagementEnabled(false);
+ configuration.setBindingsDirectory(getBindingsDir());
+ configuration.setJournalMinFiles(2);
+ configuration.setJournalDirectory(getJournalDir());
+ configuration.setJournalFileSize(100 * 1024);
+ configuration.setPagingDirectory(getPageDir());
+ configuration.setLargeMessagesDirectory(getLargeMessagesDir());
+ configuration.setJournalCompactMinFiles(0);
+ configuration.setJournalCompactPercentage(0);
+
+ configuration.setFileDeploymentEnabled(false);
+
+ configuration.setJournalType(getDefaultJournalType());
+
+ configuration.getAcceptorConfigurations().clear();
+
+ for (String acceptor : acceptors)
+ {
+ TransportConfiguration transportConfig = new TransportConfiguration(acceptor,
params);
+ configuration.getAcceptorConfigurations().add(transportConfig);
+ }
+
+ return configuration;
+ }
+
+
protected static String getUDPDiscoveryAddress()
{
return System.getProperty("TEST-UDP-ADDRESS", "230.1.2.3");
@@ -532,7 +638,7 @@
/**
* @return the bindingsDir
*/
- protected String getBindingsDir(final int index, final boolean backup)
+ protected static String getBindingsDir(final int index, final boolean backup)
{
return getBindingsDir(testDir) + index + "-" + (backup ? "B" :
"L");
}
@@ -553,7 +659,7 @@
return testDir + "/page";
}
- protected String getPageDir(final int index, final boolean backup)
+ protected static String getPageDir(final int index, final boolean backup)
{
return getPageDir(testDir) + index + "-" + (backup ? "B" :
"L");
}