The first test succeeds. The second test fails, when it attempts to bind "tcp://127.0.0.1:9502", with "ZMQError: Address already in use", which then gets wrapped into RPCException("Could not open socket").
So the obvious conclusion is that we're not closing ZMQ sockets after we're done with them.
If I comment out the first test, then the second test succeeds and the third test fails, supporting that conclusion.
But I don't see why the cleanup code fails yet. I see code that does attempt to clean them up (tearDown calls ZmqBaseReactor.close, which iterates over its sockets and calls close() on each.) And it's being called.
The first test succeeds. The second test fails, when it attempts to bind "tcp:// 127.0.0. 1:9502" , with "ZMQError: Address already in use", which then gets wrapped into RPCException("Could not open socket").
So the obvious conclusion is that we're not closing ZMQ sockets after we're done with them.
If I comment out the first test, then the second test succeeds and the third test fails, supporting that conclusion.
But I don't see why the cleanup code fails yet. I see code that does attempt to clean them up (tearDown calls ZmqBaseReactor. close, which iterates over its sockets and calls close() on each.) And it's being called.