Skip to content

Commit 1d09058

Browse files
Merge branch 'master' into feature/cql-query-parser
2 parents cdf55ac + 21ebf4e commit 1d09058

111 files changed

Lines changed: 9902 additions & 332 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/ci.yml

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -405,6 +405,47 @@ jobs:
405405
CI_env: GithubAction
406406

407407

408+
python-bb-e2e:
409+
strategy:
410+
fail-fast: false
411+
matrix:
412+
os: [windows-latest, macos-latest]
413+
runs-on: ${{ matrix.os }}
414+
needs: setup
415+
if: needs.setup.outputs.debug == 'false'
416+
steps:
417+
- uses: actions/checkout@v6
418+
- name: Setup JDK ${{env.build-jdk}}
419+
uses: actions/setup-java@v5
420+
with:
421+
distribution: ${{env.java-distribution}}
422+
java-version: ${{env.build-jdk}}
423+
- name: Setup Python
424+
uses: actions/setup-python@v6
425+
with:
426+
python-version: '3.10'
427+
- name: Setup Node
428+
uses: actions/setup-node@v4
429+
with:
430+
node-version: '20'
431+
- name: Cache Maven packages
432+
uses: actions/cache@v5
433+
with:
434+
path: ~/.m2
435+
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
436+
restore-keys: ${{ runner.os }}-m2
437+
- name: Build with Maven
438+
run: mvn clean install -DskipTests
439+
env:
440+
CI_env: GithubAction
441+
- name: Run Python/Django BB E2E tests
442+
# important that what we run here does not use Docker
443+
working-directory: core-tests/e2e-tests/python-rest-bb
444+
run: mvn clean verify --fae
445+
env:
446+
CI_env: GithubAction
447+
448+
408449
tests:
409450
runs-on: ubuntu-latest
410451
needs: full-build-base

.gitignore

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,16 @@ Migrations/
130130
/core-tests/e2e-tests/spring/spring-rest-bb/javascript/generated/
131131
/core-tests/e2e-tests/spring/spring-rest-bb/python/generated/
132132

133+
/core-tests/e2e-tests/python-rest-bb/target/
134+
/core-tests/e2e-tests/python-rest-bb/python/generated/
135+
/core-tests/e2e-tests/python-rest-bb/maven/src/
136+
/core-tests/e2e-tests/python-rest-bb/maven/target/
137+
/core-tests/e2e-tests/python-rest-bb/javascript/node_modules/
138+
/core-tests/e2e-tests/python-rest-bb/javascript/generated/
139+
/core-tests/e2e-tests/python-rest-bb/sut/django/db.sqlite3
140+
/core-tests/e2e-tests/python-rest-bb/sut/django/.venv/
141+
/core-tests/e2e-tests/python-rest-bb/sut/django/**/__pycache__/
142+
133143
/client-java/test-utils-java/target/
134144

135145
/test-utils/test-utils-py/target/

client-java/controller/src/main/java/org/evomaster/client/java/controller/SutHandler.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,8 @@ default void registerOrExecuteInitSqlCommandsIfNeeded(){}
196196
* reset database if the smart db cleaning is employed
197197
* </p>
198198
* @param tablesToClean represents a list of table which will be reset based on specified DbSpecification.
199-
* note that null tablesToClean means all table will be reset.
199+
* note that `null` tablesToClean means all table will be reset,
200+
* empty tablesToClean indicates that none of tables will be reset.
200201
*/
201202
default void resetDatabase(List<String> tablesToClean){}
202203

client-java/controller/src/main/java/org/evomaster/client/java/controller/neo4j/conditions/AndCondition.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,12 @@ public class AndCondition implements CypherCondition {
1212
private final List<CypherCondition> conditions;
1313

1414
public AndCondition(List<CypherCondition> conditions) {
15-
this.conditions = conditions != null ? new ArrayList<>(conditions) : new ArrayList<>();
15+
this.conditions = Collections.unmodifiableList(
16+
conditions != null ? new ArrayList<>(conditions) : new ArrayList<>());
1617
}
1718

1819
public List<CypherCondition> getConditions() {
19-
return Collections.unmodifiableList(conditions);
20+
return conditions;
2021
}
2122

2223
@Override

client-java/controller/src/main/java/org/evomaster/client/java/controller/neo4j/conditions/AnyLabelCondition.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ public class AnyLabelCondition implements CypherCondition {
1111
private final String variableName;
1212

1313
public AnyLabelCondition(String variableName) {
14-
this.variableName = variableName;
14+
this.variableName = Objects.requireNonNull(variableName, "variableName must not be null");
1515
}
1616

1717
public String getVariableName() {

client-java/controller/src/main/java/org/evomaster/client/java/controller/neo4j/conditions/ArithmeticOperand.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@ public final class ArithmeticOperand implements Operand {
2121
private final Operand right;
2222

2323
public ArithmeticOperand(ArithmeticOperator operator, Operand left, Operand right) {
24-
this.operator = operator;
25-
this.left = left;
24+
this.operator = Objects.requireNonNull(operator, "operator must not be null");
25+
this.left = Objects.requireNonNull(left, "left operand must not be null");
2626
this.right = right;
2727
}
2828

client-java/controller/src/main/java/org/evomaster/client/java/controller/neo4j/conditions/ComparisonCondition.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ public class ComparisonCondition implements CypherCondition {
1414
private final Operand right;
1515

1616
public ComparisonCondition(Operand left, ComparisonOperator operator, Operand right) {
17-
this.left = left;
18-
this.operator = operator;
17+
this.left = Objects.requireNonNull(left, "left operand must not be null");
18+
this.operator = Objects.requireNonNull(operator, "operator must not be null");
1919
this.right = right;
2020
}
2121

client-java/controller/src/main/java/org/evomaster/client/java/controller/neo4j/conditions/ComparisonOperator.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ public enum ComparisonOperator {
1919

2020
private final String symbol;
2121

22-
ComparisonOperator(String symbol) {
22+
private ComparisonOperator(String symbol) {
2323
this.symbol = symbol;
2424
}
2525

client-java/controller/src/main/java/org/evomaster/client/java/controller/neo4j/conditions/LabelCondition.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ public class LabelCondition implements CypherCondition {
1212
private final String label;
1313

1414
public LabelCondition(String variableName, String label) {
15-
this.variableName = variableName;
16-
this.label = label;
15+
this.variableName = Objects.requireNonNull(variableName, "variableName must not be null");
16+
this.label = Objects.requireNonNull(label, "label must not be null");
1717
}
1818

1919
public String getVariableName() {

client-java/controller/src/main/java/org/evomaster/client/java/controller/neo4j/conditions/ListOperand.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,12 @@ public final class ListOperand implements Operand {
1313
private final List<Operand> elements;
1414

1515
public ListOperand(List<Operand> elements) {
16-
this.elements = elements != null ? new ArrayList<>(elements) : new ArrayList<>();
16+
this.elements = Collections.unmodifiableList(
17+
elements != null ? new ArrayList<>(elements) : new ArrayList<>());
1718
}
1819

1920
public List<Operand> getElements() {
20-
return Collections.unmodifiableList(elements);
21+
return elements;
2122
}
2223

2324
@Override

0 commit comments

Comments
 (0)