flow_maint_test... one test will always fail... no appropriate queue declared for moth_api_producer.
Nobody has claimed this yet.
- Dominant language
- Shell
- Stars
- 0
- Forks
- 1
- PR merge metrics
- No merged PRs in 30d
Description
the flow_maint.sh tests in fail because the the moth_api_producer.py publishes a singe message, but there is no consumer queue waiting for it. The script checks for a message in a queue being waited for, but it is never there (because no subscriber queue is bound such that it would keep the message.) so that test always fails.
The publish works fine. It's not a problem with sr3... it's the test that is not set up to ever pass.
sample
.024-07-15 16:01:31,052 [DEBUG] sarracenia.moth.amqp putNewMessage trying to publish body: {"pubTime": "20240715T200131.0341880322", "relPath": "sample.txt", "baseUrl": "http://host", "from_cluster": "localhost", "mode": "644", "size": 335, "mtime": "20240715T200131.0225212574", "atime": "20240715T200131.0225212574", "identity": {"method": "sha512", "value": "w5ZwUT1IMAjnQT6TLR9NSLzG5RKijhxq46FjMx5UWtsHM/FNOaYNRmGwonIPfnhE5xUORf3z5dRyI6zdL6ygNw=="}, "contentType": "text/plain"} headers: {} to xsarra under: v03.post
2024-07-15 16:01:31,052 [DEBUG] sarracenia.moth.amqp putNewMessage published body: {"pubTime": "20240715T200131.0341880322", "relPath": "sample.txt", "baseUrl": "http://host", "from_cluster": "localhost", "mode": "644", "size": 335, "mtime": "20240715T200131.0225212574", "atime": "20240715T200131.0225212574", "identity": {"method": "sha512", "value": "w5ZwUT1IMAjnQT6TLR9NSLzG5RKijhxq46FjMx5UWtsHM/FNOaYNRmGwonIPfnhE5xUORf3z5dRyI6zdL6ygNw=="}, "contentType": "text/plain"} headers: {} to xsarra under: v03.p
.
.
.
test 4 FAILURE: no successful results! moth_api_producer.py should have posted 1 message
from the first message, one can see that it actually did publish the message, but the test checking the result does not see that. The way it checks is to look for messages queued using rabbitmqadmin:
posted_message_count="`rabbitmqadmin -H localhost -u bunnymaster -p ${adminpw} -f tsv list queues | awk 'BEGIN { t=0; }; ( NR > 1 ) { t+=$2; } END { print t; };'`"
printf "count of messages queued is: ${posted_message_count}\n\n"
so it's looking for all messages on the broker, yet no queue is configured such that it will get the posted message, so this test will always fail even with the code working perfectly.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with flow_maint.sh and the moth_api_producer.py test setup, then inspect how rabbitmqadmin lists queue message counts. Verify which queue is expected to receive the published message and how the test broker is configured. Done means the producer test observes one queued message and the flow_maint.sh test passes without changing the producer behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python, rabbitmq, shell
- Domain
- distributed-systems, testing-qa
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100