Skip to content

Commit

Permalink
Merge pull request #37 from screwdriver-cd/fix-timeout
Browse files Browse the repository at this point in the history
fix: timeout for beaker was not getting applied locally
  • Loading branch information
adong authored Feb 19, 2020
2 parents 8317a17 + 6c38604 commit 55db17b
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 6 deletions.
10 changes: 7 additions & 3 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,15 @@ class DockerExecutor extends Executor {
this.docker = new Docker(options.docker);
this.launchVersion = options.launchVersion || 'stable';
this.prefix = options.prefix || '';
this.breaker = new Fusebox((obj, cb) => obj.func(cb), hoek.applyToDefaults({

const breakerOptions = hoek.applyToDefaults({
breaker: {
timeout: 5 * 60 * 1000 // Default to 5 minute timeout
maxFailures: 10,
timeout: 5 * 60 * 1000 // Default to 5 minute timeout,
}
}, options.fusebox));
}, options.fusebox || {});

this.breaker = new Fusebox((obj, cb) => obj.func(cb), breakerOptions);
}

/**
Expand Down
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"main": "index.js",
"scripts": {
"pretest": "eslint .",
"test": "jenkins-mocha --recursive",
"test": "nyc --report-dir ./artifacts/coverage --reporter=lcov mocha --recursive --timeout 4000 --retries 1 --exit --allow-uncaught true --color true",
"semantic-release": "semantic-release pre && npm publish && semantic-release post"
},
"repository": {
Expand Down Expand Up @@ -39,8 +39,9 @@
"chai": "^4.2.0",
"eslint": "^4.19.1",
"eslint-config-screwdriver": "^3.0.1",
"jenkins-mocha": "^7.0.0",
"mocha": "^7.0.1",
"mockery": "^2.0.0",
"nyc": "^15.0.0",
"sinon": "^7.1.0"
},
"dependencies": {
Expand Down
2 changes: 1 addition & 1 deletion screwdriver.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
shared:
image: node:8
image: node:12

jobs:
main:
Expand Down

0 comments on commit 55db17b

Please sign in to comment.