summaryrefslogtreecommitdiff
path: root/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
commit9376922f0fce58400c1e9b5b20f6c6f7b279a55b (patch)
tree52b9422da0032defb0b3b94caef6ec168e264efd /cpp/src/tests/ring_queue_test
parent46b7c031c27b7c047d7f2361c4d8287ee1578f05 (diff)
downloadqpid-python-9376922f0fce58400c1e9b5b20f6c6f7b279a55b.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/qpid@819505 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/src/tests/ring_queue_test')
-rwxr-xr-xcpp/src/tests/ring_queue_test7
1 files changed, 4 insertions, 3 deletions
diff --git a/cpp/src/tests/ring_queue_test b/cpp/src/tests/ring_queue_test
index 5805989d7e..553746eb49 100755
--- a/cpp/src/tests/ring_queue_test
+++ b/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)