mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00
Merge pull request #7075 from gyuho/version-pull
e2e: poll '/version' in release upgrade tests
This commit is contained in:
commit
734dd75565
@ -49,6 +49,20 @@ func TestReleaseUpgrade(t *testing.T) {
|
|||||||
t.Fatalf("error closing etcd processes (%v)", errC)
|
t.Fatalf("error closing etcd processes (%v)", errC)
|
||||||
}
|
}
|
||||||
}()
|
}()
|
||||||
|
// 3.0 boots as 2.3 then negotiates up to 3.0
|
||||||
|
// so there's a window at boot time where it doesn't have V3rpcCapability enabled
|
||||||
|
// poll /version until etcdcluster is >2.3.x before making v3 requests
|
||||||
|
for i := 0; i < 7; i++ {
|
||||||
|
if err = cURLGet(epc, cURLReq{endpoint: "/version", expected: `"etcdcluster":"3.0`}); err != nil {
|
||||||
|
t.Logf("#%d: v3 is not ready yet (%v)", i, err)
|
||||||
|
time.Sleep(time.Second)
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
break
|
||||||
|
}
|
||||||
|
if err != nil {
|
||||||
|
t.Fatalf("cannot pull version (%v)", err)
|
||||||
|
}
|
||||||
|
|
||||||
os.Setenv("ETCDCTL_API", "3")
|
os.Setenv("ETCDCTL_API", "3")
|
||||||
defer os.Unsetenv("ETCDCTL_API")
|
defer os.Unsetenv("ETCDCTL_API")
|
||||||
|
Loading…
x
Reference in New Issue
Block a user