Change TestNetwork to allow parallel execution

This commit is contained in:
Satnam Singh
2015-01-23 17:06:13 -08:00
parent 9dfbf46b23
commit 2d1ee816a1
2 changed files with 62 additions and 9 deletions

View File

@@ -18,7 +18,9 @@ package e2e
import (
"io/ioutil"
"math/rand"
"path/filepath"
"strconv"
"time"
"github.com/GoogleCloudPlatform/kubernetes/pkg/api"
@@ -183,3 +185,12 @@ func parseServiceOrDie(json string) *api.Service {
}
return service
}
// TODO: Allow service names to have the same form as names
// for pods and replication controllers so we don't
// need to use such a function and can instead
// use the UUID utilty function.
func randomSuffix() string {
r := rand.New(rand.NewSource(time.Now().UnixNano()))
return strconv.Itoa(r.Int() % 10000)
}