Author: clebert.suconic(a)jboss.com
Date: 2011-04-13 16:57:56 -0400 (Wed, 13 Apr 2011)
New Revision: 10502
Modified:
branches/Branch_2_2_EAP/tests/src/org/hornetq/tests/unit/ra/ResourceAdapterTest.java
Log:
fixing testcase
Modified:
branches/Branch_2_2_EAP/tests/src/org/hornetq/tests/unit/ra/ResourceAdapterTest.java
===================================================================
---
branches/Branch_2_2_EAP/tests/src/org/hornetq/tests/unit/ra/ResourceAdapterTest.java 2011-04-13
18:00:12 UTC (rev 10501)
+++
branches/Branch_2_2_EAP/tests/src/org/hornetq/tests/unit/ra/ResourceAdapterTest.java 2011-04-13
20:57:56 UTC (rev 10502)
@@ -78,8 +78,7 @@
ra.setConnectorClassName(InVMConnector.class.getName());
HornetQConnectionFactory factory = ra.getDefaultHornetQConnectionFactory();
Assert.assertEquals(factory.getCallTimeout(), HornetQClient.DEFAULT_CALL_TIMEOUT);
- Assert.assertEquals(factory.getClientFailureCheckPeriod(),
- HornetQClient.DEFAULT_CLIENT_FAILURE_CHECK_PERIOD);
+ Assert.assertEquals(factory.getClientFailureCheckPeriod(),
HornetQClient.DEFAULT_CLIENT_FAILURE_CHECK_PERIOD);
Assert.assertEquals(factory.getClientID(), null);
Assert.assertEquals(factory.getConnectionLoadBalancingPolicyClassName(),
HornetQClient.DEFAULT_CONNECTION_LOAD_BALANCING_POLICY_CLASS_NAME);
@@ -89,21 +88,17 @@
Assert.assertEquals(factory.getDupsOKBatchSize(),
HornetQClient.DEFAULT_ACK_BATCH_SIZE);
Assert.assertEquals(factory.getMinLargeMessageSize(),
HornetQClient.DEFAULT_MIN_LARGE_MESSAGE_SIZE);
Assert.assertEquals(factory.getProducerMaxRate(),
HornetQClient.DEFAULT_PRODUCER_MAX_RATE);
- Assert.assertEquals(factory.getConfirmationWindowSize(),
- HornetQClient.DEFAULT_CONFIRMATION_WINDOW_SIZE);
+ Assert.assertEquals(factory.getConfirmationWindowSize(),
HornetQClient.DEFAULT_CONFIRMATION_WINDOW_SIZE);
// by default, reconnect attempts is set to -1
Assert.assertEquals(-1, factory.getReconnectAttempts());
Assert.assertEquals(factory.getRetryInterval(),
HornetQClient.DEFAULT_RETRY_INTERVAL);
- Assert.assertEquals(factory.getRetryIntervalMultiplier(),
- HornetQClient.DEFAULT_RETRY_INTERVAL_MULTIPLIER);
- Assert.assertEquals(factory.getScheduledThreadPoolMaxSize(),
- HornetQClient.DEFAULT_SCHEDULED_THREAD_POOL_MAX_SIZE);
+ Assert.assertEquals(factory.getRetryIntervalMultiplier(),
HornetQClient.DEFAULT_RETRY_INTERVAL_MULTIPLIER);
+ Assert.assertEquals(factory.getScheduledThreadPoolMaxSize(),
HornetQClient.DEFAULT_SCHEDULED_THREAD_POOL_MAX_SIZE);
Assert.assertEquals(factory.getThreadPoolMaxSize(),
HornetQClient.DEFAULT_THREAD_POOL_MAX_SIZE);
Assert.assertEquals(factory.getTransactionBatchSize(),
HornetQClient.DEFAULT_ACK_BATCH_SIZE);
Assert.assertEquals(factory.isAutoGroup(), HornetQClient.DEFAULT_AUTO_GROUP);
Assert.assertEquals(factory.isBlockOnAcknowledge(),
HornetQClient.DEFAULT_BLOCK_ON_ACKNOWLEDGE);
- Assert.assertEquals(factory.isBlockOnNonDurableSend(),
- HornetQClient.DEFAULT_BLOCK_ON_NON_DURABLE_SEND);
+ Assert.assertEquals(factory.isBlockOnNonDurableSend(),
HornetQClient.DEFAULT_BLOCK_ON_NON_DURABLE_SEND);
Assert.assertEquals(factory.isBlockOnDurableSend(),
HornetQClient.DEFAULT_BLOCK_ON_DURABLE_SEND);
Assert.assertEquals(factory.isPreAcknowledge(),
HornetQClient.DEFAULT_PRE_ACKNOWLEDGE);
Assert.assertEquals(factory.isUseGlobalPools(),
HornetQClient.DEFAULT_USE_GLOBAL_POOLS);
@@ -124,8 +119,7 @@
ra.setConnectorClassName(InVMConnector.class.getName());
HornetQConnectionFactory factory = ra.createHornetQConnectionFactory(new
ConnectionFactoryProperties());
Assert.assertEquals(factory.getCallTimeout(), HornetQClient.DEFAULT_CALL_TIMEOUT);
- Assert.assertEquals(factory.getClientFailureCheckPeriod(),
- HornetQClient.DEFAULT_CLIENT_FAILURE_CHECK_PERIOD);
+ Assert.assertEquals(factory.getClientFailureCheckPeriod(),
HornetQClient.DEFAULT_CLIENT_FAILURE_CHECK_PERIOD);
Assert.assertEquals(factory.getClientID(), null);
Assert.assertEquals(factory.getConnectionLoadBalancingPolicyClassName(),
HornetQClient.DEFAULT_CONNECTION_LOAD_BALANCING_POLICY_CLASS_NAME);
@@ -135,21 +129,17 @@
Assert.assertEquals(factory.getDupsOKBatchSize(),
HornetQClient.DEFAULT_ACK_BATCH_SIZE);
Assert.assertEquals(factory.getMinLargeMessageSize(),
HornetQClient.DEFAULT_MIN_LARGE_MESSAGE_SIZE);
Assert.assertEquals(factory.getProducerMaxRate(),
HornetQClient.DEFAULT_PRODUCER_MAX_RATE);
- Assert.assertEquals(factory.getConfirmationWindowSize(),
- HornetQClient.DEFAULT_CONFIRMATION_WINDOW_SIZE);
+ Assert.assertEquals(factory.getConfirmationWindowSize(),
HornetQClient.DEFAULT_CONFIRMATION_WINDOW_SIZE);
// by default, reconnect attempts is set to -1
Assert.assertEquals(-1, factory.getReconnectAttempts());
Assert.assertEquals(factory.getRetryInterval(),
HornetQClient.DEFAULT_RETRY_INTERVAL);
- Assert.assertEquals(factory.getRetryIntervalMultiplier(),
- HornetQClient.DEFAULT_RETRY_INTERVAL_MULTIPLIER);
- Assert.assertEquals(factory.getScheduledThreadPoolMaxSize(),
- HornetQClient.DEFAULT_SCHEDULED_THREAD_POOL_MAX_SIZE);
+ Assert.assertEquals(factory.getRetryIntervalMultiplier(),
HornetQClient.DEFAULT_RETRY_INTERVAL_MULTIPLIER);
+ Assert.assertEquals(factory.getScheduledThreadPoolMaxSize(),
HornetQClient.DEFAULT_SCHEDULED_THREAD_POOL_MAX_SIZE);
Assert.assertEquals(factory.getThreadPoolMaxSize(),
HornetQClient.DEFAULT_THREAD_POOL_MAX_SIZE);
Assert.assertEquals(factory.getTransactionBatchSize(),
HornetQClient.DEFAULT_ACK_BATCH_SIZE);
Assert.assertEquals(factory.isAutoGroup(), HornetQClient.DEFAULT_AUTO_GROUP);
Assert.assertEquals(factory.isBlockOnAcknowledge(),
HornetQClient.DEFAULT_BLOCK_ON_ACKNOWLEDGE);
- Assert.assertEquals(factory.isBlockOnNonDurableSend(),
- HornetQClient.DEFAULT_BLOCK_ON_NON_DURABLE_SEND);
+ Assert.assertEquals(factory.isBlockOnNonDurableSend(),
HornetQClient.DEFAULT_BLOCK_ON_NON_DURABLE_SEND);
Assert.assertEquals(factory.isBlockOnDurableSend(),
HornetQClient.DEFAULT_BLOCK_ON_DURABLE_SEND);
Assert.assertEquals(factory.isPreAcknowledge(),
HornetQClient.DEFAULT_PRE_ACKNOWLEDGE);
Assert.assertEquals(factory.isUseGlobalPools(),
HornetQClient.DEFAULT_USE_GLOBAL_POOLS);
@@ -204,8 +194,7 @@
Assert.assertEquals(factory.getTransactionBatchSize(), 18);
Assert.assertEquals(factory.isAutoGroup(), !HornetQClient.DEFAULT_AUTO_GROUP);
Assert.assertEquals(factory.isBlockOnAcknowledge(),
!HornetQClient.DEFAULT_BLOCK_ON_ACKNOWLEDGE);
- Assert.assertEquals(factory.isBlockOnNonDurableSend(),
- !HornetQClient.DEFAULT_BLOCK_ON_NON_DURABLE_SEND);
+ Assert.assertEquals(factory.isBlockOnNonDurableSend(),
!HornetQClient.DEFAULT_BLOCK_ON_NON_DURABLE_SEND);
Assert.assertEquals(factory.isBlockOnDurableSend(),
!HornetQClient.DEFAULT_BLOCK_ON_DURABLE_SEND);
Assert.assertEquals(factory.isPreAcknowledge(),
!HornetQClient.DEFAULT_PRE_ACKNOWLEDGE);
Assert.assertEquals(factory.isUseGlobalPools(),
!HornetQClient.DEFAULT_USE_GLOBAL_POOLS);
@@ -261,8 +250,7 @@
Assert.assertEquals(factory.getTransactionBatchSize(), 18);
Assert.assertEquals(factory.isAutoGroup(), !HornetQClient.DEFAULT_AUTO_GROUP);
Assert.assertEquals(factory.isBlockOnAcknowledge(),
!HornetQClient.DEFAULT_BLOCK_ON_ACKNOWLEDGE);
- Assert.assertEquals(factory.isBlockOnNonDurableSend(),
- !HornetQClient.DEFAULT_BLOCK_ON_NON_DURABLE_SEND);
+ Assert.assertEquals(factory.isBlockOnNonDurableSend(),
!HornetQClient.DEFAULT_BLOCK_ON_NON_DURABLE_SEND);
Assert.assertEquals(factory.isBlockOnDurableSend(),
!HornetQClient.DEFAULT_BLOCK_ON_DURABLE_SEND);
Assert.assertEquals(factory.isPreAcknowledge(),
!HornetQClient.DEFAULT_PRE_ACKNOWLEDGE);
Assert.assertEquals(factory.isUseGlobalPools(),
!HornetQClient.DEFAULT_USE_GLOBAL_POOLS);
@@ -409,15 +397,20 @@
public void testValidateProperties() throws Exception
{
- validateGettersAndSetters(new HornetQResourceAdapter(),
"backupTransportConfiguration", "connectionParameters");
+ validateGettersAndSetters(new HornetQResourceAdapter(),
+ "backupTransportConfiguration",
+ "connectionParameters",
+ "jndiParams");
validateGettersAndSetters(new HornetQRAManagedConnectionFactory(),
"connectionParameters",
"sessionDefaultType",
- "backupConnectionParameters");
+ "backupConnectionParameters",
+ "jndiParams");
validateGettersAndSetters(new HornetQActivationSpec(),
"connectionParameters",
"acknowledgeMode",
- "subscriptionDurability");
+ "subscriptionDurability",
+ "jndiParams");
HornetQActivationSpec spec = new HornetQActivationSpec();
@@ -463,7 +456,7 @@
ServerLocator locator = createInVMNonHALocator();
ClientSessionFactory factory = locator.createSessionFactory();
ClientSession session = factory.createSession(false, false, false);
- HornetQDestination queue = (HornetQDestination)
HornetQJMSClient.createQueue("test");
+ HornetQDestination queue =
(HornetQDestination)HornetQJMSClient.createQueue("test");
session.createQueue(queue.getSimpleAddress(), queue.getSimpleAddress(), true);
session.close();
@@ -497,7 +490,7 @@
activation.start();
activation.stop();
-
+
ra.stop();
locator.close();