rabbitmq / rabbitmq-tutorials

Tutorials for using RabbitMQ in various ways

Home Page:http://www.rabbitmq.com/getstarted.html

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Writing Unit Tests

acarlstein opened this issue · comments

Greetings, I am trying to figure out the best way to write unit tests against these examples.

I tried to use the package amqp-mock but its not compatible (for example, yours use close(), and the mock uses done()).

Would you mind to provide some examples or point me to where I could read some examples?

Thank you for your time.

Team RabbitMQ uses GitHub issues for specific actionable items engineers can work on. GitHub issues are not used for questions, investigations, root cause analysis, discussions of potential issues, etc (as defined by this team).

We get at least a dozen of questions through various venues every single day, often light on details.
At that rate GitHub issues can very quickly turn into a something impossible to navigate and make sense of even for our team. Because GitHub is a tool our team uses heavily nearly every day, the signal/noise ratio of issues is something we care about a lot.

Please post this to rabbitmq-users.

Thank you.

Hello - I suggest checking out the test suite for this library, perhaps.

If you have specific tests in mind, give it your best shot, put your work in a git repository or gist, and ask a question on the rabbitmq-users mailing list or Stack Overflow. Someone may be able to help you out there.

I personally believe in integration tests and not mocking. Bunny tests demonstrate some approaches that should be applicable to any client library or programming language. Don't forget that integration tests of messaging systems are inherently asynchronous and concurrent so the hardest part is usually knowing what event to wait for and how, and using sensible timeouts.