[
https://issues.apache.org/jira/browse/QPID-1320?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Martin Ritchie updated QPID-1320:
---------------------------------
Assignee: Aidan Skinner (was: Martin Ritchie)
Status: Open (was: Ready To Review)
The test doesn't test resetting of the message listener.
Ok so the only reason I can see for having the second consumer was to ensure
that changing the message listener had no ill effects there. Agreed it is
probabably not required and just makes the test more difficult to understand.
I think the javadoc description of the test need tidied up now that QPID-293
has been resolved.
I think this test needs a description of what it is trying to achieve as what
is currently happening is:
creation consumers connnection
send 6 messages
set a message listener
change message listener
send 6 more messages
start consumer session
receive all 8 messages (first 6 + 2 from second batch)
then exit verifying we received 2 from first batch and 2 from second batch.
What needs to happen is something like
Create consumer
send messages
set messageListener
start consumer session
Check that they arrive (not both tests didn't check the return from the await!
they need to)
Stop connection
send more messages
<Arguably these two opperations could be tested in either operation>
change message listener
check that they arrive as expected.
First ML should only check for rank=first messages for countdown
Second ML should only check rank=second messages for countdown
if a first message arrives in the second ML then it is a failure as the first
ML should have consumsed all 6 msgs before we were allowed to continue.
> ResetMessageListenerTest testAsynchronousRecieve test failure
> -------------------------------------------------------------
>
> Key: QPID-1320
> URL: https://issues.apache.org/jira/browse/QPID-1320
> Project: Qpid
> Issue Type: Bug
> Components: Java Tests
> Affects Versions: M3
> Reporter: Martin Ritchie
> Assignee: Aidan Skinner
> Attachments:
> TEST-org.apache.qpid.client.ResetMessageListenerTest.testAsynchronousRecieve.out
>
>
> This test has failed a number of times these were the failure messages:
> junit.framework.AssertionFailedError: Second batch of messages not received
> correctly expected:<0> but was:<1>
> at
> org.apache.qpid.client.ResetMessageListenerTest.testAsynchronousRecieve(ResetMessageListenerTest.java:257)
>
> at org.apache.qpid.test.utils.QpidTestCase.runBare(QpidTestCase.java:186)
> at org.apache.qpid.test.utils.QpidTestCase.run(QpidTestCase.java:220,
> org.apache.qpid.client.ResetMessageListenerTest
> junit.framework.AssertionFailedError: First batch of messages not received
> correctly expected:<0> but was:<1>
> at
> org.apache.qpid.client.ResetMessageListenerTest.testAsynchronousRecieve(ResetMessageListenerTest.java:256)
>
> at org.apache.qpid.test.utils.QpidTestCase.runBare(QpidTestCase.java:186)
> at org.apache.qpid.test.utils.QpidTestCase.run(QpidTestCase.java:220)
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.