From 384f289590973d09b05d36bae086abeb09995714 Mon Sep 17 00:00:00 2001 From: Julian Simioni Date: Thu, 20 Sep 2018 14:09:25 -0400 Subject: [PATCH] feat(timeout): Increase default timeout to 1000ms 250ms is just a little too low for a default value. Fixes https://github.com/pelias/wof-admin-lookup/issues/192 --- ServiceConfiguration.js | 2 +- test/ServiceConfiguration.js | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ServiceConfiguration.js b/ServiceConfiguration.js index c6ae0ee..cca7a53 100644 --- a/ServiceConfiguration.js +++ b/ServiceConfiguration.js @@ -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; } diff --git a/test/ServiceConfiguration.js b/test/ServiceConfiguration.js index 78d2b3d..bbc92a4 100644 --- a/test/ServiceConfiguration.js +++ b/test/ServiceConfiguration.js @@ -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();