From 8816c61ff7d350eeff661422db37e09496f7804e Mon Sep 17 00:00:00 2001 From: Beth Skurrie Date: Tue, 23 Nov 2021 09:14:34 +1100 Subject: [PATCH] fix: cast PACT_BROKER_DATABASE_CONNECTION_VALIDATION_TIMEOUT to an integer Fixes: https://github.com/pact-foundation/pact_broker/issues/526 --- .../config/runtime_configuration_database_methods.rb | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/pact_broker/config/runtime_configuration_database_methods.rb b/lib/pact_broker/config/runtime_configuration_database_methods.rb index cb561c86e..4e8567de1 100644 --- a/lib/pact_broker/config/runtime_configuration_database_methods.rb +++ b/lib/pact_broker/config/runtime_configuration_database_methods.rb @@ -65,6 +65,10 @@ def metrics_sql_statement_timeout= metrics_sql_statement_timeout super(metrics_sql_statement_timeout&.to_i) end + def database_connection_validation_timeout= database_connection_validation_timeout + super(database_connection_validation_timeout&.to_i) + end + def postgres? database_credentials[:adapter] == "postgres" end