[jboss-cvs] JBoss Messaging SVN: r1504 - branches/Branch_HTTP_Experiment/tests/src/org/jboss/test/messaging/jms
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Fri Oct 20 03:10:24 EDT 2006
Author: ron_sigal
Date: 2006-10-20 03:10:23 -0400 (Fri, 20 Oct 2006)
New Revision: 1504
Modified:
branches/Branch_HTTP_Experiment/tests/src/org/jboss/test/messaging/jms/WireFormatTest.java
Log:
JBMESSAGING-207: Changed TestCallback() to conform to new Callback handling.
Modified: branches/Branch_HTTP_Experiment/tests/src/org/jboss/test/messaging/jms/WireFormatTest.java
===================================================================
--- branches/Branch_HTTP_Experiment/tests/src/org/jboss/test/messaging/jms/WireFormatTest.java 2006-10-20 07:08:13 UTC (rev 1503)
+++ branches/Branch_HTTP_Experiment/tests/src/org/jboss/test/messaging/jms/WireFormatTest.java 2006-10-20 07:10:23 UTC (rev 1504)
@@ -55,6 +55,8 @@
import org.jboss.remoting.InvocationRequest;
import org.jboss.remoting.InvocationResponse;
import org.jboss.remoting.InvokerLocator;
+import org.jboss.remoting.callback.Callback;
+import org.jboss.remoting.invocation.InternalInvocation;
import org.jboss.test.messaging.MessagingTestCase;
import org.jboss.test.messaging.jms.message.MessageTest;
import org.jboss.util.id.GUID;
@@ -75,7 +77,7 @@
private static final Logger log = Logger.getLogger(WireFormatTest.class);
// TODO - replace with a dynamic value
- private static final byte CURRENT_VERSION = 6;
+ private static final byte CURRENT_VERSION = 7;
// Static --------------------------------------------------------
@@ -1115,7 +1117,7 @@
MessagingMarshallable mm = new MessagingMarshallable((byte)77, dr);
- InvocationRequest ir = new InvocationRequest(null, null, mm, null, null, null);
+ InvocationRequest ir = new InvocationRequest("dummySessionId", null, mm, null, null, null);
wf.write(ir, oos);
@@ -1133,6 +1135,9 @@
//Second byte should be CALLBACK
assertEquals(JMSWireFormat.CALLBACK, dis.readByte());
+ //Next should be sessionID
+ assertEquals("dummySessionId", dis.readUTF());
+
//Next int should be server id
assertEquals(76543, dis.readInt());
@@ -1200,8 +1205,16 @@
InvocationRequest ir2 = (InvocationRequest)wf.read(ois, null);
- mm = (MessagingMarshallable)ir2.getParameter();
+ InternalInvocation ii = (InternalInvocation) ir2.getParameter();
+ Object[] parameters = ii.getParameters();
+
+ assertNotNull(parameters);
+
+ Callback callback = (Callback) parameters[0];
+
+ mm = (MessagingMarshallable)callback.getParameter();
+
assertEquals(77, mm.getVersion());
ClientDelivery dr2 = (ClientDelivery)mm.getLoad();
More information about the jboss-cvs-commits
mailing list