Author: jmesnil
Date: 2009-11-30 04:23:10 -0500 (Mon, 30 Nov 2009)
New Revision: 8459
Modified:
trunk/build-hornetq.properties
trunk/build-hornetq.xml
trunk/src/main/org/hornetq/core/remoting/server/impl/RemotingServiceImpl.java
trunk/tests/src/org/hornetq/tests/integration/cluster/distribution/ClusterTestBase.java
trunk/tests/src/org/hornetq/tests/integration/cluster/distribution/SymmetricClusterTest.java
Log:
add sleep in remoting service
* sleep for 1s when stopping the remoting service to give more opportunity to
initializing connections to be done before sending them DISCONNECT packets
(only if using netty acceptors)
* increased test suite's global timeout to 2h (instead of 1h30)
Modified: trunk/build-hornetq.properties
===================================================================
--- trunk/build-hornetq.properties 2009-11-30 08:44:34 UTC (rev 8458)
+++ trunk/build-hornetq.properties 2009-11-30 09:23:10 UTC (rev 8459)
@@ -23,8 +23,8 @@
junit.haltonfailure=false
junit.fork=true
junit.includeantruntime=true
-# 90 mins
-junit.timeout=5400000
+# 120 mins
+junit.timeout=7200000
# 150 mins
clustering.junit.timeout=9000000
# 90 mins
Modified: trunk/build-hornetq.xml
===================================================================
--- trunk/build-hornetq.xml 2009-11-30 08:44:34 UTC (rev 8458)
+++ trunk/build-hornetq.xml 2009-11-30 09:23:10 UTC (rev 8459)
@@ -1224,8 +1224,6 @@
failureproperty="tests.failed">
<formatter type="plain"
usefile="${junit.formatter.usefile}"/>
<fileset dir="${test.classes.dir}">
- <!-- cluster tests with backup are brittled and are temporarily excluded
-->
- <exclude name="**/cluster/distribution/*WithBackupTest.class"
/>
<!-- exlcuded because of
https://jira.jboss.org/jira/browse/HORNETQ-65
-->
<exclude
name="**/cluster/failover/*StaticClusterWithBackupFailoverTest.class" />
<include name="${tests.param}"/>
Modified: trunk/src/main/org/hornetq/core/remoting/server/impl/RemotingServiceImpl.java
===================================================================
---
trunk/src/main/org/hornetq/core/remoting/server/impl/RemotingServiceImpl.java 2009-11-30
08:44:34 UTC (rev 8458)
+++
trunk/src/main/org/hornetq/core/remoting/server/impl/RemotingServiceImpl.java 2009-11-30
09:23:10 UTC (rev 8459)
@@ -225,6 +225,21 @@
acceptor.pause();
}
+ boolean containsNettyAcceptors = false;
+ for (Acceptor acceptor : acceptors)
+ {
+ if (acceptor.getClass().toString().contains("NettyAcceptor"))
+ {
+ containsNettyAcceptors = true;
+ break;
+ }
+ }
+ if (containsNettyAcceptors)
+ {
+ // we sleep in case there are initializing connections which are in the thread
pool
+ Thread.sleep(1000);
+ }
+
synchronized (server)
{
for (ConnectionEntry entry : connections.values())
Modified:
trunk/tests/src/org/hornetq/tests/integration/cluster/distribution/ClusterTestBase.java
===================================================================
---
trunk/tests/src/org/hornetq/tests/integration/cluster/distribution/ClusterTestBase.java 2009-11-30
08:44:34 UTC (rev 8458)
+++
trunk/tests/src/org/hornetq/tests/integration/cluster/distribution/ClusterTestBase.java 2009-11-30
09:23:10 UTC (rev 8459)
@@ -830,7 +830,7 @@
message.acknowledge();
}
- log.info("consumer " + consumerIDs[i] + " returns " +
count);
+ // log.info("consumer " + consumerIDs[i] + " returns "
+ count);
}
else
{
Modified:
trunk/tests/src/org/hornetq/tests/integration/cluster/distribution/SymmetricClusterTest.java
===================================================================
---
trunk/tests/src/org/hornetq/tests/integration/cluster/distribution/SymmetricClusterTest.java 2009-11-30
08:44:34 UTC (rev 8458)
+++
trunk/tests/src/org/hornetq/tests/integration/cluster/distribution/SymmetricClusterTest.java 2009-11-30
09:23:10 UTC (rev 8459)
@@ -1424,7 +1424,7 @@
startServers(3, 0);
- Thread.sleep(2000);
+ Thread.sleep(3000);
setupSessionFactory(0, isNetty());
setupSessionFactory(3, isNetty());