Merge pull request #6473 from heyitsanthony/watchreconn-putretry

integration: l-read before Put in TestWatchReconnRequest
This commit is contained in:
Anthony Romano 2016-09-19 14:52:26 -07:00 committed by GitHub
commit 69c7ea0b4a

View File

@ -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")
}