Example #1
0
func (s *gomaxprocsSuite) TestUseMultipleCPUsWhenEnabled(c *gc.C) {
	utils.UseMultipleCPUs()
	c.Check(s.setMaxProcs, gc.Equals, 2)
	s.numCPUResponse = 4
	utils.UseMultipleCPUs()
	c.Check(s.setMaxProcs, gc.Equals, 4)
}
Example #2
0
func (s *gomaxprocsSuite) TestUseMultipleCPUsDoesNothingWhenGOMAXPROCSSet(c *gc.C) {
	os.Setenv("GOMAXPROCS", "1")
	utils.UseMultipleCPUs()
	c.Check(s.setMaxProcs, gc.Equals, 0)
}