mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00
test: Migrate WaitStarted to V3 API
This commit is contained in:
parent
ee6306b9f9
commit
81490c25d1
@ -1065,11 +1065,9 @@ func (m *Member) WaitOK(t testutil.TB) {
|
||||
}
|
||||
|
||||
func (m *Member) WaitStarted(t testutil.TB) {
|
||||
cc := MustNewHTTPClient(t, []string{m.URL()}, m.ClientTLSInfo)
|
||||
kapi := client.NewKeysAPI(cc)
|
||||
for {
|
||||
ctx, cancel := context.WithTimeout(context.Background(), RequestTimeout)
|
||||
_, err := kapi.Get(ctx, "/", nil)
|
||||
_, err := m.Client.Get(ctx, "/", clientv3.WithSerializable())
|
||||
if err != nil {
|
||||
time.Sleep(TickDuration)
|
||||
continue
|
||||
|
Loading…
x
Reference in New Issue
Block a user