qpid-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Oleksandr Rudyy <oru...@gmail.com>
Subject Re: ExecutionException is sent by cpp broker in response for "queue.query" command for a deleted queue
Date Wed, 16 Nov 2011 16:38:20 GMT
Thanks Gordon

On 15 November 2011 09:54, Gordon Sim <gsim@redhat.com> wrote:
> On 11/14/2011 08:25 PM, Oleksandr Rudyy wrote:
>>
>> Hi,
>>
>> I would like to bring to your attention that java test
>>
>> org.apache.qpid.test.client.destination.AddressBasedDestinationTest.testDeleteOptions
>> started to fail constantly against cpp broker.
>>
>> The test is written to test a queue deletion if a "delete" option is
>> specified in address URL.
>> It tests a queue deletion for all 3 possible values of the delete
>> option: always, receiver and sender.
>>
>> For all these cases test creates a producer and a consumer on test
>> queues and uses "queue.query" command to check the queue existing
>> after closing the consumer/producer.
>>
>> On closing the consumer/producer the queue is deleted and
>> ExecutionResullt with QueueQueryResult object is expected to be
>> received by the test in response for "queue.query" command.
>> For delete options  'always' and 'receiver' the received response is
>> as expected but for delete option 'sender' the
>> ExecutionException(errorCode=RESOURCE_DELETED, description=Queue
>> testQueue3 has been deleted. (qpid/broker/Queue.cpp:1415),
>> errorInfo={}) is sent by the cpp broker on receiving  "queue.query"
>> command for a deleted queue.
>>
>> The last case passed before with some sporadic failures from time to
>> time but now it fails all the time.
>>
>> Here is the snippet of java code which fails
>>
>>         Session jmsSession =
>> _connection.createSession(false,Session.AUTO_ACKNOWLEDGE);
>>         MessageConsumer cons;
>>
>>         ....
>>
>>         String addr3 = "ADDR:testQueue3;{create: always, delete: sender}";
>>         AMQDestination dest = new AMQAnyDestination(addr3);
>>         try
>>         {
>>             cons = jmsSession.createConsumer(dest);
>>             MessageProducer prod = jmsSession.createProducer(dest);
>>             prod.close();
>>         }
>>         catch(JMSException e)
>>         {
>>             fail("Exception should not be thrown. Exception thrown is : "
>> + e);
>>         }
>>
>>         assertFalse("Queue not deleted as expected",(
>>
>>
>> (AMQSession_0_10)jmsSession).isQueueExist(dest,(QueueNode)dest.getSourceNode(),
>> true));
>
> The exception is not being issued by the broker in response to the query. It
> is being issued to the existing open subscriber when the queue is deleted
> from underneath it.
>
> ---------------------------------------------------------------------
> Apache Qpid - AMQP Messaging Implementation
> Project:      http://qpid.apache.org
> Use/Interact: mailto:dev-subscribe@qpid.apache.org
>
>

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


Mime
View raw message