Skip to content

Commit 8638460

Browse files
authored
Run unit test suites in parallel (opensearch-project#4190)
Signed-off-by: Simeon Widdis <sawiddis@gmail.com>
1 parent 81a7d30 commit 8638460

12 files changed

Lines changed: 14 additions & 1 deletion

File tree

DEVELOPER_GUIDE.rst

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,9 @@ Building and Running Tests
225225
Gradle Build
226226
------------
227227

228-
Most of the time you just need to run ./gradlew build which will make sure you pass all checks and testing. While you're developing, you may want to run specific Gradle task only. In this case, you can run ./gradlew with task name which only triggers the task along with those it depends on. Here is a list for common tasks:
228+
Most of the time you just need to run ``./gradlew build`` which will make sure you pass all checks and testing. While you're developing, you may want to run specific Gradle task only. In this case, you can run ./gradlew with task name which only triggers the task along with those it depends on. Here is a list for common tasks:
229+
230+
For faster local iterations, the build can skip integration and doctests. ``./gradlew build --parallel -x integTest -x doctest``.
229231

230232
.. list-table::
231233
:widths: 30 50

async-query-core/build.gradle

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,7 @@ spotless {
8585
}
8686

8787
test {
88+
maxParallelForks = Runtime.runtime.availableProcessors()
8889
useJUnitPlatform()
8990
testLogging {
9091
events "skipped", "failed"

async-query/build.gradle

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ dependencies {
5353
}
5454

5555
test {
56+
maxParallelForks = Runtime.runtime.availableProcessors()
5657
useJUnitPlatform {
5758
includeEngines("junit-jupiter")
5859
}

core/build.gradle

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,7 @@ spotless {
9494
}
9595

9696
test {
97+
maxParallelForks = Runtime.runtime.availableProcessors()
9798
useJUnitPlatform()
9899
testLogging {
99100
events "skipped", "failed"

datasources/build.gradle

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ dependencies {
3838
}
3939

4040
test {
41+
maxParallelForks = Runtime.runtime.availableProcessors()
4142
useJUnitPlatform()
4243
testLogging {
4344
events "skipped", "failed"

legacy/build.gradle

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,7 @@ compileTestJava {
8484

8585
// TODO: Need to update integration test to use OpenSearch test framework
8686
test {
87+
maxParallelForks = Runtime.runtime.availableProcessors()
8788
include '**/*Test.class'
8889
exclude 'org/opensearch/sql/intgtest/**'
8990
// Gradle runs unit test using a working directory other and project root

opensearch/build.gradle

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,7 @@ pitest {
8585
}
8686

8787
test {
88+
maxParallelForks = Runtime.runtime.availableProcessors()
8889
useJUnitPlatform()
8990
testLogging {
9091
events "skipped", "failed"

plugin/build.gradle

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -172,6 +172,7 @@ dependencies {
172172
}
173173

174174
test {
175+
maxParallelForks = Runtime.runtime.availableProcessors()
175176
include '**/*Test.class'
176177
testLogging {
177178
events "passed", "skipped", "failed"

ppl/build.gradle

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,7 @@ spotless {
8686
}
8787

8888
test {
89+
maxParallelForks = Runtime.runtime.availableProcessors()
8990
testLogging {
9091
events "passed", "skipped", "failed"
9192
exceptionFormat "full"

prometheus/build.gradle

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ dependencies {
3232
}
3333

3434
test {
35+
maxParallelForks = Runtime.runtime.availableProcessors()
3536
useJUnitPlatform()
3637
testLogging {
3738
events "passed", "skipped", "failed"

0 commit comments

Comments
 (0)