diff options
author | Julien Fontaine <julien.fontaine@bell.ca> | 2020-06-18 18:16:38 -0400 |
---|---|---|
committer | Julien Fontaine <julien.fontaine@bell.ca> | 2020-06-22 14:46:22 -0400 |
commit | c2046c09fd65a9ba4d000beacb3836869db771f2 (patch) | |
tree | 847f9bb3824b0a906589567e819673b4c7360207 /ms/blueprintsprocessor/modules/inbounds/selfservice-api/src/test | |
parent | 214c8dfe0e56aff0fe0c2a3a5d7f76f2a4972710 (diff) |
Kafka Audit Service : Improve error handling and miscellaneous refactoring
When Kafka Audit Service fails it no longer stops Blueprint Processor execution
* Add error handling when trying to hide sensitive data
* Add error handling when trying to send kafka message
* Set timeout for blocking loop when sending messages with kafka producer
-> When broker is not available producer tries to reconnect in a blocking loop
* Refactor Audit Service interface to give more explict name for publish methods
* Modify publishExecutionOutput() to a non-blocking function
Issue-ID: CCSDK-2459
Signed-off-by: Julien Fontaine <julien.fontaine@bell.ca>
Change-Id: I809a5f34f81889aa9eed499608348f149984bc38
Diffstat (limited to 'ms/blueprintsprocessor/modules/inbounds/selfservice-api/src/test')
-rw-r--r-- | ms/blueprintsprocessor/modules/inbounds/selfservice-api/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/selfservice/api/ExecutionServiceHandlerTest.kt | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/ms/blueprintsprocessor/modules/inbounds/selfservice-api/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/selfservice/api/ExecutionServiceHandlerTest.kt b/ms/blueprintsprocessor/modules/inbounds/selfservice-api/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/selfservice/api/ExecutionServiceHandlerTest.kt index 191456296..70e1ed0fd 100644 --- a/ms/blueprintsprocessor/modules/inbounds/selfservice-api/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/selfservice/api/ExecutionServiceHandlerTest.kt +++ b/ms/blueprintsprocessor/modules/inbounds/selfservice-api/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/selfservice/api/ExecutionServiceHandlerTest.kt @@ -16,7 +16,6 @@ package org.onap.ccsdk.cds.blueprintsprocessor.selfservice.api -import io.mockk.verify import io.mockk.coVerify import io.mockk.Runs import io.mockk.coEvery @@ -102,7 +101,7 @@ class ExecutionServiceHandlerTest { publishAuditService ) - coEvery { publishAuditService.publish(ExecutionServiceInput()) } just Runs + coEvery { publishAuditService.publishExecutionInput(ExecutionServiceInput()) } just Runs var executionServiceOutput: ExecutionServiceOutput? = null runBlocking { @@ -110,11 +109,8 @@ class ExecutionServiceHandlerTest { } coVerify { - publishAuditService.publish(executionServiceInput) - } - - verify { - publishAuditService.publish(executionServiceInput.correlationUUID, executionServiceOutput!!) + publishAuditService.publishExecutionInput(executionServiceInput) + publishAuditService.publishExecutionOutput(executionServiceInput.correlationUUID, executionServiceOutput!!) } } } |