diff options
author | waynedunican <wayne.dunican@est.tech> | 2024-07-23 09:23:51 +0100 |
---|---|---|
committer | waynedunican <wayne.dunican@est.tech> | 2024-08-13 08:49:10 +0100 |
commit | b7804abcf865dc58a01bed3f2be4756e731d9288 (patch) | |
tree | 7f6fc3b50622578bb8612de9fe5e5c6adddfaf28 /models-interactions/model-actors/actor.cds | |
parent | a029ccab07f2dd71286804da620c513da9fdfc0e (diff) |
Improve code coverage and sonar fixes
Increased code coverage to 90%
SONAR - Removed TODO comments
SONAR - Added NOSONAR where appropriate
SONAR - Replaced stream.Collect() with stream.toList() where applicable
SONAR - Made variables serializable or transient to comply with sonar rules
Issue-ID: POLICY-5069
Change-Id: Ife256eaf4e6f427fe40b138bacc6f112dc5bcea4
Signed-off-by: waynedunican <wayne.dunican@est.tech>
Diffstat (limited to 'models-interactions/model-actors/actor.cds')
-rw-r--r-- | models-interactions/model-actors/actor.cds/src/test/java/org/onap/policy/controlloop/actor/cds/GrpcActorServiceManagerTest.java | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/models-interactions/model-actors/actor.cds/src/test/java/org/onap/policy/controlloop/actor/cds/GrpcActorServiceManagerTest.java b/models-interactions/model-actors/actor.cds/src/test/java/org/onap/policy/controlloop/actor/cds/GrpcActorServiceManagerTest.java index dc7fcf447..e3ad6bea4 100644 --- a/models-interactions/model-actors/actor.cds/src/test/java/org/onap/policy/controlloop/actor/cds/GrpcActorServiceManagerTest.java +++ b/models-interactions/model-actors/actor.cds/src/test/java/org/onap/policy/controlloop/actor/cds/GrpcActorServiceManagerTest.java @@ -51,7 +51,7 @@ import org.onap.policy.controlloop.actorserviceprovider.OperationResult; * Sets up the fields. */ @BeforeEach - void setUp() throws Exception { + void setUp() { future = new CompletableFuture<>(); manager = new CdsActorServiceManager(new OperationOutcome(), future); } @@ -68,7 +68,7 @@ import org.onap.policy.controlloop.actorserviceprovider.OperationResult; } @Test - void testOnMessageProcessing() throws InterruptedException, ExecutionException, TimeoutException { + void testOnMessageProcessing() { Status status = Status.newBuilder().setEventType(EventType.EVENT_COMPONENT_PROCESSING).build(); output = ExecutionServiceOutput.newBuilder().setStatus(status).build(); @@ -89,7 +89,7 @@ import org.onap.policy.controlloop.actorserviceprovider.OperationResult; } @Test - void testOnError() throws InterruptedException, ExecutionException, TimeoutException { + void testOnError() { Exception exception = new Exception("something failed"); manager.onError(exception); |