]
Tim Fox closed JBMESSAGING-361.
-------------------------------
Resolution: Done
WireFormatTest.testNullResponse(), testDeactivateResponse() fragments
invalid
-----------------------------------------------------------------------------
Key: JBMESSAGING-361
URL:
http://jira.jboss.com/jira/browse/JBMESSAGING-361
Project: JBoss Messaging
Issue Type: Sub-task
Components: JMS Facade
Affects Versions: 1.0.0
Reporter: Ovidiu Feodorov
Assigned To: Tim Fox
Fix For: 1.2.0.Alpha1
Original Estimate: 4 hours
Remaining Estimate: 4 hours
Switching to jboss-serialization 1.0.0.CR7 uncovered what apparently seems to be an
invalid test section in WireFormatTest
public void testNullResponse() throws Exception
{
MessagingMarshallable mm = new MessagingMarshallable((byte)77, null);
InvocationResponse resp = new InvocationResponse(null, mm, false, null);
ByteArrayOutputStream bos = new ByteArrayOutputStream();
JBossObjectOutputStream oos = new JBossObjectOutputStream(bos);
wf.write(resp, oos);
oos.flush();
ByteArrayInputStream bis = new ByteArrayInputStream(bos.toByteArray());
DataInputStream dis = new DataInputStream(bis);
// First byte should be version
assertEquals(77, dis.readByte());
...........
}
It doesn't make sense to me to write stuff to a JBossObjectOutputStream and then try
to read the serialized content using a DataInputStream, and yet this is what this test
section does. JBoss Serialization doesn't guarantee this in its public contract.
Excerpt form a conversation with Clebert:
flanker707: Does JBossSerialization guarantee that something written with on a
JBossObjectOutuptStream can be read with DataInputStream?
Clebert Suconic: no... I didn't mean to
flanker707: is this in the public contract?
Clebert Suconic: If you use the same thing with ObjectInputStream.. you would have the
same problem
testNullResponse(), testDeactivateResponse() sections commented out until clarified.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: