MCPcopy
hub / github.com/kubernetes/client-go / TestReflectorWatchHandlerError

Function TestReflectorWatchHandlerError

tools/cache/reflector_test.go:127–139  ·  tools/cache/reflector_test.go::TestReflectorWatchHandlerError
(t *testing.T)

Source from the content-addressed store, hash-verified

125}
126
127func TestReflectorWatchHandlerError(t *testing.T) {
128 s := NewStore(MetaNamespaceKeyFunc)
129 g := NewReflector(&testLW{}, &v1.Pod{}, s, 0)
130 fw := watch.NewFake()
131 go func() {
132 fw.Stop()
133 }()
134 var resumeRV string
135 err := g.watchHandler(fw, &resumeRV, nevererrc, wait.NeverStop)
136 if err == nil {
137 t.Errorf("unexpected non-error")
138 }
139}
140
141func TestReflectorWatchHandler(t *testing.T) {
142 s := NewStore(MetaNamespaceKeyFunc)

Callers

nothing calls this directly

Calls 5

watchHandlerMethod · 0.95
NewStoreFunction · 0.85
NewReflectorFunction · 0.85
StopMethod · 0.65
ErrorfMethod · 0.65

Tested by

no test coverage detected