travis experiment: lower docker concurrency

Signed-off-by: Steven Danna <steve@chef.io>
This commit is contained in:
Steven Danna 2016-08-10 12:52:21 +01:00
parent e073a63565
commit 9346f5dd34
No known key found for this signature in database
GPG key ID: 94DFB46E861A7DAE
2 changed files with 5 additions and 3 deletions

View file

@ -18,10 +18,10 @@ matrix:
- rvm: 2.0
- rvm: 2.2
script: bundle exec rake $SUITE
env: SUITE="lint test test:resources config=test/test.yaml"
env: SUITE="lint test test:resources config=test/test.yaml" N=2
- rvm: 2.2
script: bundle exec rake $SUITE
env: SUITE="test:functional test:resources config=test/test-extra.yaml" N=5
env: SUITE="test:functional test:resources config=test/test-extra.yaml" N=2
- rvm: 2.2
bundler_args: "--without guard tools"
script: bundle exec rake $SUITE

View file

@ -10,6 +10,8 @@ class DockerRunner
@conf_path = conf_path ||
ENV['config']
docker_run_concurrency = (ENV['N'] || 5).to_i
if @conf_path.nil?
fail "You must provide a configuration file with docker boxes"
end
@ -28,7 +30,7 @@ class DockerRunner
@images = docker_images_by_tag
@image_pull_tickets = Concurrent::Semaphore.new(2)
@docker_run_tickets = Concurrent::Semaphore.new(5)
@docker_run_tickets = Concurrent::Semaphore.new(docker_run_concurrency)
end
def run_all(&block)