diff options
| author | Robert Gemmell <robbie@apache.org> | 2011-01-21 15:55:20 +0000 |
|---|---|---|
| committer | Robert Gemmell <robbie@apache.org> | 2011-01-21 15:55:20 +0000 |
| commit | 0433774657a2efdb4aa8b87c09cdbbdd0d08bd0c (patch) | |
| tree | d09736f661636d41c099bbb09b000c8050724719 /qpid | |
| parent | bb9e69b50436bb0cb77eb051ef9816f7543fe996 (diff) | |
| download | qpid-python-0433774657a2efdb4aa8b87c09cdbbdd0d08bd0c.tar.gz | |
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
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1061863 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid')
| -rw-r--r-- | qpid/java/systests/src/main/java/org/apache/qpid/test/unit/client/connection/ConnectionCloseTest.java | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/qpid/java/systests/src/main/java/org/apache/qpid/test/unit/client/connection/ConnectionCloseTest.java b/qpid/java/systests/src/main/java/org/apache/qpid/test/unit/client/connection/ConnectionCloseTest.java index 760aa1076c..8f9eaf5815 100644 --- a/qpid/java/systests/src/main/java/org/apache/qpid/test/unit/client/connection/ConnectionCloseTest.java +++ b/qpid/java/systests/src/main/java/org/apache/qpid/test/unit/client/connection/ConnectionCloseTest.java @@ -45,6 +45,10 @@ public class ConnectionCloseTest extends QpidBrokerTestCase 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 QpidBrokerTestCase 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 |
