Skip to content
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

Writing Unit Tests #177

Closed
acarlstein opened this issue Sep 4, 2018 · 3 comments
Closed

Writing Unit Tests #177

acarlstein opened this issue Sep 4, 2018 · 3 comments

Comments

@acarlstein
Copy link

acarlstein commented Sep 4, 2018

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?

@michaelklishin
Copy link
Member

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.

@lukebakken
Copy link
Contributor

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.

@michaelklishin
Copy link
Member

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants