From 95ae4469066db561e7ec92c4640affeba4fe9cee Mon Sep 17 00:00:00 2001 From: GIlca Date: Wed, 6 Sep 2023 12:10:47 +0300 Subject: [PATCH] fix tests --- .../lang/runtime/bindings/ArgumentsBindingTest.java | 9 ++++++++- .../lang/runtime/bindings/InputsBindingTest.java | 9 ++++++++- .../lang/runtime/bindings/OutputsBindingTest.java | 9 ++++++++- .../lang/runtime/bindings/ResultBindingTest.java | 9 ++++++++- .../runtime/bindings/scripts/ScriptEvaluatorTest.java | 9 ++++++++- .../runtime/bindings/scripts/ScriptExecutorTest.java | 9 ++++++++- .../lang/runtime/steps/ExecutableStepsTest.java | 9 ++++++++- .../lang/runtime/steps/ParallelLoopStepsTest.java | 9 ++++++++- .../lang/runtime/steps/StepExecutionDataTest.java | 9 ++++++++- 9 files changed, 72 insertions(+), 9 deletions(-) diff --git a/cloudslang-runtime/src/test/java/io/cloudslang/lang/runtime/bindings/ArgumentsBindingTest.java b/cloudslang-runtime/src/test/java/io/cloudslang/lang/runtime/bindings/ArgumentsBindingTest.java index 3c1b4a4d8..ac3c618ab 100644 --- a/cloudslang-runtime/src/test/java/io/cloudslang/lang/runtime/bindings/ArgumentsBindingTest.java +++ b/cloudslang-runtime/src/test/java/io/cloudslang/lang/runtime/bindings/ArgumentsBindingTest.java @@ -27,12 +27,14 @@ import io.cloudslang.runtime.api.python.executor.services.PythonExecutorLifecycleManagerService; import io.cloudslang.runtime.api.python.PythonRuntimeService; import io.cloudslang.runtime.api.python.executor.entities.PythonExecutorDetails; +import io.cloudslang.runtime.api.python.executor.services.PythonExecutorProcessManagerService; import io.cloudslang.runtime.impl.python.PythonExecutionCachedEngine; import io.cloudslang.runtime.impl.python.PythonExecutionEngine; import io.cloudslang.runtime.impl.python.PythonExecutionNotCachedEngine; import io.cloudslang.runtime.impl.python.PythonRuntimeServiceImpl; import io.cloudslang.runtime.impl.python.executor.services.ExternalPythonExecutorServiceImpl; import io.cloudslang.runtime.impl.python.executor.services.PythonExecutorLifecycleManagerServiceImpl; +import io.cloudslang.runtime.impl.python.executor.services.PythonExecutorProcessManagerServiceImpl; import io.cloudslang.runtime.impl.python.external.ExternalPythonExecutionEngine; import io.cloudslang.runtime.impl.python.external.ExternalPythonRuntimeServiceImpl; import io.cloudslang.score.events.EventBus; @@ -476,7 +478,12 @@ public PythonExecutorCommunicationService pythonExecutorCommunicationService() { @Bean(name = "pythonExecutorLifecycleManagerService") public PythonExecutorLifecycleManagerService pythonExecutorLifecycleManagerService() { return new PythonExecutorLifecycleManagerServiceImpl(pythonExecutorCommunicationService(), - pythonExecutorConfigurationDataService()); + pythonExecutorConfigurationDataService(), pythonExecutorProcessManagerService()); + } + + @Bean(name = "pythonExecutorProcessManagerService") + public PythonExecutorProcessManagerService pythonExecutorProcessManagerService() { + return mock(PythonExecutorProcessManagerServiceImpl.class); } @Bean(name = "externalPythonExecutorService") diff --git a/cloudslang-runtime/src/test/java/io/cloudslang/lang/runtime/bindings/InputsBindingTest.java b/cloudslang-runtime/src/test/java/io/cloudslang/lang/runtime/bindings/InputsBindingTest.java index 5cd2d2472..a413bae21 100644 --- a/cloudslang-runtime/src/test/java/io/cloudslang/lang/runtime/bindings/InputsBindingTest.java +++ b/cloudslang-runtime/src/test/java/io/cloudslang/lang/runtime/bindings/InputsBindingTest.java @@ -26,11 +26,13 @@ import io.cloudslang.runtime.api.python.executor.services.PythonExecutorLifecycleManagerService; import io.cloudslang.runtime.api.python.PythonRuntimeService; import io.cloudslang.runtime.api.python.executor.entities.PythonExecutorDetails; +import io.cloudslang.runtime.api.python.executor.services.PythonExecutorProcessManagerService; import io.cloudslang.runtime.impl.python.PythonExecutionCachedEngine; import io.cloudslang.runtime.impl.python.PythonExecutionEngine; import io.cloudslang.runtime.impl.python.PythonRuntimeServiceImpl; import io.cloudslang.runtime.impl.python.executor.services.ExternalPythonExecutorServiceImpl; import io.cloudslang.runtime.impl.python.executor.services.PythonExecutorLifecycleManagerServiceImpl; +import io.cloudslang.runtime.impl.python.executor.services.PythonExecutorProcessManagerServiceImpl; import io.cloudslang.runtime.impl.python.external.ExternalPythonExecutionEngine; import io.cloudslang.runtime.impl.python.external.ExternalPythonRuntimeServiceImpl; import io.cloudslang.score.events.EventBus; @@ -575,7 +577,12 @@ public PythonExecutorCommunicationService pythonExecutorCommunicationService() { @Bean(name = "pythonExecutorLifecycleManagerService") public PythonExecutorLifecycleManagerService pythonExecutorLifecycleManagerService() { return new PythonExecutorLifecycleManagerServiceImpl(pythonExecutorCommunicationService(), - pythonExecutorConfigurationDataService()); + pythonExecutorConfigurationDataService(), pythonExecutorProcessManagerService()); + } + + @Bean(name = "pythonExecutorProcessManagerService") + public PythonExecutorProcessManagerService pythonExecutorProcessManagerService() { + return mock(PythonExecutorProcessManagerServiceImpl.class); } @Bean(name = "externalPythonExecutorService") diff --git a/cloudslang-runtime/src/test/java/io/cloudslang/lang/runtime/bindings/OutputsBindingTest.java b/cloudslang-runtime/src/test/java/io/cloudslang/lang/runtime/bindings/OutputsBindingTest.java index 3c971fc43..4bac3a6ee 100644 --- a/cloudslang-runtime/src/test/java/io/cloudslang/lang/runtime/bindings/OutputsBindingTest.java +++ b/cloudslang-runtime/src/test/java/io/cloudslang/lang/runtime/bindings/OutputsBindingTest.java @@ -25,11 +25,13 @@ import io.cloudslang.runtime.api.python.executor.services.PythonExecutorLifecycleManagerService; import io.cloudslang.runtime.api.python.PythonRuntimeService; import io.cloudslang.runtime.api.python.executor.entities.PythonExecutorDetails; +import io.cloudslang.runtime.api.python.executor.services.PythonExecutorProcessManagerService; import io.cloudslang.runtime.impl.python.PythonExecutionCachedEngine; import io.cloudslang.runtime.impl.python.PythonExecutionEngine; import io.cloudslang.runtime.impl.python.PythonRuntimeServiceImpl; import io.cloudslang.runtime.impl.python.executor.services.ExternalPythonExecutorServiceImpl; import io.cloudslang.runtime.impl.python.executor.services.PythonExecutorLifecycleManagerServiceImpl; +import io.cloudslang.runtime.impl.python.executor.services.PythonExecutorProcessManagerServiceImpl; import io.cloudslang.runtime.impl.python.external.ExternalPythonExecutionEngine; import io.cloudslang.runtime.impl.python.external.ExternalPythonRuntimeServiceImpl; import io.cloudslang.score.events.EventBus; @@ -283,7 +285,12 @@ public PythonExecutorCommunicationService pythonExecutorCommunicationService() { @Bean(name = "pythonExecutorLifecycleManagerService") public PythonExecutorLifecycleManagerService pythonExecutorLifecycleManagerService() { return new PythonExecutorLifecycleManagerServiceImpl(pythonExecutorCommunicationService(), - pythonExecutorConfigurationDataService()); + pythonExecutorConfigurationDataService(), pythonExecutorProcessManagerService()); + } + + @Bean(name = "pythonExecutorProcessManagerService") + public PythonExecutorProcessManagerService pythonExecutorProcessManagerService() { + return mock(PythonExecutorProcessManagerServiceImpl.class); } @Bean(name = "externalPythonExecutorService") diff --git a/cloudslang-runtime/src/test/java/io/cloudslang/lang/runtime/bindings/ResultBindingTest.java b/cloudslang-runtime/src/test/java/io/cloudslang/lang/runtime/bindings/ResultBindingTest.java index 9c1e577ed..113d3f10a 100644 --- a/cloudslang-runtime/src/test/java/io/cloudslang/lang/runtime/bindings/ResultBindingTest.java +++ b/cloudslang-runtime/src/test/java/io/cloudslang/lang/runtime/bindings/ResultBindingTest.java @@ -26,11 +26,13 @@ import io.cloudslang.runtime.api.python.executor.services.PythonExecutorLifecycleManagerService; import io.cloudslang.runtime.api.python.PythonRuntimeService; import io.cloudslang.runtime.api.python.executor.entities.PythonExecutorDetails; +import io.cloudslang.runtime.api.python.executor.services.PythonExecutorProcessManagerService; import io.cloudslang.runtime.impl.python.PythonExecutionCachedEngine; import io.cloudslang.runtime.impl.python.PythonExecutionEngine; import io.cloudslang.runtime.impl.python.PythonRuntimeServiceImpl; import io.cloudslang.runtime.impl.python.executor.services.ExternalPythonExecutorServiceImpl; import io.cloudslang.runtime.impl.python.executor.services.PythonExecutorLifecycleManagerServiceImpl; +import io.cloudslang.runtime.impl.python.executor.services.PythonExecutorProcessManagerServiceImpl; import io.cloudslang.runtime.impl.python.external.ExternalPythonExecutionEngine; import io.cloudslang.runtime.impl.python.external.ExternalPythonRuntimeServiceImpl; import io.cloudslang.score.events.EventBus; @@ -260,7 +262,12 @@ public PythonExecutorCommunicationService pythonExecutorCommunicationService() { @Bean(name = "pythonExecutorLifecycleManagerService") public PythonExecutorLifecycleManagerService pythonExecutorLifecycleManagerService() { return new PythonExecutorLifecycleManagerServiceImpl(pythonExecutorCommunicationService(), - pythonExecutorConfigurationDataService()); + pythonExecutorConfigurationDataService(), pythonExecutorProcessManagerService()); + } + + @Bean(name = "pythonExecutorProcessManagerService") + public PythonExecutorProcessManagerService pythonExecutorProcessManagerService() { + return mock(PythonExecutorProcessManagerServiceImpl.class); } @Bean(name = "externalPythonExecutorService") diff --git a/cloudslang-runtime/src/test/java/io/cloudslang/lang/runtime/bindings/scripts/ScriptEvaluatorTest.java b/cloudslang-runtime/src/test/java/io/cloudslang/lang/runtime/bindings/scripts/ScriptEvaluatorTest.java index 2f6a680a7..65c9a565c 100644 --- a/cloudslang-runtime/src/test/java/io/cloudslang/lang/runtime/bindings/scripts/ScriptEvaluatorTest.java +++ b/cloudslang-runtime/src/test/java/io/cloudslang/lang/runtime/bindings/scripts/ScriptEvaluatorTest.java @@ -24,11 +24,13 @@ import io.cloudslang.runtime.api.python.executor.services.PythonExecutorLifecycleManagerService; import io.cloudslang.runtime.api.python.PythonRuntimeService; import io.cloudslang.runtime.api.python.executor.entities.PythonExecutorDetails; +import io.cloudslang.runtime.api.python.executor.services.PythonExecutorProcessManagerService; import io.cloudslang.runtime.impl.python.PythonExecutionCachedEngine; import io.cloudslang.runtime.impl.python.PythonExecutionEngine; import io.cloudslang.runtime.impl.python.PythonExecutor; import io.cloudslang.runtime.impl.python.executor.services.ExternalPythonExecutorServiceImpl; import io.cloudslang.runtime.impl.python.executor.services.PythonExecutorLifecycleManagerServiceImpl; +import io.cloudslang.runtime.impl.python.executor.services.PythonExecutorProcessManagerServiceImpl; import io.cloudslang.runtime.impl.python.external.ExternalPythonExecutionEngine; import io.cloudslang.runtime.impl.python.external.ExternalPythonRuntimeServiceImpl; import io.cloudslang.score.events.EventBus; @@ -226,7 +228,12 @@ public PythonExecutorCommunicationService pythonExecutorCommunicationService() { @Bean(name = "pythonExecutorLifecycleManagerService") public PythonExecutorLifecycleManagerService pythonExecutorLifecycleManagerService() { return new PythonExecutorLifecycleManagerServiceImpl(pythonExecutorCommunicationService(), - pythonExecutorConfigurationDataService()); + pythonExecutorConfigurationDataService(), pythonExecutorProcessManagerService()); + } + + @Bean(name = "pythonExecutorProcessManagerService") + public PythonExecutorProcessManagerService pythonExecutorProcessManagerService() { + return mock(PythonExecutorProcessManagerServiceImpl.class); } @Bean(name = "externalPythonExecutorService") diff --git a/cloudslang-runtime/src/test/java/io/cloudslang/lang/runtime/bindings/scripts/ScriptExecutorTest.java b/cloudslang-runtime/src/test/java/io/cloudslang/lang/runtime/bindings/scripts/ScriptExecutorTest.java index fabf31c07..760d84e0e 100644 --- a/cloudslang-runtime/src/test/java/io/cloudslang/lang/runtime/bindings/scripts/ScriptExecutorTest.java +++ b/cloudslang-runtime/src/test/java/io/cloudslang/lang/runtime/bindings/scripts/ScriptExecutorTest.java @@ -22,12 +22,14 @@ import io.cloudslang.runtime.api.python.executor.services.PythonExecutorLifecycleManagerService; import io.cloudslang.runtime.api.python.PythonRuntimeService; import io.cloudslang.runtime.api.python.executor.entities.PythonExecutorDetails; +import io.cloudslang.runtime.api.python.executor.services.PythonExecutorProcessManagerService; import io.cloudslang.runtime.impl.python.PythonExecutionCachedEngine; import io.cloudslang.runtime.impl.python.PythonExecutionEngine; import io.cloudslang.runtime.impl.python.PythonExecutor; import io.cloudslang.runtime.impl.python.PythonRuntimeServiceImpl; import io.cloudslang.runtime.impl.python.executor.services.ExternalPythonExecutorServiceImpl; import io.cloudslang.runtime.impl.python.executor.services.PythonExecutorLifecycleManagerServiceImpl; +import io.cloudslang.runtime.impl.python.executor.services.PythonExecutorProcessManagerServiceImpl; import io.cloudslang.runtime.impl.python.external.ExternalPythonExecutionEngine; import io.cloudslang.runtime.impl.python.external.ExternalPythonRuntimeServiceImpl; import io.cloudslang.score.events.EventBus; @@ -216,7 +218,12 @@ public PythonExecutorCommunicationService pythonExecutorCommunicationService() { @Bean(name = "pythonExecutorLifecycleManagerService") public PythonExecutorLifecycleManagerService pythonExecutorLifecycleManagerService() { return new PythonExecutorLifecycleManagerServiceImpl(pythonExecutorCommunicationService(), - pythonExecutorConfigurationDataService()); + pythonExecutorConfigurationDataService(), pythonExecutorProcessManagerService()); + } + + @Bean(name = "pythonExecutorProcessManagerService") + public PythonExecutorProcessManagerService pythonExecutorProcessManagerService() { + return mock(PythonExecutorProcessManagerServiceImpl.class); } @Bean(name = "externalPythonExecutorService") diff --git a/cloudslang-runtime/src/test/java/io/cloudslang/lang/runtime/steps/ExecutableStepsTest.java b/cloudslang-runtime/src/test/java/io/cloudslang/lang/runtime/steps/ExecutableStepsTest.java index dccaea96a..277f77628 100644 --- a/cloudslang-runtime/src/test/java/io/cloudslang/lang/runtime/steps/ExecutableStepsTest.java +++ b/cloudslang-runtime/src/test/java/io/cloudslang/lang/runtime/steps/ExecutableStepsTest.java @@ -45,11 +45,13 @@ import io.cloudslang.runtime.api.python.executor.services.PythonExecutorLifecycleManagerService; import io.cloudslang.runtime.api.python.PythonRuntimeService; import io.cloudslang.runtime.api.python.executor.entities.PythonExecutorDetails; +import io.cloudslang.runtime.api.python.executor.services.PythonExecutorProcessManagerService; import io.cloudslang.runtime.impl.python.PythonExecutionCachedEngine; import io.cloudslang.runtime.impl.python.PythonExecutionEngine; import io.cloudslang.runtime.impl.python.PythonRuntimeServiceImpl; import io.cloudslang.runtime.impl.python.executor.services.ExternalPythonExecutorServiceImpl; import io.cloudslang.runtime.impl.python.executor.services.PythonExecutorLifecycleManagerServiceImpl; +import io.cloudslang.runtime.impl.python.executor.services.PythonExecutorProcessManagerServiceImpl; import io.cloudslang.runtime.impl.python.external.ExternalPythonExecutionEngine; import io.cloudslang.runtime.impl.python.external.ExternalPythonRuntimeServiceImpl; import io.cloudslang.score.api.execution.precondition.ExecutionPreconditionService; @@ -532,7 +534,12 @@ public PythonRuntimeService externalPythonExecutorService() { @Bean(name = "pythonExecutorLifecycleManagerService") public PythonExecutorLifecycleManagerService pythonExecutorLifecycleManagerService() { return new PythonExecutorLifecycleManagerServiceImpl(pythonExecutorCommunicationService(), - pythonExecutorConfigurationDataService()); + pythonExecutorConfigurationDataService(), pythonExecutorProcessManagerService()); + } + + @Bean(name = "pythonExecutorProcessManagerService") + public PythonExecutorProcessManagerService pythonExecutorProcessManagerService() { + return mock(PythonExecutorProcessManagerServiceImpl.class); } @Bean(name = "externalPythonRuntimeService") diff --git a/cloudslang-runtime/src/test/java/io/cloudslang/lang/runtime/steps/ParallelLoopStepsTest.java b/cloudslang-runtime/src/test/java/io/cloudslang/lang/runtime/steps/ParallelLoopStepsTest.java index b7f010305..ce6e1e57f 100644 --- a/cloudslang-runtime/src/test/java/io/cloudslang/lang/runtime/steps/ParallelLoopStepsTest.java +++ b/cloudslang-runtime/src/test/java/io/cloudslang/lang/runtime/steps/ParallelLoopStepsTest.java @@ -36,11 +36,13 @@ import io.cloudslang.runtime.api.python.executor.services.PythonExecutorLifecycleManagerService; import io.cloudslang.runtime.api.python.PythonRuntimeService; import io.cloudslang.runtime.api.python.executor.entities.PythonExecutorDetails; +import io.cloudslang.runtime.api.python.executor.services.PythonExecutorProcessManagerService; import io.cloudslang.runtime.impl.python.PythonExecutionCachedEngine; import io.cloudslang.runtime.impl.python.PythonExecutionEngine; import io.cloudslang.runtime.impl.python.PythonRuntimeServiceImpl; import io.cloudslang.runtime.impl.python.executor.services.ExternalPythonExecutorServiceImpl; import io.cloudslang.runtime.impl.python.executor.services.PythonExecutorLifecycleManagerServiceImpl; +import io.cloudslang.runtime.impl.python.executor.services.PythonExecutorProcessManagerServiceImpl; import io.cloudslang.runtime.impl.python.external.ExternalPythonExecutionEngine; import io.cloudslang.score.api.EndBranchDataContainer; import io.cloudslang.score.events.EventBus; @@ -623,7 +625,12 @@ public PythonExecutorCommunicationService pythonExecutorCommunicationService() { @Bean(name = "pythonExecutorLifecycleManagerService") public PythonExecutorLifecycleManagerService pythonExecutorLifecycleManagerService() { return new PythonExecutorLifecycleManagerServiceImpl(pythonExecutorCommunicationService(), - pythonExecutorConfigurationDataService()); + pythonExecutorConfigurationDataService(), pythonExecutorProcessManagerService()); + } + + @Bean(name = "pythonExecutorProcessManagerService") + public PythonExecutorProcessManagerService pythonExecutorProcessManagerService() { + return mock(PythonExecutorProcessManagerServiceImpl.class); } @Bean(name = "externalPythonRuntimeService") diff --git a/cloudslang-runtime/src/test/java/io/cloudslang/lang/runtime/steps/StepExecutionDataTest.java b/cloudslang-runtime/src/test/java/io/cloudslang/lang/runtime/steps/StepExecutionDataTest.java index d49ebde46..704febe6a 100644 --- a/cloudslang-runtime/src/test/java/io/cloudslang/lang/runtime/steps/StepExecutionDataTest.java +++ b/cloudslang-runtime/src/test/java/io/cloudslang/lang/runtime/steps/StepExecutionDataTest.java @@ -42,11 +42,13 @@ import io.cloudslang.runtime.api.python.executor.services.PythonExecutorLifecycleManagerService; import io.cloudslang.runtime.api.python.PythonRuntimeService; import io.cloudslang.runtime.api.python.executor.entities.PythonExecutorDetails; +import io.cloudslang.runtime.api.python.executor.services.PythonExecutorProcessManagerService; import io.cloudslang.runtime.impl.python.PythonExecutionCachedEngine; import io.cloudslang.runtime.impl.python.PythonExecutionEngine; import io.cloudslang.runtime.impl.python.PythonRuntimeServiceImpl; import io.cloudslang.runtime.impl.python.executor.services.ExternalPythonExecutorServiceImpl; import io.cloudslang.runtime.impl.python.executor.services.PythonExecutorLifecycleManagerServiceImpl; +import io.cloudslang.runtime.impl.python.executor.services.PythonExecutorProcessManagerServiceImpl; import io.cloudslang.runtime.impl.python.external.ExternalPythonExecutionEngine; import io.cloudslang.runtime.impl.python.external.ExternalPythonRuntimeServiceImpl; import io.cloudslang.score.events.EventBus; @@ -659,7 +661,12 @@ public PythonExecutorCommunicationService pythonExecutorCommunicationService() { @Bean(name = "pythonExecutorLifecycleManagerService") public PythonExecutorLifecycleManagerService pythonExecutorLifecycleManagerService() { return new PythonExecutorLifecycleManagerServiceImpl(pythonExecutorCommunicationService(), - pythonExecutorConfigurationDataService()); + pythonExecutorConfigurationDataService(), pythonExecutorProcessManagerService()); + } + + @Bean(name = "pythonExecutorProcessManagerService") + public PythonExecutorProcessManagerService pythonExecutorProcessManagerService() { + return mock(PythonExecutorProcessManagerServiceImpl.class); } @Bean(name = "externalPythonExecutorService")