You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@qpid.apache.org by Robbie Gemmell <ro...@gmail.com> on 2012/03/11 22:31:01 UTC

Python broker tests and C++ vs Java broker message counting behaviour

Hi all,

As per https://issues.apache.org/jira/browse/QPID-3587, a number of
the Python based broker tests currently fail when run against the Java
broker because they depend on the differing behaviour of the C++
broker when it comes to counting the number of messages on the queue.
The Java broker includes acquired messages in its counts because it
still considers them to be on the queue (because they are), whereas it
seems the C++ broker removes them from its counts. If the tests are
modified to expect the Java brokers behaviour then they pass against
the Java broker, but obviously would then fail against the C++ broker.

It would be good to get these tests running against the Java broker so
that we can actually discover if they ever legitimately begin failing
due to changes that have been made. We could add 'if includeAcquired
else' behaviour to the tests but it would be nice to avoid that if
possible. I saw mention on a JIRA of the C++ broker possibly adopting
the behaviour used by the Java broker in future, and wondered if there
are there actually solid plans to do this in the near'ish future, or
whether we should instead just look to modify the tests now to allow
for either behaviour?

Robbie

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@qpid.apache.org
For additional commands, e-mail: dev-help@qpid.apache.org


Re: Python broker tests and C++ vs Java broker message counting behaviour

Posted by Gordon Sim <gs...@redhat.com>.
On 03/11/2012 09:31 PM, Robbie Gemmell wrote:
> As per https://issues.apache.org/jira/browse/QPID-3587, a number of
> the Python based broker tests currently fail when run against the Java
> broker because they depend on the differing behaviour of the C++
> broker when it comes to counting the number of messages on the queue.
> The Java broker includes acquired messages in its counts because it
> still considers them to be on the queue (because they are), whereas it
> seems the C++ broker removes them from its counts. If the tests are
> modified to expect the Java brokers behaviour then they pass against
> the Java broker, but obviously would then fail against the C++ broker.
>
> It would be good to get these tests running against the Java broker so
> that we can actually discover if they ever legitimately begin failing
> due to changes that have been made. We could add 'if includeAcquired
> else' behaviour to the tests but it would be nice to avoid that if
> possible. I saw mention on a JIRA of the C++ broker possibly adopting
> the behaviour used by the Java broker in future, and wondered if there
> are there actually solid plans to do this in the near'ish future, or
> whether we should instead just look to modify the tests now to allow
> for either behaviour?

I think the best solution would be to modify those tests to not rely on 
queue_query (e.g. subscribe in non-acquired mode and see what messages 
are actually available, which looks to me like being in most cases more 
accurately what is being tested).

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@qpid.apache.org
For additional commands, e-mail: dev-help@qpid.apache.org