mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-30 15:05:27 +00:00
etcd3/store: update cancelled watch test to be generic
There's no reason to create the watch using the underlying watcher. Signed-off-by: Steve Kuznetsov <skuznets@redhat.com>
This commit is contained in:
parent
543893cbb0
commit
774870611c
@ -141,7 +141,10 @@ func TestWatchContextCancel(t *testing.T) {
|
||||
cancel()
|
||||
// When we watch with a canceled context, we should detect that it's context canceled.
|
||||
// We won't take it as error and also close the watcher.
|
||||
w, err := store.watcher.Watch(canceledCtx, "/abc", 0, false, false, storage.Everything)
|
||||
w, err := store.Watch(canceledCtx, "/abc", storage.ListOptions{
|
||||
ResourceVersion: "0",
|
||||
Predicate: storage.Everything,
|
||||
})
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user