You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@qpid.apache.org by Gordon Sim <gs...@redhat.com> on 2007/01/23 12:12:39 UTC

[java] some python tests still failing for me

The following python tests still fail for me when running against the 
java broker:

test_basic_delivery_immediate (tests.broker.BrokerTests) ... ERROR
test_basic_delivery_queued (tests.broker.BrokerTests) ... ERROR
test_example (tests.example.ExampleTest) ... ERROR

In each case the cause seems to be a channel exception 'Cannot declare 
queue, as exclusive queue with same name declared on another connection 
[error code 405]'.

In each case the problem appears to be a queue called 'test-queue'. I 
would speculate that there is a queue of the same name declared as 
exclusive in an earlier test that hasn't been cleaned up on termination 
of the connection (which I assume happens at the end of every test).

I have made a change to the python client, but tested with and without 
that change and in both cases the result was the same.

Is anyone else seeing this? Is it a new error?

Re: [java] some python tests still failing for me

Posted by Gordon Sim <gs...@redhat.com>.
Robert Godfrey wrote:
> Odd - that *definitely* didn't happen for me when I created the patch 
> :-)...
> 
> 
> are you using the BDB or Memory message store?

MemoryMessageStore. Are you not seeing the same behaviour?

Re: [java] some python tests still failing for me

Posted by Gordon Sim <gs...@redhat.com>.
Robert Godfrey wrote:
> OK - there are a few more implications to this than is obvious at first
> sight...
> 
> namely when we create a durable subscription to a topic through JMS we
> create the durable queue as "exclusive".
> 
> That is we are expecting that only the specified client will be able to
> consume from it.
> 
> That is not the same as saying that only this "user" should be able to
> consume from this queue (which would be an ACL controlled prescription).
> Nor is it the same as saying that only the current connection can subscribe
> to this queue (which is what the current "exclusive" implies).
> 
> I am not sure that exclusive should imply auto-delete... but that exclusive
> should in fact be based on "client identity".  Therefore if a client is
> disconnected for some reason, they can re-connect and pick up where they
> left off.
> 
> Thoughts?

As well as declaring a queue as 'exclusive' (meaning only to be used by 
this connection, and hence implying that the queue is deleted when the 
connection is terminated), there is the ability to request exclusive 
consumption from a queue (through the exclusive field in basic_consume). 
The latter ensures that only the current consumer is receiving messages 
from that queue. Perhaps that would be a better way to guarantee 
exclusive access to a durable subscription (at least in terms of the 
current spec)?

The dual use of the name 'exclusive' confused me in the past as well and 
using 'private' for the queue_declare field has been suggested in the 
past to try to avoid this.

Re: [java] some python tests still failing for me

Posted by Robert Godfrey <ro...@gmail.com>.
OK - there are a few more implications to this than is obvious at first
sight...

namely when we create a durable subscription to a topic through JMS we
create the durable queue as "exclusive".

That is we are expecting that only the specified client will be able to
consume from it.

That is not the same as saying that only this "user" should be able to
consume from this queue (which would be an ACL controlled prescription).
Nor is it the same as saying that only the current connection can subscribe
to this queue (which is what the current "exclusive" implies).

I am not sure that exclusive should imply auto-delete... but that exclusive
should in fact be based on "client identity".  Therefore if a client is
disconnected for some reason, they can re-connect and pick up where they
left off.

Thoughts?

-Rob

Re: [java] some python tests still failing for me

Posted by Robert Godfrey <ro...@gmail.com>.
OK - got it

The Broker was incorrectly not treating exclusive queues as auto-delete.

will create a JIRA / patch presently.

- Rob

Re: [java] some python tests still failing for me

Posted by Robert Godfrey <ro...@gmail.com>.
OK - for me (on Memory Store) first run of the tests will pass all 42 that
are not in the ignore file.

the second run, on the other hand....

======================================================================
ERROR: test_ack (tests.basic.BasicTests)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "C:\newQpid\python\tests\basic.py", line 150, in test_ack
    channel.queue_declare(queue="test-ack-queue", exclusive=True)
  File "<string>", line 3, in queue_declare
  File "C:\newQpid\python\qpid\peer.py", line 188, in invoke
    raise Closed(self.reason)
Closed: Method(name=close, id=40) (405, 'Cannot declare queue, as exclusive
queue with same name declared on another connection [error code 405]', 50,
10) content = None

... and so on

I shall have a look why these aren't being cleaned up.

- Rob

Re: [java] some python tests still failing for me

Posted by Robert Godfrey <ro...@gmail.com>.
Odd - that *definitely* didn't happen for me when I created the patch :-)...


are you using the BDB or Memory message store?

- Rob


On 23/01/07, Gordon Sim <gs...@redhat.com> wrote:
>
> Robert Godfrey wrote:
> > Hi Gordon,
> >
> > I will re-test.  There were definitely previously problems with the
> > connection not cleaning up after itself properly, but i though I had
> fixed
> > them all.  Will double check.
> >
> > Do the tests at least all run through the first time?
>
> No, I get those errors after running the tests against a newly started
> broker.
>

Re: [java] some python tests still failing for me

Posted by Gordon Sim <gs...@redhat.com>.
Robert Godfrey wrote:
> Hi Gordon,
> 
> I will re-test.  There were definitely previously problems with the
> connection not cleaning up after itself properly, but i though I had fixed
> them all.  Will double check.
> 
> Do the tests at least all run through the first time?

No, I get those errors after running the tests against a newly started 
broker.

Re: [java] some python tests still failing for me

Posted by Robert Godfrey <ro...@gmail.com>.
Hi Gordon,

I will re-test.  There were definitely previously problems with the
connection not cleaning up after itself properly, but i though I had fixed
them all.  Will double check.

Do the tests at least all run through the first time?

- Rob


On 23/01/07, Gordon Sim <gs...@redhat.com> wrote:
>
> The following python tests still fail for me when running against the
> java broker:
>
> test_basic_delivery_immediate (tests.broker.BrokerTests) ... ERROR
> test_basic_delivery_queued (tests.broker.BrokerTests) ... ERROR
> test_example (tests.example.ExampleTest) ... ERROR
>
> In each case the cause seems to be a channel exception 'Cannot declare
> queue, as exclusive queue with same name declared on another connection
> [error code 405]'.
>
> In each case the problem appears to be a queue called 'test-queue'. I
> would speculate that there is a queue of the same name declared as
> exclusive in an earlier test that hasn't been cleaned up on termination
> of the connection (which I assume happens at the end of every test).
>
> I have made a change to the python client, but tested with and without
> that change and in both cases the result was the same.
>
> Is anyone else seeing this? Is it a new error?
>