Currently the system test reads the new leader from a broker log statement on completion of become-leader state transition. The log statements can change with time and can also move around.
We can read the leader info from zookeeper given a topic, partition. The path is #2 at https://cwiki.apache.org/confluence/display/KAFKA/Kafka+data+structures+in+Zookeeper. The Zookeeper data structures are unlikely to change in foreseeable future.
|Status||Open [ 1 ]||Patch Available [ 10002 ]|
|Status||Patch Available [ 10002 ]||Resolved [ 5 ]|
|Fix Version/s||0.8 [ 12317244 ]|
|Resolution||Fixed [ 1 ]|
|Workflow||no-reopen-closed, patch-avail [ 12779204 ]||Apache Kafka Workflow [ 13052593 ]|
|Workflow||Apache Kafka Workflow [ 13052593 ]||no-reopen-closed, patch-avail [ 13055283 ]|