mgodave/barge — pull request #56 by abailly (2014-02-04 04:54:57+00:00)
Title: Wait for leader election on group of counters

This change is done to make integration tests more robust and faster. It introduces a state transition listening mechanism within the RaftContext that is used to check a leader has been elected and not rely on arbitrary wait time (of course, there is still a timeout...). I had to expose the `StateType` of each `State` instance in a specific method on the interface.

It should be generalised to allow retrieval of the leader's identity but it seems non straightforward to recover the information from Context.