[jboss-cvs] JBoss Messaging SVN: r5503 - trunk/tests/src/org/jboss/messaging/tests/integration/http.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Wed Dec 10 09:12:17 EST 2008


Author: ataylor
Date: 2008-12-10 09:12:17 -0500 (Wed, 10 Dec 2008)
New Revision: 5503

Modified:
   trunk/tests/src/org/jboss/messaging/tests/integration/http/NettyHttpTest.java
Log:
tidied tests up

Modified: trunk/tests/src/org/jboss/messaging/tests/integration/http/NettyHttpTest.java
===================================================================
--- trunk/tests/src/org/jboss/messaging/tests/integration/http/NettyHttpTest.java	2008-12-10 13:54:28 UTC (rev 5502)
+++ trunk/tests/src/org/jboss/messaging/tests/integration/http/NettyHttpTest.java	2008-12-10 14:12:17 UTC (rev 5503)
@@ -44,6 +44,8 @@
 {
    private NettyAcceptor acceptor;
 
+   private NettyConnector connector;
+
    public void testSendAndReceiveAtSameTime() throws Exception
    {
 
@@ -60,7 +62,7 @@
       acceptor.start();
 
       SimpleBufferHandler connectorHandler = new SimpleBufferHandler(connectorLatch);
-      NettyConnector connector = new NettyConnector(conf, connectorHandler, new DummyConnectionLifeCycleListener(null));
+      connector = new NettyConnector(conf, connectorHandler, new DummyConnectionLifeCycleListener(null));
       connector.start();
       Connection conn = connector.createConnection();
       connCreatedLatch.await(5, TimeUnit.SECONDS);
@@ -112,7 +114,7 @@
       acceptor.start();
 
       SimpleBufferHandler connectorHandler = new SimpleBufferHandler(connectorLatch);
-      NettyConnector connector = new NettyConnector(conf, connectorHandler, new DummyConnectionLifeCycleListener(null));
+      connector = new NettyConnector(conf, connectorHandler, new DummyConnectionLifeCycleListener(null));
       connector.start();
       Connection conn = connector.createConnection();
       connCreatedLatch.await(5, TimeUnit.SECONDS);
@@ -167,7 +169,7 @@
       acceptor.start();
 
       SimpleBufferHandler connectorHandler = new SimpleBufferHandler(connectorLatch);
-      NettyConnector connector = new NettyConnector(conf, connectorHandler, new DummyConnectionLifeCycleListener(null));
+      connector = new NettyConnector(conf, connectorHandler, new DummyConnectionLifeCycleListener(null));
       connector.start();
       Connection conn = connector.createConnection();
       connCreatedLatch.await(5, TimeUnit.SECONDS);
@@ -223,7 +225,7 @@
       acceptor.start();
 
       SimpleBufferHandler connectorHandler = new SimpleBufferHandler(connectorLatch);
-      NettyConnector connector = new NettyConnector(conf, connectorHandler, new DummyConnectionLifeCycleListener(null));
+      connector = new NettyConnector(conf, connectorHandler, new DummyConnectionLifeCycleListener(null));
       connector.start();
       Connection conn = connector.createConnection();
       connCreatedLatch.await(5, TimeUnit.SECONDS);
@@ -279,7 +281,7 @@
       acceptor.start();
 
       SimpleBufferHandler connectorHandler = new SimpleBufferHandler(connectorLatch);
-      NettyConnector connector = new NettyConnector(conf, connectorHandler, new DummyConnectionLifeCycleListener(null));
+      connector = new NettyConnector(conf, connectorHandler, new DummyConnectionLifeCycleListener(null));
       connector.start();
       Connection conn = connector.createConnection();
       connCreatedLatch.await(5, TimeUnit.SECONDS);
@@ -329,7 +331,7 @@
       acceptor.start();
 
       BogusResponseHandler connectorHandler = new BogusResponseHandler(connectorLatch);
-      NettyConnector connector = new NettyConnector(conf, connectorHandler, new DummyConnectionLifeCycleListener(null));
+      connector = new NettyConnector(conf, connectorHandler, new DummyConnectionLifeCycleListener(null));
       connector.start();
       Connection conn = connector.createConnection();
       connCreatedLatch.await(5, TimeUnit.SECONDS);
@@ -360,7 +362,11 @@
    @Override
    protected void tearDown() throws Exception
    {
-      
+      if(connector != null)
+      {
+         connector.close();
+         connector = null;
+      }
       if(acceptor != null)
       {
          acceptor.stop();




More information about the jboss-cvs-commits mailing list