diff --git a/config/settings.yml b/config/settings.yml index 60f312fb64c..77b6ffd8d39 100644 --- a/config/settings.yml +++ b/config/settings.yml @@ -196,8 +196,8 @@ mhv: # Settings for Master Veteran Index mvi: url: http://ps-dev.commserv.healthevet.va.gov:8110/psim_webservice/IdMWebService - open_timeout: 2 - timeout: 10 + open_timeout: 15 + timeout: 15 mock: false processing_code: T client_cert_path: /fake/client/cert/path diff --git a/config/settings/development.yml b/config/settings/development.yml index 5e15ba6e8c2..f54bcb1e434 100644 --- a/config/settings/development.yml +++ b/config/settings/development.yml @@ -1,7 +1,5 @@ mvi: url: http://ps-dev.commserv.healthevet.va.gov:8110/psim_webservice/IdMWebService - open_timeout: 2 - timeout: 10 mock: true processing_code: T client_cert_path: config/certs/vetsgov-localhost.crt diff --git a/lib/mvi/configuration.rb b/lib/mvi/configuration.rb index 456bade0d9e..d88dc8ea0cc 100644 --- a/lib/mvi/configuration.rb +++ b/lib/mvi/configuration.rb @@ -5,20 +5,13 @@ module MVI class Configuration < Common::Client::Configuration::SOAP - # :nocov: - def self.default_mvi_open_timeout - Rails.logger.warn 'Settings.mvi.open_timeout not set, using default' - 2 + def self.open_timeout + Settings.mvi.open_timeout end - def self.default_mvi_timeout - Rails.logger.warn 'Settings.mvi.timeout not set, using default' - 10 + def self.read_timeout + Settings.mvi.timeout end - # :nocov: - - OPEN_TIMEOUT = Settings.mvi.open_timeout&.to_i || default_mvi_open_timeout - TIMEOUT = Settings.mvi.timeout&.to_i || default_mvi_timeout def self.ssl_cert_path Settings.mvi.client_cert_path diff --git a/spec/lib/mvi/configuration_spec.rb b/spec/lib/mvi/configuration_spec.rb index 296f35a3eb4..eb70cc407d8 100644 --- a/spec/lib/mvi/configuration_spec.rb +++ b/spec/lib/mvi/configuration_spec.rb @@ -35,19 +35,18 @@ end end - # TODO(knkski): These tests probably aren't doing anything useful. - describe '.default_mvi_open_timeout' do - context 'when Settings.mvi.open_timeout is not set' do - it 'should use the default' do - expect(MVI::Configuration::OPEN_TIMEOUT).to eq(2) + describe '.open_timeout' do + context 'when Settings.mvi.open_timeout is set' do + it 'should use the setting' do + expect(MVI::Configuration.instance.open_timeout).to eq(15) end end end - describe '.default_mvi_timeout' do - context 'when Settings.mvi.timeout is not set' do - it 'should use the default' do - expect(MVI::Configuration::TIMEOUT).to eq(10) + describe '.read_timeout' do + context 'when Settings.mvi.timeout is set' do + it 'should use the setting' do + expect(MVI::Configuration.instance.read_timeout).to eq(15) end end end