aboutsummaryrefslogtreecommitdiffstats
path: root/ms/blueprintsprocessor
diff options
context:
space:
mode:
Diffstat (limited to 'ms/blueprintsprocessor')
-rw-r--r--ms/blueprintsprocessor/application/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/uat/utils/UatServices.kt9
1 files changed, 4 insertions, 5 deletions
diff --git a/ms/blueprintsprocessor/application/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/uat/utils/UatServices.kt b/ms/blueprintsprocessor/application/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/uat/utils/UatServices.kt
index d233b8be3..0c5105ec9 100644
--- a/ms/blueprintsprocessor/application/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/uat/utils/UatServices.kt
+++ b/ms/blueprintsprocessor/application/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/uat/utils/UatServices.kt
@@ -58,11 +58,10 @@ open class UatServices(private val uatExecutor: UatExecutor, private val mapper:
val tempFile = createTempFile()
try {
cbaFile.transferTo(tempFile)
- .doOnSuccess {
- val uatSpec = readZipEntryAsText(tempFile, UAT_SPECIFICATION_FILE)
- val cbaBytes = tempFile.readBytes()
- uatExecutor.execute(uatSpec, cbaBytes)
- }.subscribe()
+ cbaFile.transferTo(tempFile).thenReturn(tempFile).awaitSingle()
+ val uatSpec = readZipEntryAsText(tempFile, UAT_SPECIFICATION_FILE)
+ val cbaBytes = tempFile.readBytes()
+ uatExecutor.execute(uatSpec, cbaBytes)
} catch (e: AssertionError) {
throw ResponseStatusException(HttpStatus.BAD_REQUEST, e.message)
} catch (t: Throwable) {