diff options
author | sourabh_sourabh <sourabh.sourabh@est.tech> | 2025-01-16 13:00:18 +0000 |
---|---|---|
committer | sourabh_sourabh <sourabh.sourabh@est.tech> | 2025-01-16 16:11:18 +0000 |
commit | 05580253e6d2c7c997aead716a93ee5e7f6db0d9 (patch) | |
tree | ef0279fe75983ae53e842f57f0c184958924d5aa /cps-ncmp-service/src/test/groovy | |
parent | 856619ceb02f533ec7c5dff9a67ab17ef780276c (diff) |
Make Response Timeout Configurable in WebClient Configuration
- Added responseTimeoutInSeconds property in the ServiceConfig class to allow dynamic configuration of the timeout.
- Updated WebClientConfiguration to read the responseTimeoutInSeconds from ServiceConfig and set it in the HttpClient.
Issue-ID: CPS-2565
Change-Id: I096688319c55f0342b524511883ec0d33806b9b7
Signed-off-by: sourabh_sourabh <sourabh.sourabh@est.tech>
Diffstat (limited to 'cps-ncmp-service/src/test/groovy')
2 files changed, 6 insertions, 2 deletions
diff --git a/cps-ncmp-service/src/test/groovy/org/onap/cps/ncmp/config/DmiHttpClientConfigSpec.groovy b/cps-ncmp-service/src/test/groovy/org/onap/cps/ncmp/config/DmiHttpClientConfigSpec.groovy index 23f5edd890..387252e163 100644 --- a/cps-ncmp-service/src/test/groovy/org/onap/cps/ncmp/config/DmiHttpClientConfigSpec.groovy +++ b/cps-ncmp-service/src/test/groovy/org/onap/cps/ncmp/config/DmiHttpClientConfigSpec.groovy @@ -1,6 +1,6 @@ /*- * ============LICENSE_START======================================================= - * Copyright (C) 2023-2024 Nordix Foundation. + * Copyright (C) 2023-2025 Nordix Foundation. * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -44,6 +44,7 @@ class DmiHttpClientConfigSpec extends Specification { assert connectionTimeoutInSeconds == 4 assert readTimeoutInSeconds == 5 assert writeTimeoutInSeconds == 6 + assert responseTimeoutInSeconds == 60 } } @@ -56,6 +57,7 @@ class DmiHttpClientConfigSpec extends Specification { assert connectionTimeoutInSeconds == 14 assert readTimeoutInSeconds == 15 assert writeTimeoutInSeconds == 16 + assert responseTimeoutInSeconds == 60 } } @@ -68,6 +70,7 @@ class DmiHttpClientConfigSpec extends Specification { assert connectionTimeoutInSeconds == 24 assert readTimeoutInSeconds == 25 assert writeTimeoutInSeconds == 26 + assert responseTimeoutInSeconds == 60 } } } diff --git a/cps-ncmp-service/src/test/groovy/org/onap/cps/ncmp/config/PolicyExecutorHttpClientConfigSpec.groovy b/cps-ncmp-service/src/test/groovy/org/onap/cps/ncmp/config/PolicyExecutorHttpClientConfigSpec.groovy index b988f9e171..3df910322c 100644 --- a/cps-ncmp-service/src/test/groovy/org/onap/cps/ncmp/config/PolicyExecutorHttpClientConfigSpec.groovy +++ b/cps-ncmp-service/src/test/groovy/org/onap/cps/ncmp/config/PolicyExecutorHttpClientConfigSpec.groovy @@ -1,6 +1,6 @@ /*- * ============LICENSE_START======================================================= - * Copyright (C) 2024 Nordix Foundation. + * Copyright (C) 2024-2025 Nordix Foundation. * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -42,6 +42,7 @@ class PolicyExecutorHttpClientConfigSpec extends Specification { assert pendingAcquireMaxCount == 33 assert connectionTimeoutInSeconds == 34 assert writeTimeoutInSeconds == 36 + assert responseTimeoutInSeconds == 60 } } |