I addressed these in v5. 0001 is unchanged.
> I think we could simplify the tests by
> introducing a boolean variable, say, leader_participates
> ...
I am not convinced that this change made things simpler, but it is
included in 0002.
> While not a problem with this patch, I wish wait_for_log could either return
> the match, or at least the offset of the match, and not just the size of the
> file. If we had that we could avoid reading excessive amounts of log data and
> reduce the risk of buggy tests matching on the wrong part of the log.
I ended up completely removing that test, it seemed redundant.