tumblr/colossus — pull request #25 by DanSimon (2014-11-21 16:56:01+00:00)
Title: New logic for Workeritems, fixing lots of tests

This introduces a fairly low-level change about how connection handlers interact with workers. Previously, we tracked active connections attached to a worker, but not the handlers attached to connections. This became an issue with ServiceClients, which can automatically reconnect if unexpectedly disconnected. During the time in which the client was reconnecting, it was not at all bound to the worker, so if someone tried to send a message to the client handler (such as with the `AsyncServiceClient`), the message would be lost.

Now we have a clear distinction between tracking connections and connection handlers, such that a connection handler can detach and re-attach to connections without becoming unbound from the worker. In particular a client connection handler can now control when it becomes unbound from a worker (server handlers are still always onbound when their attached connection is closed).

Also fixed a whole bunch of tests, including all the tests that have been randomly failing in travis.