Skip to content

Commit

Permalink
Merge pull request #30 from pelias/increase-default-timeout
Browse files Browse the repository at this point in the history
feat(timeout): Increase default timeout to 1000ms
  • Loading branch information
orangejulius authored Sep 20, 2018
2 parents db72c98 + 384f289 commit 2a3eee1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion ServiceConfiguration.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ class ServiceConfiguration {
} else {
this.baseUrl = config.url;
}
this.timeout = config.timeout || 250;
this.timeout = config.timeout || 1000;
this.retries = config.retries || 3;

}
Expand Down
4 changes: 2 additions & 2 deletions test/ServiceConfiguration.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,14 +34,14 @@ tape('ServiceConfiguration tests', (test) => {

});

test.test('configBlob w/o timeout or retries should default to 250 and 3, respectively', (t) => {
test.test('configBlob w/o timeout or retries should default to 1000ms and 3, respectively', (t) => {
const configBlob = {
url: 'http://localhost:1234/'
};

const serviceConfiguration = new ServiceConfiguration('service name', configBlob);

t.equals(serviceConfiguration.getTimeout(), 250, 'should be a default of 250');
t.equals(serviceConfiguration.getTimeout(), 1000, 'timeout should have default value');
t.equals(serviceConfiguration.getRetries(), 3, 'should be a default of 3');
t.end();

Expand Down

0 comments on commit 2a3eee1

Please sign in to comment.