Skip to content

Commit

Permalink
Add randomizedtesting plugin to configure testing opts and defaults.
Browse files Browse the repository at this point in the history
  • Loading branch information
dweiss committed May 22, 2024
1 parent 794701e commit 414a600
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ plugins {
alias(deps.plugins.forbiddenapis) apply false
alias(deps.plugins.jmh) apply false
alias(deps.plugins.versionCatalogUpdate) apply false
alias(deps.plugins.randomizedtesting) apply false
}

rootProject.version = deps.versions.hppcVersion.get()
Expand Down
2 changes: 2 additions & 0 deletions gradle/java/tests.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ import org.gradle.api.tasks.testing.logging.*

allprojects {
plugins.withType(JavaPlugin) {
project.apply plugin: deps.plugins.randomizedtesting.get().pluginId

test {
maxParallelForks = propertyOrDefault("tests.jvms",
(int) Math.max(1, Math.min(Runtime.runtime.availableProcessors() / 2.0, 4.0))) as Integer
Expand Down
1 change: 1 addition & 0 deletions versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -41,3 +41,4 @@ forbiddenapis = "de.thetaphi.forbiddenapis:3.7"
jmh = "me.champeau.jmh:0.7.2"
spotless = "com.diffplug.spotless:6.25.0"
versionCatalogUpdate = "nl.littlerobots.version-catalog-update:0.8.4"
randomizedtesting = "com.carrotsearch.gradle.randomizedtesting:0.0.6"

0 comments on commit 414a600

Please sign in to comment.