Object r repeat close

This commit is contained in:
foxyriver 2016-12-14 08:54:04 +08:00
parent 5ab741deed
commit 7345b94387

View File

@ -299,6 +299,7 @@ func TestWatchRead(t *testing.T) {
for _, protocol := range protocols {
for _, test := range testCases {
func() {
info, ok := runtime.SerializerInfoForMediaType(api.Codecs.SupportedMediaTypes(), test.MediaType)
if !ok || info.StreamSerializer == nil {
t.Fatal(info)
@ -359,8 +360,7 @@ func TestWatchRead(t *testing.T) {
if err == nil {
t.Errorf("Unexpected non-error")
}
r.Close()
}()
}
}
}