Skip to content

Commit

Permalink
feat: Set number of forks to execute tests in parallel. (#23506)
Browse files Browse the repository at this point in the history
* Set number of forks to execute tests in parallel.

* Add back `upToDateWhen`
  • Loading branch information
sergio-ropero authored Mar 1, 2023
1 parent 74db346 commit f0909f6
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
2 changes: 2 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -354,6 +354,8 @@ subprojects { subproj ->
}

test {
maxParallelForks = Runtime.runtime.availableProcessors() ?: 1

jacoco {
enabled = true
excludes = ['**/*Test*', '**/generated*']
Expand Down
7 changes: 4 additions & 3 deletions buildSrc/src/main/groovy/airbyte-integration-test-java.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,9 @@ class AirbyteIntegrationTestJavaPlugin implements Plugin<Project> {
}

project.task('integrationTestJava', type: Test) {
testClassesDirs += project.sourceSets.integrationTestJava.output.classesDirs
mustRunAfter project.test

testClassesDirs = project.sourceSets.integrationTestJava.output.classesDirs
classpath += project.sourceSets.integrationTestJava.runtimeClasspath

useJUnitPlatform {
Expand All @@ -44,8 +46,7 @@ class AirbyteIntegrationTestJavaPlugin implements Plugin<Project> {
}

maxHeapSize = '3g'

mustRunAfter project.test
maxParallelForks = Runtime.runtime.availableProcessors() ?: 1

// This is needed to make the destination-snowflake tests succeed - https://github.com/snowflakedb/snowflake-jdbc/issues/589#issuecomment-983944767
jvmArgs = ["--add-opens=java.base/java.nio=ALL-UNNAMED"]
Expand Down

0 comments on commit f0909f6

Please sign in to comment.