summaryrefslogtreecommitdiff
path: root/qpid/cpp/src/tests/ring_queue_test
diff options
context:
space:
mode:
authorGordon Sim <gsim@apache.org>2009-09-28 12:12:41 +0000
committerGordon Sim <gsim@apache.org>2009-09-28 12:12:41 +0000
commit02b0ce4c311580b3f945e0a16cdabf8de8142e3d (patch)
tree513f02c8c09c1a543436d142738b4bff2fbbb8ab /qpid/cpp/src/tests/ring_queue_test
parent70cf28cc70064a4f693cd8549aa12a698bcee967 (diff)
downloadqpid-python-02b0ce4c311580b3f945e0a16cdabf8de8142e3d.tar.gz
QPID-2102: Changed QueuePolicy to rely on external locking and require dequeues to be handled by policy user rather.
(r817742 introduced a deadlock in ring queue policy which this checkin fixes) git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@819505 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/cpp/src/tests/ring_queue_test')
-rwxr-xr-xqpid/cpp/src/tests/ring_queue_test7
1 files changed, 4 insertions, 3 deletions
diff --git a/qpid/cpp/src/tests/ring_queue_test b/qpid/cpp/src/tests/ring_queue_test
index 5805989d7e..553746eb49 100755
--- a/qpid/cpp/src/tests/ring_queue_test
+++ b/qpid/cpp/src/tests/ring_queue_test
@@ -48,7 +48,7 @@ receive() {
cleanup() {
rm -f sender_${QUEUE_NAME}_* receiver_${QUEUE_NAME}_*
- qpid-config $BROKER_URL add queue $QUEUE_NAME
+ qpid-config $BROKER_URL del queue $QUEUE_NAME --force
}
log() {
@@ -64,10 +64,11 @@ validate() {
if [[ $RECEIVERS -eq 0 ]]; then
#queue should have $LIMIT messages on it, but need to send an eos also
sender --routing-key $QUEUE_NAME --send-eos 1 < /dev/null
- if [[ $(receiver --queue $QUEUE_NAME --browse | wc -l) -eq $(( $LIMIT - 1)) ]]; then
+ received=$(receiver --queue $QUEUE_NAME --browse | wc -l)
+ if [[ received -eq $(( $LIMIT - 1)) ]]; then
log "queue contains $LIMIT messages as expected"
else
- fail "queue does not contain the expected $LIMIT messages"
+ fail "queue does not contain the expected $LIMIT messages (received $received)"
fi
elif [[ $CONCURRENT -eq 0 ]]; then
#sum of length of all output files should be equal to $LIMIT - $RECEIVERS (1 eos message each)