From 86d310a51662379343579f6850710c376fd865fb Mon Sep 17 00:00:00 2001 From: Jozsef Csongvai Date: Mon, 22 Jun 2020 17:24:39 -0400 Subject: Remove service annotation for ImperativeBluePrintWorkflowService Even with the PROTOTYPE_SCOPE annotation the bean was in effect a Singleton, as it was only injected in one other service. The class has field variables which would be shared by every thread, potentially causing severe errors under parallel execution. Removed annotations to disable dependency injection, and instead create a new instance with every execution call. Issue-ID: CCSDK-2473 Signed-off-by: Jozsef Csongvai Change-Id: I9e7148540781dcd869d55d932f4187c5f81cb3f5 --- .../services/workflow/ImperativeWorkflowExecutionServiceTest.kt | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'ms/blueprintsprocessor/modules/services/workflow-service/src/test') diff --git a/ms/blueprintsprocessor/modules/services/workflow-service/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/services/workflow/ImperativeWorkflowExecutionServiceTest.kt b/ms/blueprintsprocessor/modules/services/workflow-service/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/services/workflow/ImperativeWorkflowExecutionServiceTest.kt index 1d4738c8d..c200f4ae2 100644 --- a/ms/blueprintsprocessor/modules/services/workflow-service/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/services/workflow/ImperativeWorkflowExecutionServiceTest.kt +++ b/ms/blueprintsprocessor/modules/services/workflow-service/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/services/workflow/ImperativeWorkflowExecutionServiceTest.kt @@ -119,8 +119,7 @@ class ImperativeWorkflowExecutionServiceTest { ExecutionServiceInput::class.java )!! - val bluePrintWorkFlowService = ImperativeBluePrintWorkflowService(NodeTemplateExecutionService(mockk())) - val imperativeWorkflowExecutionService = ImperativeWorkflowExecutionService(bluePrintWorkFlowService) + val imperativeWorkflowExecutionService = ImperativeWorkflowExecutionService(NodeTemplateExecutionService(mockk())) val output = imperativeWorkflowExecutionService .executeBluePrintWorkflow(bluePrintRuntimeService, executionServiceInput, hashMapOf()) assertNotNull(output, "failed to get imperative workflow output") -- cgit 1.2.3-korg