mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00
integration: retry on setKey to avoid timeout due to bootstrap
This commit is contained in:
parent
500a72962e
commit
80212aaf4d
@ -34,7 +34,13 @@ func testCluster(t *testing.T, size int) {
|
||||
c.Launch(t)
|
||||
for i := 0; i < size; i++ {
|
||||
for _, u := range c.Members[i].ClientURLs {
|
||||
if err := setKey(u, "/foo", "bar"); err != nil {
|
||||
var err error
|
||||
for j := 0; j < 3; j++ {
|
||||
if err = setKey(u, "/foo", "bar"); err == nil {
|
||||
break
|
||||
}
|
||||
}
|
||||
if err != nil {
|
||||
t.Errorf("setKey on %v error: %v", u.String(), err)
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user