-
Notifications
You must be signed in to change notification settings - Fork 11
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
ZMQStream mocking to reduce flakiness #81
Comments
I like the idea of |
Yes, there should be a separation. Unit tests should be plenty, but fast, On Wed, Feb 11, 2015 at 1:09 AM, Nicolas Delaby [email protected]
|
https://github.com/chainreactionmfg/cara/blob/master/tests/cara_pseud_test.py
To reduce flakiness, I took the mocking route and mocked out ZMQStream and ZMQContext. The downside was that I had to implement the ROUTER behavior in the mocked ZMQStream, but now I don't even open a port to test my code and so I can run it a hundred times (in parallel) without any failures. Of course, 100 parallel py.test instances take 40 seconds to return, but none fail now when at least 20% failed before.
Another benefit is I can check the packets that go by for the correct sender, receiver, and data. If you're interested, I can look into putting the fixture into pseud or into a separate shared project like pytest-zmq?
The text was updated successfully, but these errors were encountered: