etcd icon indicating copy to clipboard operation
etcd copied to clipboard

tests: add WaitLeader function to common framework

Open clement2026 opened this issue 3 years ago • 0 comments

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: image

clement2026 avatar Aug 03 '22 09:08 clement2026