mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00
Merge pull request #6473 from heyitsanthony/watchreconn-putretry
integration: l-read before Put in TestWatchReconnRequest
This commit is contained in:
commit
69c7ea0b4a
@ -211,6 +211,14 @@ func testWatchReconnRequest(t *testing.T, wctx *watchctx) {
|
||||
stopc <- struct{}{}
|
||||
<-donec
|
||||
|
||||
// spinning on dropping connections may trigger a leader election
|
||||
// due to resource starvation; l-read to ensure the cluster is stable
|
||||
ctx, cancel := context.WithTimeout(context.TODO(), 30*time.Second)
|
||||
if _, err := wctx.kv.Get(ctx, "_"); err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
cancel()
|
||||
|
||||
// ensure watcher works
|
||||
putAndWatch(t, wctx, "a", "a")
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user