Merge pull request #12215 from ahmetalpbalkan/execdriver/localrand

execdriver/lxc: use local rand.Random in test
This commit is contained in:
Brian Goff 2015-04-09 12:22:25 -04:00
commit 6b7e520aa3
1 changed files with 3 additions and 3 deletions

View File

@ -29,14 +29,14 @@ func TestLXCConfig(t *testing.T) {
os.MkdirAll(path.Join(root, "containers", "1"), 0777) os.MkdirAll(path.Join(root, "containers", "1"), 0777)
// Memory is allocated randomly for testing // Memory is allocated randomly for testing
rand.Seed(time.Now().UTC().UnixNano()) r := rand.New(rand.NewSource(time.Now().UTC().UnixNano()))
var ( var (
memMin = 33554432 memMin = 33554432
memMax = 536870912 memMax = 536870912
mem = memMin + rand.Intn(memMax-memMin) mem = memMin + r.Intn(memMax-memMin)
cpuMin = 100 cpuMin = 100
cpuMax = 10000 cpuMax = 10000
cpu = cpuMin + rand.Intn(cpuMax-cpuMin) cpu = cpuMin + r.Intn(cpuMax-cpuMin)
) )
driver, err := NewDriver(root, root, "", false) driver, err := NewDriver(root, root, "", false)