qpid-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Keith Wall (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (QPID-3164) Occasional test failures from SimpleAMQQueueTest.testSubscriptionSpecificRequeueForQueueWithMultipleSubscriptions
Date Sat, 02 Apr 2011 20:04:05 GMT

    [ https://issues.apache.org/jira/browse/QPID-3164?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13015072#comment-13015072
] 

Keith Wall commented on QPID-3164:
----------------------------------

Thanks Andrew.  The problems are in the test cases I added whilst addressing QPID-2900.

The first problem is that test testRequeueForQueueWithMultipleSubscriptions assumes that message
delivery to multiple subscriptions is deterministic, when it is not.  The test assumes that
1 message will go the first, and 1 to second.  This might or might not be the case depending
on the actions of SubFlushRunner and QueueRunner.

The second problem is that the tests call QueueEntry.release, then call SimpleAMQQueue.requeue().
 This is incorrect since QueueEntry.release() is responsible for making the call to SimpleAMQQueue.requeue().
 This explains why testSubscriptionSpecificRequeueForQueueWithMultipleSubscriptions is sometimes
seen to fail.  The test hopes to cause the entry to go to a particular subscription (using
SimpleAMQQueue.requeue(queueEntry, sub)), but since the test calls release(), the requeue
could go to either subscription.

However, I notice that SimpleAMQQueue.requeue(QueueEntryImpl, Subscription) and QueueEntryImpl.requeue(QueueEntryImp,
Subscription subscription) appear to be dead code.  SimpleAMQQueue.requeue(QueueEntryImpl,
Subscription) was last prior to afcf8099695253651c73910a243fb29aa520b008 (Merged from java-broker-0-10
branch).

I'll prepare a patch to fix the test and remove these dead methods.



   


> Occasional test failures from SimpleAMQQueueTest.testSubscriptionSpecificRequeueForQueueWithMultipleSubscriptions
> -----------------------------------------------------------------------------------------------------------------
>
>                 Key: QPID-3164
>                 URL: https://issues.apache.org/jira/browse/QPID-3164
>             Project: Qpid
>          Issue Type: Bug
>          Components: Java Tests
>    Affects Versions: 0.10, 0.11
>            Reporter: Keith Wall
>            Assignee: Keith Wall
>
> QPID-2900 added a new test case SimpleAMQQueueTest.testSubscriptionSpecificRequeueForQueueWithMultipleSubscriptions
which aims to verify that the method SimpleAMQQueue.requeue(QueueEntry, Subscription) behaves
correctly and correctly requeues a entry for a specific subscription.   The test is showing
sporadic test failures.
> junit.framework.AssertionFailedError: Unexpected total number of messages sent to subscription1
after enqueue expected:<1> but was:<0>
> 	at org.apache.qpid.server.queue.SimpleAMQQueueTest.testSubscriptionSpecificRequeueForQueueWithMultipleSubscriptions(SimpleAMQQueueTest.java:453)
> 	at org.apache.qpid.test.utils.QpidTestCase.run(QpidTestCase.java:120)
> I notice that the test case has even failed on the new Jenkins instance:
> https://builds.apache.org/hudson/pview/job/qpid-java-build/7/testReport/junit/org.apache.qpid.server.queue/SimpleAMQQueueTest/testSubscriptionSpecificRequeueForQueueWithMultipleSubscriptions/

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:dev-subscribe@qpid.apache.org


Mime
View raw message