Motiva-AI / clj-sqs-extended

Client library for AWS SQS with support for large messages, up to 2GB. This is a Clojure wrapper for https://github.com/awslabs/amazon-sqs-java-extended-client-lib
MIT License
3 stars 0 forks source link

Timing problem between returned stop-fn and with-...-queue fixtures #27

Closed ghost closed 4 years ago

ghost commented 4 years ago

There is currently a sleep workaround in place inside the test-fixtures.clj

Without this pause, its possible that the queue get deleted by the fixture while a listener thread is still trying to read it which will cause an exception. That doesn't influence the test result, but still shouldn't happen. In a real-world situation it is highly unlikely that someone suddenly kills the used queue and if that happens the exception is correct.

For the test cases it would still be nice to have a cleaner way here.

Maybe we can make use of wait-for here, too? See #44