Merge pull request #4711 from heyitsanthony/nuke-invfuturerev-test

clientv3/integration: remove invalid future revision test
This commit is contained in:
Anthony Romano 2016-03-07 16:07:53 -08:00
commit 8e203b7bd5

View File

@ -333,31 +333,6 @@ func putAndWatch(t *testing.T, wctx *watchctx, key, val string) {
}
}
func TestWatchInvalidFutureRevision(t *testing.T) {
defer testutil.AfterTest(t)
clus := integration.NewClusterV3(t, &integration.ClusterConfig{Size: 3})
defer clus.Terminate(t)
w := clientv3.NewWatcher(clus.RandClient())
defer w.Close()
rch := w.Watch(context.Background(), "foo", clientv3.WithRev(100))
wresp, ok := <-rch // WatchResponse from canceled one
if !ok {
t.Fatalf("expected wresp 'open'(ok true), but got ok %v", ok)
}
if wresp.Err() != v3rpc.ErrFutureRev {
t.Fatalf("wresp.Err() expected ErrFutureRev, but got %v", wresp.Err())
}
_, ok = <-rch // ensure the channel is closed
if ok != false {
t.Fatalf("expected wresp 'closed'(ok false), but got ok %v", ok)
}
}
// TestWatchCompactRevision ensures the CompactRevision error is given on a
// compaction event ahead of a watcher.
func TestWatchCompactRevision(t *testing.T) {