Fix runCpuLimitTest with multiple cores

fixes #331