Skip to content

Commit

Permalink
fix(test):execute unit test parallel
Browse files Browse the repository at this point in the history
  • Loading branch information
lxcmyf committed Nov 7, 2023
1 parent 8de354f commit 5e67c09
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
5 changes: 5 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,11 @@ subprojects {
}
}


tasks.withType(JavaCompile).configureEach {
options.fork = true
}

task copyToParent(type: Copy) {
into "$buildDir/libs"
subprojects {
Expand Down
9 changes: 9 additions & 0 deletions framework/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,15 @@ test {
forkEvery = 100
jvmArgs "-XX:MetaspaceSize=128m","-XX:MaxMetaspaceSize=256m", "-XX:+UseG1GC"
}
maxParallelForks = Runtime.runtime.availableProcessors().intdiv(2) ?: 1
if (!project.hasProperty("createReports")) {
reports.html.enabled = false
reports.junitXml.enabled = false
}
doFirst {
forkEvery = 100
jvmArgs "-XX:MetaspaceSize=128m","-XX:MaxMetaspaceSize=256m", "-XX:+UseG1GC"
}
}

jacocoTestReport {
Expand Down

0 comments on commit 5e67c09

Please sign in to comment.