etcd3/store: call a generic cancelled watch test
Signed-off-by: Steve Kuznetsov <skuznets@redhat.com> Kubernetes-commit: c0fc8172559f7796560a9b80fd23df92095adb14
This commit is contained in:
parent
7b82bba67e
commit
fe17bc776e
|
|
@ -137,6 +137,10 @@ func TestWatchError(t *testing.T) {
|
|||
|
||||
func TestWatchContextCancel(t *testing.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)
|
||||
cancel()
|
||||
// When we watch with a canceled context, we should detect that it's context canceled.
|
||||
|
|
|
|||
Loading…
Reference in New Issue