Author: borges
Date: 2011-05-26 12:18:41 -0400 (Thu, 26 May 2011)
New Revision: 10743
Modified:
trunk/tests/unit-tests/src/test/java/org/hornetq/tests/unit/core/config/impl/ConfigurationImplTest.java
trunk/tests/unit-tests/src/test/java/org/hornetq/tests/unit/core/config/impl/DefaultsFileConfigurationTest.java
trunk/tests/unit-tests/src/test/java/org/hornetq/tests/util/ServiceTestBase.java
Log:
HORNETQ-698 Fix more references to JournalConstants
Modified:
trunk/tests/unit-tests/src/test/java/org/hornetq/tests/unit/core/config/impl/ConfigurationImplTest.java
===================================================================
---
trunk/tests/unit-tests/src/test/java/org/hornetq/tests/unit/core/config/impl/ConfigurationImplTest.java 2011-05-26
15:38:46 UTC (rev 10742)
+++
trunk/tests/unit-tests/src/test/java/org/hornetq/tests/unit/core/config/impl/ConfigurationImplTest.java 2011-05-26
16:18:41 UTC (rev 10743)
@@ -23,14 +23,15 @@
import org.hornetq.api.core.SimpleString;
import org.hornetq.core.config.Configuration;
import org.hornetq.core.config.impl.ConfigurationImpl;
+import org.hornetq.core.journal.impl.JournalConstants;
import org.hornetq.core.server.JournalType;
import org.hornetq.tests.util.RandomUtil;
import org.hornetq.tests.util.UnitTestCase;
/**
- *
+ *
* A ConfigurationImplTest
- *
+ *
* @author <a href="mailto:tim.fox@jboss.com">Tim Fox</a>
*
*/
@@ -87,10 +88,10 @@
Assert.assertEquals(ConfigurationImpl.DEFAULT_PAGING_DIR,
conf.getPagingDirectory());
Assert.assertEquals(ConfigurationImpl.DEFAULT_LARGE_MESSAGES_DIR,
conf.getLargeMessagesDirectory());
Assert.assertEquals(ConfigurationImpl.DEFAULT_JOURNAL_COMPACT_PERCENTAGE,
conf.getJournalCompactPercentage());
- Assert.assertEquals(ConfigurationImpl.DEFAULT_JOURNAL_BUFFER_TIMEOUT_AIO,
conf.getJournalBufferTimeout_AIO());
- Assert.assertEquals(ConfigurationImpl.DEFAULT_JOURNAL_BUFFER_TIMEOUT_NIO,
conf.getJournalBufferTimeout_NIO());
- Assert.assertEquals(ConfigurationImpl.DEFAULT_JOURNAL_BUFFER_SIZE_AIO,
conf.getJournalBufferSize_AIO());
- Assert.assertEquals(ConfigurationImpl.DEFAULT_JOURNAL_BUFFER_SIZE_NIO,
conf.getJournalBufferSize_NIO());
+ Assert.assertEquals(JournalConstants.DEFAULT_JOURNAL_BUFFER_TIMEOUT_AIO,
conf.getJournalBufferTimeout_AIO());
+ Assert.assertEquals(JournalConstants.DEFAULT_JOURNAL_BUFFER_TIMEOUT_NIO,
conf.getJournalBufferTimeout_NIO());
+ Assert.assertEquals(JournalConstants.DEFAULT_JOURNAL_BUFFER_SIZE_AIO,
conf.getJournalBufferSize_AIO());
+ Assert.assertEquals(JournalConstants.DEFAULT_JOURNAL_BUFFER_SIZE_NIO,
conf.getJournalBufferSize_NIO());
Assert.assertEquals(ConfigurationImpl.DEFAULT_JOURNAL_LOG_WRITE_RATE,
conf.isLogJournalWriteRate());
Assert.assertEquals(ConfigurationImpl.DEFAULT_JOURNAL_PERF_BLAST_PAGES,
conf.getJournalPerfBlastPages());
Assert.assertEquals(ConfigurationImpl.DEFAULT_MESSAGE_COUNTER_ENABLED,
conf.isMessageCounterEnabled());
Modified:
trunk/tests/unit-tests/src/test/java/org/hornetq/tests/unit/core/config/impl/DefaultsFileConfigurationTest.java
===================================================================
---
trunk/tests/unit-tests/src/test/java/org/hornetq/tests/unit/core/config/impl/DefaultsFileConfigurationTest.java 2011-05-26
15:38:46 UTC (rev 10742)
+++
trunk/tests/unit-tests/src/test/java/org/hornetq/tests/unit/core/config/impl/DefaultsFileConfigurationTest.java 2011-05-26
16:18:41 UTC (rev 10743)
@@ -20,11 +20,12 @@
import org.hornetq.core.config.Configuration;
import org.hornetq.core.config.impl.ConfigurationImpl;
import org.hornetq.core.config.impl.FileConfiguration;
+import org.hornetq.core.journal.impl.JournalConstants;
/**
- *
+ *
* A DefaultsFileConfigurationTest
- *
+ *
* @author <a href="mailto:tim.fox@jboss.com">Tim Fox</a>
* @author <a href="jmesnil(a)redhat.com">Jeff Mesnil</a>
*
@@ -109,15 +110,15 @@
Assert.assertEquals(ConfigurationImpl.DEFAULT_JOURNAL_MAX_IO_AIO,
conf.getJournalMaxIO_AIO());
- Assert.assertEquals(ConfigurationImpl.DEFAULT_JOURNAL_BUFFER_TIMEOUT_AIO,
conf.getJournalBufferTimeout_AIO());
+ Assert.assertEquals(ConfigurationImpl.DEFAULT_JOURNAL_MAX_IO_NIO,
conf.getJournalMaxIO_NIO());
- Assert.assertEquals(ConfigurationImpl.DEFAULT_JOURNAL_BUFFER_SIZE_AIO,
conf.getJournalBufferSize_AIO());
+ Assert.assertEquals(JournalConstants.DEFAULT_JOURNAL_BUFFER_TIMEOUT_AIO,
conf.getJournalBufferTimeout_AIO());
- Assert.assertEquals(ConfigurationImpl.DEFAULT_JOURNAL_MAX_IO_NIO,
conf.getJournalMaxIO_NIO());
+ Assert.assertEquals(JournalConstants.DEFAULT_JOURNAL_BUFFER_SIZE_AIO,
conf.getJournalBufferSize_AIO());
- Assert.assertEquals(ConfigurationImpl.DEFAULT_JOURNAL_BUFFER_TIMEOUT_NIO,
conf.getJournalBufferTimeout_NIO());
+ Assert.assertEquals(JournalConstants.DEFAULT_JOURNAL_BUFFER_TIMEOUT_NIO,
conf.getJournalBufferTimeout_NIO());
- Assert.assertEquals(ConfigurationImpl.DEFAULT_JOURNAL_BUFFER_SIZE_NIO,
conf.getJournalBufferSize_NIO());
+ Assert.assertEquals(JournalConstants.DEFAULT_JOURNAL_BUFFER_SIZE_NIO,
conf.getJournalBufferSize_NIO());
Assert.assertEquals(ConfigurationImpl.DEFAULT_CREATE_BINDINGS_DIR,
conf.isCreateBindingsDir());
Modified:
trunk/tests/unit-tests/src/test/java/org/hornetq/tests/util/ServiceTestBase.java
===================================================================
---
trunk/tests/unit-tests/src/test/java/org/hornetq/tests/util/ServiceTestBase.java 2011-05-26
15:38:46 UTC (rev 10742)
+++
trunk/tests/unit-tests/src/test/java/org/hornetq/tests/util/ServiceTestBase.java 2011-05-26
16:18:41 UTC (rev 10743)
@@ -50,9 +50,9 @@
import org.hornetq.spi.core.security.HornetQSecurityManagerImpl;
/**
- *
+ *
* Base class with basic utilities on starting up a basic server
- *
+ *
* @author <a href="mailto:clebert.suconic@jboss.com">Clebert
Suconic</a>
*
*/
@@ -71,7 +71,7 @@
protected static final String NETTY_CONNECTOR_FACTORY =
NettyConnectorFactory.class.getCanonicalName();
- private List<ServerLocator> locators = new ArrayList<ServerLocator>();
+ private final List<ServerLocator> locators = new
ArrayList<ServerLocator>();
@Override
protected void tearDown() throws Exception
@@ -115,9 +115,9 @@
return params;
}
- protected static TransportConfiguration createTransportConfiguration(boolean netty,
- boolean
acceptor,
- Map<String,
Object> params)
+ protected static TransportConfiguration createTransportConfiguration(final boolean
netty,
+ final boolean
acceptor,
+ final
Map<String, Object> params)
{
String className;
if (netty)
@@ -206,7 +206,7 @@
{
return createServer(realFiles, configuration, pageSize, maxAddressSize,
AddressFullMessagePolicy.PAGE, settings);
}
-
+
protected HornetQServer createServer(final boolean realFiles,
final Configuration configuration,
final int pageSize,
@@ -284,7 +284,7 @@
protected HornetQServer createInVMFailoverServer(final boolean realFiles,
final Configuration configuration,
- NodeManager nodeManager)
+ final NodeManager nodeManager)
{
return createInVMFailoverServer(realFiles,
configuration,
@@ -299,7 +299,7 @@
final int pageSize,
final int maxAddressSize,
final Map<String,
AddressSettings> settings,
- NodeManager nodeManager)
+ final NodeManager nodeManager)
{
HornetQServer server;
HornetQSecurityManager securityManager = new HornetQSecurityManagerImpl();
@@ -417,7 +417,7 @@
}
}
- protected void createQueue(String address, String queue) throws Exception
+ protected void createQueue(final String address, final String queue) throws Exception
{
ServerLocator locator = createInVMNonHALocator();
ClientSessionFactory sf = locator.createSessionFactory();
@@ -440,8 +440,9 @@
protected ServerLocator createNonHALocator(final boolean isNetty)
{
- ServerLocator locatorWithoutHA = isNetty ?
HornetQClient.createServerLocatorWithoutHA(new
TransportConfiguration(NETTY_CONNECTOR_FACTORY))
- :
HornetQClient.createServerLocatorWithoutHA(new
TransportConfiguration(INVM_CONNECTOR_FACTORY));
+ ServerLocator locatorWithoutHA =
+ isNetty ? HornetQClient.createServerLocatorWithoutHA(new
TransportConfiguration(NETTY_CONNECTOR_FACTORY))
+ : HornetQClient.createServerLocatorWithoutHA(new
TransportConfiguration(INVM_CONNECTOR_FACTORY));
locators.add(locatorWithoutHA);
return locatorWithoutHA;
}
@@ -487,7 +488,8 @@
}
/**
- * Deleting a file on LargeDire is an asynchronous process. Wee need to keep looking
for a while if the file hasn't been deleted yet
+ * Deleting a file on LargeDire is an asynchronous process. Wee need to keep looking
for a while
+ * if the file hasn't been deleted yet
*/
protected void validateNoFilesOnLargeDir(final int expect) throws Exception
{
@@ -499,8 +501,8 @@
{
Thread.sleep(100);
}
-
-
+
+
if (expect != largeMessagesFileDir.listFiles().length)
{
for (File file : largeMessagesFileDir.listFiles())
@@ -513,7 +515,8 @@
}
/**
- * Deleting a file on LargeDire is an asynchronous process. Wee need to keep looking
for a while if the file hasn't been deleted yet
+ * Deleting a file on LargeDire is an asynchronous process. Wee need to keep looking
for a while
+ * if the file hasn't been deleted yet
*/
protected void validateNoFilesOnLargeDir() throws Exception
{
@@ -527,43 +530,45 @@
{
final NodeManager nodeManager;
- public InVMNodeManagerServer(NodeManager nodeManager)
+ public InVMNodeManagerServer(final NodeManager nodeManager)
{
super();
this.nodeManager = nodeManager;
}
- public InVMNodeManagerServer(Configuration configuration, NodeManager nodeManager)
+ public InVMNodeManagerServer(final Configuration configuration, final NodeManager
nodeManager)
{
super(configuration);
this.nodeManager = nodeManager;
}
- public InVMNodeManagerServer(Configuration configuration, MBeanServer mbeanServer,
NodeManager nodeManager)
+ public InVMNodeManagerServer(final Configuration configuration,
+ final MBeanServer mbeanServer,
+ final NodeManager nodeManager)
{
super(configuration, mbeanServer);
this.nodeManager = nodeManager;
}
- public InVMNodeManagerServer(Configuration configuration,
- HornetQSecurityManager securityManager,
- NodeManager nodeManager)
+ public InVMNodeManagerServer(final Configuration configuration,
+ final HornetQSecurityManager securityManager,
+ final NodeManager nodeManager)
{
super(configuration, securityManager);
this.nodeManager = nodeManager;
}
- public InVMNodeManagerServer(Configuration configuration,
- MBeanServer mbeanServer,
- HornetQSecurityManager securityManager,
- NodeManager nodeManager)
+ public InVMNodeManagerServer(final Configuration configuration,
+ final MBeanServer mbeanServer,
+ final HornetQSecurityManager securityManager,
+ final NodeManager nodeManager)
{
super(configuration, mbeanServer, securityManager);
this.nodeManager = nodeManager;
}
@Override
- protected NodeManager createNodeManager(String directory)
+ protected NodeManager createNodeManager(final String directory)
{
return nodeManager;
}