mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00
Merge pull request #4711 from heyitsanthony/nuke-invfuturerev-test
clientv3/integration: remove invalid future revision test
This commit is contained in:
commit
8e203b7bd5
@ -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) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user