etcd
etcd copied to clipboard
tests: add WaitLeader function to common framework
Background and Purpose
In the process of migrating tests to common framework(see #13637), I found there are many test cases depending on WaitLeader function, which blocks callers until all endpoints agree on the same leader.
Operations such as member add and move-leader would fail before all endpoints agree on the same leader. To test these operations properly, it is recommended that a WaitLeader function should be added to common framework.
What I have done
WaitLeader function has already been implemented in integration cluster, but not in e2e cluster.
I have written some code(#14304 ) to implement it in e2e cluster, and added it to common framework.
As I'm new to ETCD, I would love to hear more advice👏
btw
This image shows where existing WaitLeader function is referenced:
