qpid-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rupert Smith (JIRA)" <qpid-...@incubator.apache.org>
Subject [jira] Created: (QPID-223) TopicConnTests#connNotStartedTopicTest failing.
Date Wed, 20 Dec 2006 12:52:21 GMT
TopicConnTests#connNotStartedTopicTest failing.
-----------------------------------------------

                 Key: QPID-223
                 URL: http://issues.apache.org/jira/browse/QPID-223
             Project: Qpid
          Issue Type: Bug
          Components: JMS Compliance
            Reporter: Rupert Smith


TopicConnTests#connNotStartedTopicTest is failing.

This is due to the fact that this test resends the same TextMessage many times but the reset
method on AbstractJMSMessage was performing a flip() on the buffer rather a rewind() between
each message send. This was caused by the logic that decides whether to perform a flip or
rewind being driven by the _isReadable flag when really the choice should be made depending
on whether or not the buffer has 'just been written to' as opposed to 'just read'. A new flag
to distinguish these two conditions, _changedData, has been introduced into AbstractJMSMessage
and all methods in its derived child classes set this flag whenever they have just written
to the buffer, so that the next reset and subsequent resets work correctly.

The _changedData flag is initially set to true if an AbstractJMSMessage is created with no
data, so that reset works correctly on null messages. When AbstractJMSMessage is created with
data, the buffer passed to it has already been flipped, so _changedData is set to false.

A patch to fix this is included.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message