mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-26 13:07:07 +00:00
Merge pull request #38739 from foxyriver/close
Automatic merge from submit-queue Object r repeat close **What this PR does / why we need it**: Object r repeat close. each end of the for loop, the object r has been closed. so omitting defer r.close(), to avoid repeat close. **Special notes for your reviewer**: **Release note**: ```release-note ```
This commit is contained in:
commit
9bd1b90c33
@ -299,6 +299,7 @@ func TestWatchRead(t *testing.T) {
|
|||||||
|
|
||||||
for _, protocol := range protocols {
|
for _, protocol := range protocols {
|
||||||
for _, test := range testCases {
|
for _, test := range testCases {
|
||||||
|
func() {
|
||||||
info, ok := runtime.SerializerInfoForMediaType(api.Codecs.SupportedMediaTypes(), test.MediaType)
|
info, ok := runtime.SerializerInfoForMediaType(api.Codecs.SupportedMediaTypes(), test.MediaType)
|
||||||
if !ok || info.StreamSerializer == nil {
|
if !ok || info.StreamSerializer == nil {
|
||||||
t.Fatal(info)
|
t.Fatal(info)
|
||||||
@ -359,8 +360,7 @@ func TestWatchRead(t *testing.T) {
|
|||||||
if err == nil {
|
if err == nil {
|
||||||
t.Errorf("Unexpected non-error")
|
t.Errorf("Unexpected non-error")
|
||||||
}
|
}
|
||||||
|
}()
|
||||||
r.Close()
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user