Author: robbie
Date: Fri Jan 21 15:55:20 2011
New Revision: 1061863
URL: http://svn.apache.org/viewvc?rev=1061863&view=rev
Log:
QPID-3013: create an initial connection to force thread pool startup before the
test proceeds, as these may be processor-count dependant and throw the final
result off
Modified:
qpid/trunk/qpid/java/systests/src/main/java/org/apache/qpid/test/unit/client/connection/ConnectionCloseTest.java
Modified:
qpid/trunk/qpid/java/systests/src/main/java/org/apache/qpid/test/unit/client/connection/ConnectionCloseTest.java
URL:
http://svn.apache.org/viewvc/qpid/trunk/qpid/java/systests/src/main/java/org/apache/qpid/test/unit/client/connection/ConnectionCloseTest.java?rev=1061863&r1=1061862&r2=1061863&view=diff
==============================================================================
---
qpid/trunk/qpid/java/systests/src/main/java/org/apache/qpid/test/unit/client/connection/ConnectionCloseTest.java
(original)
+++
qpid/trunk/qpid/java/systests/src/main/java/org/apache/qpid/test/unit/client/connection/ConnectionCloseTest.java
Fri Jan 21 15:55:20 2011
@@ -45,6 +45,10 @@ public class ConnectionCloseTest extends
public void testSendReceiveClose() throws Exception
{
+ //Create an initial connection to ensure any necessary thread pools
+ //are initialised before the test really begins.
+ Connection intialConnection = getConnection();
+
Map<Thread,StackTraceElement[]> before = Thread.getAllStackTraces();
for (int i = 0; i < 50; i++)
@@ -72,6 +76,8 @@ public class ConnectionCloseTest extends
assertEquals(m.getText(), "test");
receiver.close();
}
+
+ intialConnection.close();
// The finalizer is notifying connector thread waiting on a selector
key.
// This should leave the finalizer enough time to notify those threads
---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project: http://qpid.apache.org
Use/Interact: mailto:[email protected]