Closed narbsy closed 9 years ago
because we use ephemeral nodes, you would eventually get this anyway after the timeout interval. however, this is indeed the correct behavior. thanks!
Ah, right :) good point. This is nice to not have to wait for the timeout.
Thanks!
While investigating using nerve & synapse at work, we stumbled across the fact that the ZK reporter doesn't automatically deregister the watched service on exit, but the etcd reporter does.
Our use case involves running a nerve instance within a docker image to get some nice automatic service discovery and a lifecycle that corresponds directly with that of the image -- if the image goes down, we want to make sure anything running within is reported as down.
I've added de-registering when stopping the ZK reporter and attempted to add a test that shows the expected lifecycle. I'm not a huge fan of it as it mocks literally everything, and is somewhat difficult to generalize to the etcd reporter as well.
Let me know what needs to be done to get this merged in. Thanks!