Commit b3bc741d authored by Mike Danese's avatar Mike Danese

Merge pull request #21032 from sjenning/fix-flake-20910

e2e: use runId UUID for staticIPName to avoid collision
parents f0061c71 982af896
......@@ -489,8 +489,7 @@ var _ = Describe("Services", func() {
staticIPName := ""
if providerIs("gce", "gke") {
By("creating a static load balancer IP")
rand.Seed(time.Now().UTC().UnixNano())
staticIPName = fmt.Sprintf("e2e-external-lb-test-%d", rand.Intn(65535))
staticIPName = fmt.Sprintf("e2e-external-lb-test-%s", runId)
requestedIP, err = createGCEStaticIP(staticIPName)
Expect(err).NotTo(HaveOccurred())
defer func() {
......@@ -789,6 +788,7 @@ var _ = Describe("Services", func() {
}
outOfRangeNodePort := 0
rand.Seed(time.Now().UTC().UnixNano())
for {
outOfRangeNodePort = 1 + rand.Intn(65535)
if !ServiceNodePortRange.Contains(outOfRangeNodePort) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment