Skip to content

Commit

Permalink
Merge b0b3b09 into fde69ce
Browse files Browse the repository at this point in the history
  • Loading branch information
Tirla-Alin committed Jan 17, 2020
2 parents fde69ce + b0b3b09 commit 9e5ff34
Show file tree
Hide file tree
Showing 10 changed files with 19 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@
import java.util.List;
import java.util.Map;
import java.util.Set;
import java.util.concurrent.Semaphore;

import static org.junit.Assert.assertNull;

Expand Down Expand Up @@ -380,7 +381,7 @@ public PythonExecutionEngine pythonExecutionEngine() {

@Bean(name = "externalPythonRuntimeService")
public PythonRuntimeService externalPythonRuntimeService() {
return new ExternalPythonRuntimeServiceImpl();
return new ExternalPythonRuntimeServiceImpl(new Semaphore(100));
}

@Bean(name = "externalPythonExecutionEngine")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@
import java.util.List;
import java.util.Map;
import java.util.Set;
import java.util.concurrent.Semaphore;


@RunWith(SpringJUnit4ClassRunner.class)
Expand Down Expand Up @@ -499,7 +500,7 @@ public PythonExecutionEngine pythonExecutionEngine() {

@Bean(name = "externalPythonRuntimeService")
public PythonRuntimeService externalPythonRuntimeService() {
return new ExternalPythonRuntimeServiceImpl();
return new ExternalPythonRuntimeServiceImpl(new Semaphore(100));
}

@Bean(name = "externalPythonExecutionEngine")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@
import java.util.List;
import java.util.Map;
import java.util.Set;
import java.util.concurrent.Semaphore;

import static java.util.Collections.singletonList;

Expand Down Expand Up @@ -253,7 +254,7 @@ public PythonExecutionEngine pythonExecutionEngine() {

@Bean(name = "externalPythonRuntimeService")
public PythonRuntimeService externalPythonRuntimeService() {
return new ExternalPythonRuntimeServiceImpl();
return new ExternalPythonRuntimeServiceImpl(new Semaphore(100));
}

@Bean(name = "externalPythonExecutionEngine")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@
import java.util.HashMap;
import java.util.List;
import java.util.Set;
import java.util.concurrent.Semaphore;

import static java.util.Arrays.asList;

Expand Down Expand Up @@ -232,7 +233,7 @@ public PythonExecutionEngine pythonExecutionEngine() {

@Bean(name = "externalPythonRuntimeService")
public PythonRuntimeService externalPythonRuntimeService() {
return new ExternalPythonRuntimeServiceImpl();
return new ExternalPythonRuntimeServiceImpl(new Semaphore(100));
}

@Bean(name = "externalPythonExecutionEngine")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@
import java.util.HashSet;
import java.util.Map;
import java.util.Set;
import java.util.concurrent.Semaphore;

import static org.mockito.Matchers.anyMap;
import static org.mockito.Matchers.isA;
Expand Down Expand Up @@ -194,7 +195,7 @@ protected PythonInterpreter initInterpreter(Set<String> dependencies) {

@Bean(name = "externalPythonRuntimeService")
public PythonRuntimeService externalPythonRuntimeService() {
return new ExternalPythonRuntimeServiceImpl();
return new ExternalPythonRuntimeServiceImpl(new Semaphore(100));
}

@Bean(name = "externalPythonExecutionEngine")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@
import java.util.HashMap;
import java.util.Map;
import java.util.Set;
import java.util.concurrent.Semaphore;

import static org.mockito.Mockito.doThrow;
import static org.mockito.Mockito.eq;
Expand Down Expand Up @@ -145,7 +146,7 @@ protected PythonInterpreter initInterpreter(Set<String> dependencies) {

@Bean(name = "externalPythonRuntimeService")
public PythonRuntimeService externalPythonRuntimeService() {
return new ExternalPythonRuntimeServiceImpl();
return new ExternalPythonRuntimeServiceImpl(new Semaphore(100));
}

@Bean(name = "externalPythonExecutionEngine")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.concurrent.Semaphore;

import static io.cloudslang.lang.entities.ActionType.JAVA;
import static io.cloudslang.lang.entities.ActionType.PYTHON;
Expand Down Expand Up @@ -1203,7 +1204,7 @@ public PythonExecutionEngine pythonExecutionEngine() {

@Bean(name = "externalPythonRuntimeService")
public PythonRuntimeService externalPythonRuntimeService() {
return new ExternalPythonRuntimeServiceImpl();
return new ExternalPythonRuntimeServiceImpl(new Semaphore(100));
}

@Bean(name = "externalPythonExecutionEngine")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@
import java.util.List;
import java.util.Map;
import java.util.Set;
import java.util.concurrent.Semaphore;

import static java.util.Collections.singletonList;
import static org.mockito.Matchers.anyMap;
Expand Down Expand Up @@ -383,7 +384,7 @@ public PythonExecutionEngine pythonExecutionEngine() {

@Bean(name = "externalPythonRuntimeService")
public PythonRuntimeService externalPythonRuntimeService() {
return new ExternalPythonRuntimeServiceImpl();
return new ExternalPythonRuntimeServiceImpl(new Semaphore(100));
}

@Bean(name = "externalPythonExecutionEngine")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@
import java.util.List;
import java.util.Map;
import java.util.Set;
import java.util.concurrent.Semaphore;

import static java.util.Collections.singletonList;
import static org.junit.Assert.assertEquals;
Expand Down Expand Up @@ -555,7 +556,7 @@ public PythonExecutionEngine pythonExecutionEngine() {

@Bean(name = "externalPythonRuntimeService")
public PythonRuntimeService externalPythonRuntimeService() {
return new ExternalPythonRuntimeServiceImpl();
return new ExternalPythonRuntimeServiceImpl(new Semaphore(100));
}

@Bean(name = "externalPythonExecutionEngine")
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
<!--Project dependencies-->
<spring.version>4.3.17.RELEASE</spring.version>
<hamcrest.version>1.3</hamcrest.version>
<score.version>0.3.122</score.version>
<score.version>0.3.123</score.version>
<h2.version>1.4.199</h2.version>
<!--Project properties-->
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
Expand Down

0 comments on commit 9e5ff34

Please sign in to comment.