Merge pull request #53110 from feiskyer/53901

Automatic merge from submit-queue (batch tested with PRs 52630, 53110, 53136, 53075). 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>.

Fix host network flake tests

**What this PR does / why we need it**:

Fix flaky test "Security Context when creating a pod in the host network namespace should listen on same port in the host network containers".

**Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes #53091

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```
This commit is contained in:
Kubernetes Submit Queue 2017-09-27 12:58:18 -07:00 committed by GitHub
commit 2be6982e3d

View File

@ -230,8 +230,9 @@ var _ = framework.KubeDescribe("Security Context", func() {
listeningPort := ""
var l net.Listener
var err error
BeforeEach(func() {
l, err := net.Listen("tcp", ":0")
l, err = net.Listen("tcp", ":0")
if err != nil {
framework.Failf("Failed to open a new tcp port: %v", err)
}