clientv3/integration: get quorum before watching in TestKVCompact

Fixes #4889
release-3.0
Anthony Romano 2016-03-28 22:18:10 -07:00
parent 6e3a0948e4
commit 096abb3f37
1 changed files with 5 additions and 1 deletions

View File

@ -347,7 +347,11 @@ func TestKVCompact(t *testing.T) {
t.Fatalf("error got %v, want %v", err, rpctypes.ErrFutureRev)
}
wc := clientv3.NewWatcher(clus.RandClient())
wcli := clus.RandClient()
// new watcher could precede receiving the compaction without quorum first
wcli.Get(ctx, "quorum-get")
wc := clientv3.NewWatcher(wcli)
defer wc.Close()
wchan := wc.Watch(ctx, "foo", clientv3.WithRev(3))