summaryrefslogtreecommitdiffstats
path: root/ms
diff options
context:
space:
mode:
authorFrank Kimmlingen <frank.kimmlingen@telekom.de>2022-08-29 17:05:59 +0200
committerFrank Kimmlingen <frank.kimmlingen@telekom.de>2022-09-06 07:41:03 +0000
commit6c23c2bc522f6ddc9f61785489a8eab4969bb819 (patch)
treeeb8aca349e38906fe9496d6b4d579e6f95dbb37c /ms
parentedd7b5679350130e8cf5b2de01140dc09d01a80c (diff)
SpyPostInterceptor in UatExecutor does not collect all responses
For one mocked backend system (selector) only the last request/response pair is collected. With this fix all request/response pairs will be collected. Issue-ID: CCSDK-3747 Signed-off-by: Frank Kimmlingen <frank.kimmlingen@telekom.de> Change-Id: Iccebdb153752988e1644092a8786891bdb17d5e6 (cherry picked from commit 4899f6bd4e00fa20bd0cac4a60c04a959b8e88c7)
Diffstat (limited to 'ms')
-rw-r--r--ms/blueprintsprocessor/application/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/uat/utils/UatExecutor.kt8
1 files changed, 6 insertions, 2 deletions
diff --git a/ms/blueprintsprocessor/application/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/uat/utils/UatExecutor.kt b/ms/blueprintsprocessor/application/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/uat/utils/UatExecutor.kt
index ae9b7d35c..5adc816cc 100644
--- a/ms/blueprintsprocessor/application/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/uat/utils/UatExecutor.kt
+++ b/ms/blueprintsprocessor/application/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/uat/utils/UatExecutor.kt
@@ -323,11 +323,15 @@ class UatExecutor(
}
override fun getInstance(selector: String, service: BlueprintWebClientService): BlueprintWebClientService {
- val spiedService = SpyService(mapper, selector, service)
+ var spiedService = spies[selector]
+ if (spiedService != null)
+ return spiedService
+
+ spiedService = SpyService(mapper, selector, service)
spies[selector] = spiedService
+
return spiedService
}
-
fun getSpies(): List<SpyService> =
spies.values.toList()
}