Author: jmesnil
Date: 2010-09-07 05:31:01 -0400 (Tue, 07 Sep 2010)
New Revision: 9649
Modified:
branches/2_2_0_HA_Improvements/tests/src/org/hornetq/tests/integration/cluster/reattach/MultiThreadRandomReattachTestBase.java
branches/2_2_0_HA_Improvements/tests/src/org/hornetq/tests/integration/cluster/reattach/NettyMultiThreadRandomReattachTest.java
branches/2_2_0_HA_Improvements/tests/src/org/hornetq/tests/integration/cluster/reattach/OrderReattachTest.java
branches/2_2_0_HA_Improvements/tests/src/org/hornetq/tests/integration/cluster/reattach/ReattachTest.java
Log:
fix test setup
Modified:
branches/2_2_0_HA_Improvements/tests/src/org/hornetq/tests/integration/cluster/reattach/MultiThreadRandomReattachTestBase.java
===================================================================
---
branches/2_2_0_HA_Improvements/tests/src/org/hornetq/tests/integration/cluster/reattach/MultiThreadRandomReattachTestBase.java 2010-09-06
15:51:38 UTC (rev 9648)
+++
branches/2_2_0_HA_Improvements/tests/src/org/hornetq/tests/integration/cluster/reattach/MultiThreadRandomReattachTestBase.java 2010-09-07
09:31:01 UTC (rev 9649)
@@ -1244,9 +1244,9 @@
protected ClientSessionFactoryInternal createSessionFactory() throws Exception
{
ServerLocator locator = HornetQClient.createServerLocatorWithoutHA(new
TransportConfiguration("org.hornetq.core.remoting.impl.invm.InVMConnectorFactory"));
+ locator.setReconnectAttempts(-1);
+ locator.setConfirmationWindowSize(1024 * 1024);
final ClientSessionFactory sf = locator.createSessionFactory();
- sf.getServerLocator().setReconnectAttempts(-1);
- sf.getServerLocator().setConfirmationWindowSize(1024 * 1024);
return (ClientSessionFactoryInternal) sf;
}
Modified:
branches/2_2_0_HA_Improvements/tests/src/org/hornetq/tests/integration/cluster/reattach/NettyMultiThreadRandomReattachTest.java
===================================================================
---
branches/2_2_0_HA_Improvements/tests/src/org/hornetq/tests/integration/cluster/reattach/NettyMultiThreadRandomReattachTest.java 2010-09-06
15:51:38 UTC (rev 9648)
+++
branches/2_2_0_HA_Improvements/tests/src/org/hornetq/tests/integration/cluster/reattach/NettyMultiThreadRandomReattachTest.java 2010-09-07
09:31:01 UTC (rev 9649)
@@ -50,11 +50,10 @@
protected ClientSessionFactoryInternal createSessionFactory() throws Exception
{
ServerLocator locator = HornetQClient.createServerLocatorWithoutHA(new
TransportConfiguration("org.hornetq.core.remoting.impl.netty.NettyConnectorFactory"))
;
- final ClientSessionFactoryInternal sf = (ClientSessionFactoryInternal)
locator.createSessionFactory();
- sf.getServerLocator().setReconnectAttempts(-1);
- sf.getServerLocator().setConfirmationWindowSize(1024 * 1024);
- sf.getServerLocator().setAckBatchSize(0);
- return sf;
+ locator.setReconnectAttempts(-1);
+ locator.setConfirmationWindowSize(1024 * 1024);
+ locator.setAckBatchSize(0);
+ return (ClientSessionFactoryInternal) locator.createSessionFactory();
}
}
Modified:
branches/2_2_0_HA_Improvements/tests/src/org/hornetq/tests/integration/cluster/reattach/OrderReattachTest.java
===================================================================
---
branches/2_2_0_HA_Improvements/tests/src/org/hornetq/tests/integration/cluster/reattach/OrderReattachTest.java 2010-09-06
15:51:38 UTC (rev 9648)
+++
branches/2_2_0_HA_Improvements/tests/src/org/hornetq/tests/integration/cluster/reattach/OrderReattachTest.java 2010-09-07
09:31:01 UTC (rev 9649)
@@ -82,11 +82,11 @@
server.start();
ServerLocator locator = createFactory(isNetty);
+ locator.setReconnectAttempts(-1);
+ locator.setConfirmationWindowSize(100 * 1024 * 1024);
+ locator.setBlockOnNonDurableSend(false);
+ locator.setBlockOnAcknowledge(false);
ClientSessionFactory sf = locator.createSessionFactory();
- sf.getServerLocator().setReconnectAttempts(-1);
- sf.getServerLocator().setConfirmationWindowSize(100 * 1024 * 1024);
- sf.getServerLocator().setBlockOnNonDurableSend(false);
- sf.getServerLocator().setBlockOnAcknowledge(false);
final ClientSession session = sf.createSession(false, true, true);
Modified:
branches/2_2_0_HA_Improvements/tests/src/org/hornetq/tests/integration/cluster/reattach/ReattachTest.java
===================================================================
---
branches/2_2_0_HA_Improvements/tests/src/org/hornetq/tests/integration/cluster/reattach/ReattachTest.java 2010-09-06
15:51:38 UTC (rev 9648)
+++
branches/2_2_0_HA_Improvements/tests/src/org/hornetq/tests/integration/cluster/reattach/ReattachTest.java 2010-09-07
09:31:01 UTC (rev 9649)
@@ -73,13 +73,12 @@
final int reconnectAttempts = 1;
+ locator.setRetryInterval(retryInterval);
+ locator.setRetryIntervalMultiplier(retryMultiplier);
+ locator.setReconnectAttempts(reconnectAttempts);
+ locator.setConfirmationWindowSize(1024 * 1024);
ClientSessionFactoryInternal sf = (ClientSessionFactoryInternal)
locator.createSessionFactory();
- sf.getServerLocator().setRetryInterval(retryInterval);
- sf.getServerLocator().setRetryIntervalMultiplier(retryMultiplier);
- sf.getServerLocator().setReconnectAttempts(reconnectAttempts);
- sf.getServerLocator().setConfirmationWindowSize(1024 * 1024);
-
ClientSession session = sf.createSession(false, true, true);
session.createQueue(ReattachTest.ADDRESS, ReattachTest.ADDRESS, null, false);
@@ -151,13 +150,12 @@
final int reconnectAttempts = -1;
+ locator.setRetryInterval(retryInterval);
+ locator.setRetryIntervalMultiplier(retryMultiplier);
+ locator.setReconnectAttempts(reconnectAttempts);
+ locator.setConfirmationWindowSize(1024 * 1024);
ClientSessionFactoryInternal sf = (ClientSessionFactoryInternal)
locator.createSessionFactory();
- sf.getServerLocator().setRetryInterval(retryInterval);
- sf.getServerLocator().setRetryIntervalMultiplier(retryMultiplier);
- sf.getServerLocator().setReconnectAttempts(reconnectAttempts);
- sf.getServerLocator().setConfirmationWindowSize(1024 * 1024);
-
ClientSession session = sf.createSession(false, true, true);
session.createQueue(ReattachTest.ADDRESS, ReattachTest.ADDRESS, null, false);
@@ -242,13 +240,12 @@
final long asyncFailDelay = 2000;
+ locator.setRetryInterval(retryInterval);
+ locator.setRetryIntervalMultiplier(retryMultiplier);
+ locator.setReconnectAttempts(reconnectAttempts);
+ locator.setConfirmationWindowSize(1024 * 1024);
ClientSessionFactoryInternal sf = (ClientSessionFactoryInternal)
locator.createSessionFactory();
- sf.getServerLocator().setRetryInterval(retryInterval);
- sf.getServerLocator().setRetryIntervalMultiplier(retryMultiplier);
- sf.getServerLocator().setReconnectAttempts(reconnectAttempts);
- sf.getServerLocator().setConfirmationWindowSize(1024 * 1024);
-
ClientSession session = sf.createSession(false, true, true);
ClientSession session2 = sf.createSession(false, true, true);
@@ -357,13 +354,12 @@
final int reconnectAttempts = 3;
+ locator.setRetryInterval(retryInterval);
+ locator.setRetryIntervalMultiplier(retryMultiplier);
+ locator.setReconnectAttempts(reconnectAttempts);
+ locator.setConfirmationWindowSize(1024 * 1024);
ClientSessionFactoryInternal sf = (ClientSessionFactoryInternal)
locator.createSessionFactory();
- sf.getServerLocator().setRetryInterval(retryInterval);
- sf.getServerLocator().setRetryIntervalMultiplier(retryMultiplier);
- sf.getServerLocator().setReconnectAttempts(reconnectAttempts);
- sf.getServerLocator().setConfirmationWindowSize(1024 * 1024);
-
ClientSession session = sf.createSession(false, true, true);
session.createQueue(ReattachTest.ADDRESS, ReattachTest.ADDRESS, null, false);
@@ -448,13 +444,12 @@
final int reconnectAttempts = -1;
+ locator.setRetryInterval(retryInterval);
+ locator.setRetryIntervalMultiplier(retryMultiplier);
+ locator.setReconnectAttempts(reconnectAttempts);
+ locator.setConfirmationWindowSize(1024 * 1024);
final ClientSessionFactoryInternal sf = (ClientSessionFactoryInternal)
locator.createSessionFactory();
- sf.getServerLocator().setRetryInterval(retryInterval);
- sf.getServerLocator().setRetryIntervalMultiplier(retryMultiplier);
- sf.getServerLocator().setReconnectAttempts(reconnectAttempts);
- sf.getServerLocator().setConfirmationWindowSize(1024 * 1024);
-
session = sf.createSession();
final RemotingConnection connFailure =
((ClientSessionInternal)session).getConnection();
@@ -559,13 +554,12 @@
final int reconnectAttempts = -1;
+ locator.setRetryInterval(retryInterval);
+ locator.setRetryIntervalMultiplier(retryMultiplier);
+ locator.setReconnectAttempts(reconnectAttempts);
+ locator.setConfirmationWindowSize(1024 * 1024);
final ClientSessionFactoryInternal sf = (ClientSessionFactoryInternal)
locator.createSessionFactory();
- sf.getServerLocator().setRetryInterval(retryInterval);
- sf.getServerLocator().setRetryIntervalMultiplier(retryMultiplier);
- sf.getServerLocator().setReconnectAttempts(reconnectAttempts);
- sf.getServerLocator().setConfirmationWindowSize(1024 * 1024);
-
InVMConnector.failOnCreateConnection = true;
int numberOfThreads = 100;
@@ -658,13 +652,12 @@
final int reconnectAttempts = -1;
+ locator.setRetryInterval(retryInterval);
+ locator.setRetryIntervalMultiplier(retryMultiplier);
+ locator.setReconnectAttempts(reconnectAttempts);
+ locator.setConfirmationWindowSize(1024 * 1024);
ClientSessionFactoryInternal sf = (ClientSessionFactoryInternal)
locator.createSessionFactory();
- sf.getServerLocator().setRetryInterval(retryInterval);
- sf.getServerLocator().setRetryIntervalMultiplier(retryMultiplier);
- sf.getServerLocator().setReconnectAttempts(reconnectAttempts);
- sf.getServerLocator().setConfirmationWindowSize(1024 * 1024);
-
ClientSession session = sf.createSession(false, true, true);
// Sleep 3 times retryInterval, so it should at least have 3 retries
@@ -731,13 +724,12 @@
final int reconnectAttempts = 10;
+ locator.setRetryInterval(retryInterval);
+ locator.setRetryIntervalMultiplier(retryMultiplier);
+ locator.setReconnectAttempts(reconnectAttempts);
+ locator.setConfirmationWindowSize(1024 * 1024);
ClientSessionFactoryInternal sf = (ClientSessionFactoryInternal)
locator.createSessionFactory();
- sf.getServerLocator().setRetryInterval(retryInterval);
- sf.getServerLocator().setRetryIntervalMultiplier(retryMultiplier);
- sf.getServerLocator().setReconnectAttempts(reconnectAttempts);
- sf.getServerLocator().setConfirmationWindowSize(1024 * 1024);
-
ClientSession session = sf.createSession(false, true, true);
session.createQueue(ReattachTest.ADDRESS, ReattachTest.ADDRESS, null, false);
@@ -799,13 +791,13 @@
final int reconnectAttempts = -1;
+
+ locator.setRetryInterval(retryInterval);
+ locator.setRetryIntervalMultiplier(retryMultiplier);
+ locator.setReconnectAttempts(reconnectAttempts);
+ locator.setConfirmationWindowSize(1024 * 1024);
ClientSessionFactoryInternal sf = (ClientSessionFactoryInternal)
locator.createSessionFactory();
- sf.getServerLocator().setRetryInterval(retryInterval);
- sf.getServerLocator().setRetryIntervalMultiplier(retryMultiplier);
- sf.getServerLocator().setReconnectAttempts(reconnectAttempts);
- sf.getServerLocator().setConfirmationWindowSize(1024 * 1024);
-
ClientSession session = sf.createSession(false, true, true);
session.createQueue(ReattachTest.ADDRESS, ReattachTest.ADDRESS, null, false);
@@ -892,13 +884,13 @@
final int reconnectAttempts = -1;
+
+ locator.setRetryInterval(retryInterval);
+ locator.setRetryIntervalMultiplier(retryMultiplier);
+ locator.setReconnectAttempts(reconnectAttempts);
+ locator.setConfirmationWindowSize(1024 * 1024);
ClientSessionFactoryInternal sf = (ClientSessionFactoryInternal)
locator.createSessionFactory();
- sf.getServerLocator().setRetryInterval(retryInterval);
- sf.getServerLocator().setRetryIntervalMultiplier(retryMultiplier);
- sf.getServerLocator().setReconnectAttempts(reconnectAttempts);
- sf.getServerLocator().setConfirmationWindowSize(1024 * 1024);
-
ClientSession session = sf.createSession(false, true, true);
session.createQueue(ReattachTest.ADDRESS, ReattachTest.ADDRESS, null, false);
@@ -970,14 +962,13 @@
final long maxRetryInterval = 1000;
+ locator.setRetryInterval(retryInterval);
+ locator.setRetryIntervalMultiplier(retryMultiplier);
+ locator.setReconnectAttempts(reconnectAttempts);
+ locator.setMaxRetryInterval(maxRetryInterval);
+ locator.setConfirmationWindowSize(1024 * 1024);
ClientSessionFactoryInternal sf = (ClientSessionFactoryInternal)
locator.createSessionFactory();
- sf.getServerLocator().setRetryInterval(retryInterval);
- sf.getServerLocator().setRetryIntervalMultiplier(retryMultiplier);
- sf.getServerLocator().setReconnectAttempts(reconnectAttempts);
- sf.getServerLocator().setMaxRetryInterval(maxRetryInterval);
- sf.getServerLocator().setConfirmationWindowSize(1024 * 1024);
-
ClientSession session = sf.createSession(false, true, true);
session.createQueue(ReattachTest.ADDRESS, ReattachTest.ADDRESS, null, false);