aboutsummaryrefslogtreecommitdiffstats
path: root/ms/blueprintsprocessor
diff options
context:
space:
mode:
authorFrank Kimmlingen <frank.kimmlingen@telekom.de>2022-08-29 17:05:59 +0200
committerJozsef Csongvai <jozsef.csongvai@bell.ca>2022-09-01 18:38:16 +0000
commit4899f6bd4e00fa20bd0cac4a60c04a959b8e88c7 (patch)
tree4d500fbb32a5c43383e49073f312e7703430b270 /ms/blueprintsprocessor
parente679d838562ef6762852e8073844ad578d700a84 (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
Diffstat (limited to 'ms/blueprintsprocessor')
-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()
}