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 ]|
|Transition||Time In Source Status||Execution Times||Last Executer||Last Execution Date|
|66d 22h 20m||1||John Fung||01/Jul/13 22:34|
|21d 19h 1m||1||Jun Rao||23/Jul/13 17:36|