-
Notifications
You must be signed in to change notification settings - Fork 638
Fixing muted SQS tests #1234
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fixing muted SQS tests #1234
Conversation
⚪
|
# shouldn't get any error | ||
result_list = self._read_single_message_no_wait(queue1_url) | ||
assert len(result_list) == 0 or result_list[0]['Body'] == msg_body | ||
# waiting until the message appears in queue1 again |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Проблема была в том, что self._read_single_message_no_wait(queue1_url)
могла прочитать как 1, так и 0 сообщений. Тесть падал, когда вычитвалось 1. Фикс - читать, дожидаясь этого сообщения.
|
||
self._sqs_api.send_message(queue_url, "bar") | ||
self._sqs_api.purge_queue(queue_url) | ||
for _ in range(20): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Очень редко счётчик успевал упасть до 0. Опытным путём выяснилось, что 20 после таких итераций счётчик будет точно больше 0, а точного значения тут на самом деле и не нужно.
⚪
|
rebase please |
04da00c
to
bc5ffaf
Compare
Rebased, there were no conflicts |
No description provided.