airbnb / nerve

A service registration daemon that performs health checks; companion to airbnb/synapse
MIT License
942 stars 151 forks source link

Integration tests #12

Closed igor47 closed 11 years ago

igor47 commented 11 years ago

work from @jtai and @nelgau on local integration testing. guys, i'm not sure if you want this stuff in master. please sync up with me.

nelgau commented 11 years ago

@igor47 These tests were written to ferret out the cause of the mass-flapping we saw when a zookeeper node was mysteriously terminated. They were able to reliably confirm Pierre's hypothesis. As you can see, we only wrote as many tests as were necessary to establish the hypothesis. Jon sketched out some more (about twenty), but we never had an opportunity to finish writing them. Most of the work was in building scaffolding for the out-of-process test suite (e.g., bring up a nerve, bringing up zookeepers, writing their configs, sending them signals, etc...) This resulted in short, highly-readable tests.

As I recall, we ended our work on a subtlety — all of these tests were expected to pass for the ideal implementation of nerve, but a few were expected to fail for the Ruby version (due to the limitations of the zookeeper gem).

@jtai Care to comment?

jtai commented 11 years ago

I chatted with Igor about this. I think he wants to have them run in chef-minitest, but a lot of the code can be reused. I leave it to Igor to decide how to run the tests, as long as we have this kind of coverage.

igor47 commented 11 years ago

closing; we've got this kind of integration testing handled in a more reproducible way via chef and vagrant in our cookbook.