mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-22 03:11:40 +00:00
etcd3/store: call a generic cancelled watch test
Signed-off-by: Steve Kuznetsov <skuznets@redhat.com>
This commit is contained in:
parent
774870611c
commit
c0fc817255
@ -137,6 +137,10 @@ func TestWatchError(t *testing.T) {
|
|||||||
|
|
||||||
func TestWatchContextCancel(t *testing.T) {
|
func TestWatchContextCancel(t *testing.T) {
|
||||||
ctx, store, _ := testSetup(t)
|
ctx, store, _ := testSetup(t)
|
||||||
|
RunTestWatchContextCancel(ctx, t, store)
|
||||||
|
}
|
||||||
|
|
||||||
|
func RunTestWatchContextCancel(ctx context.Context, t *testing.T, store storage.Interface) {
|
||||||
canceledCtx, cancel := context.WithCancel(ctx)
|
canceledCtx, cancel := context.WithCancel(ctx)
|
||||||
cancel()
|
cancel()
|
||||||
// When we watch with a canceled context, we should detect that it's context canceled.
|
// When we watch with a canceled context, we should detect that it's context canceled.
|
||||||
|
Loading…
Reference in New Issue
Block a user