Author: aidan
Date: Mon Apr 21 05:17:18 2008
New Revision: 650122

URL: http://svn.apache.org/viewvc?rev=650122&view=rev
Log:
QPID-832 pass a genuine connection so that it doesnt NPE

Modified:
    
incubator/qpid/branches/thegreatmerge/qpid/java/client/src/test/java/org/apache/qpid/test/unit/client/protocol/AMQProtocolSessionTest.java

Modified: 
incubator/qpid/branches/thegreatmerge/qpid/java/client/src/test/java/org/apache/qpid/test/unit/client/protocol/AMQProtocolSessionTest.java
URL: 
http://svn.apache.org/viewvc/incubator/qpid/branches/thegreatmerge/qpid/java/client/src/test/java/org/apache/qpid/test/unit/client/protocol/AMQProtocolSessionTest.java?rev=650122&r1=650121&r2=650122&view=diff
==============================================================================
--- 
incubator/qpid/branches/thegreatmerge/qpid/java/client/src/test/java/org/apache/qpid/test/unit/client/protocol/AMQProtocolSessionTest.java
 (original)
+++ 
incubator/qpid/branches/thegreatmerge/qpid/java/client/src/test/java/org/apache/qpid/test/unit/client/protocol/AMQProtocolSessionTest.java
 Mon Apr 21 05:17:18 2008
@@ -27,8 +27,9 @@
 import org.apache.qpid.client.protocol.AMQProtocolHandler;
 import org.apache.qpid.client.protocol.AMQProtocolSession;
 import org.apache.qpid.framing.AMQShortString;
+import org.apache.qpid.testutil.QpidTestCase;
 
-public class AMQProtocolSessionTest extends TestCase
+public class AMQProtocolSessionTest extends QpidTestCase
 {
     private static class AMQProtSession extends AMQProtocolSession
     {
@@ -50,7 +51,7 @@
     }
 
     //private Strings for test values and expected results
-    private String _brokenAddress;
+    private String _brokenAddress = "tcp://myAddress;:";;
     private String _generatedAddress;
     private String _emptyAddress;
     private String _generatedAddress_2;
@@ -64,7 +65,7 @@
         super.setUp();
 
         //don't care about the values set here apart from the dummy IoSession
-        _testSession = new AMQProtSession(null,new TestIoSession(),null);
+        _testSession = new AMQProtSession(null,new TestIoSession(), 
(AMQConnection) getConnection("guest", "guest"));
 
         //initialise addresses for test and expected results
         _port = 123;


Reply via email to