[X] I have read Caveats documentation and didn't find a solution for this problem there.
Bug description
I'm running into a problem that doesn't make sense to me:
Expected SQSClient to receive "DeleteMessageCommand" with {"QueueUrl": "https://sqs.us-west-2.amazonaws.com/***", "ReceiptHandle": "***"}
SQSClient received matching "DeleteMessageCommand" 0 times
I'm writing tests for a long polling loop. Inside the loop I call (and await) a function, like sendToQueue in the reproduction, that sends the message to another queue, and deletes it from the current queue.
I don't understand why DeleteMessageCommand is not being shown as being called by the test runner.
If I remove the code that performs the "SendMessageCommand", or move the code to "DeleteMessageCommand" before "SendMessageCommand", then I see that "DeleteMessageCommand" was called. In the case I run "DeleteMessageCommand" before "SendMessageCommand," then it shows "SendMessageCommand" was not called.
It seems like the test cannot recognize both as being called, however when I run the function in production against the actual queue it appears the messages are both sent and deleted properly.
*Sorry I'm new to AWS SQS, writing tests, and creating github issues, so please have mercy. :)
Checklist
Bug description
I'm running into a problem that doesn't make sense to me:
I'm writing tests for a long polling loop. Inside the loop I call (and await) a function, like sendToQueue in the reproduction, that sends the message to another queue, and deletes it from the current queue.
I don't understand why DeleteMessageCommand is not being shown as being called by the test runner.
If I remove the code that performs the "SendMessageCommand", or move the code to "DeleteMessageCommand" before "SendMessageCommand", then I see that "DeleteMessageCommand" was called. In the case I run "DeleteMessageCommand" before "SendMessageCommand," then it shows "SendMessageCommand" was not called.
It seems like the test cannot recognize both as being called, however when I run the function in production against the actual queue it appears the messages are both sent and deleted properly.
*Sorry I'm new to AWS SQS, writing tests, and creating github issues, so please have mercy. :)
Reproduction
Environment