diff options
-rw-r--r-- | ms/blueprintsprocessor/application/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/uat/utils/UatExecutor.kt | 8 |
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() } |