Merge pull request #55853 from guangxuli/fix_scheduler_test

Automatic merge from submit-queue (batch tested with PRs 56308, 54304, 56364, 56388, 55853). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

httptest server should be close since Close issue has been fixed

**What this PR does / why we need it**:
per https://github.com/kubernetes/kubernetes/issues/19254, the issue seem to be fix for a long time and `server.Close` is no longer a issue in current related golang version, so it's time to uncomment the server.Close(). 

**Which issue(s) this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close the issue(s) when PR gets merged)*:
Fixes #
None
**Special notes for your reviewer**:

**Release note**:

```release-note
None
```
This commit is contained in:
Kubernetes Submit Queue 2017-12-15 02:04:45 -08:00 committed by GitHub
commit e2e5f2339b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -376,8 +376,7 @@ func TestInvalidHardPodAffinitySymmetricWeight(t *testing.T) {
T: t,
}
server := httptest.NewServer(&handler)
// TODO: Uncomment when fix #19254
// defer server.Close()
defer server.Close()
client := clientset.NewForConfigOrDie(&restclient.Config{Host: server.URL, ContentConfig: restclient.ContentConfig{GroupVersion: &legacyscheme.Registry.GroupOrDie(v1.GroupName).GroupVersion}})
// factory of "default-scheduler"
informerFactory := informers.NewSharedInformerFactory(client, 0)