Skip to content

Commit 00f8da0

Browse files
authored
Fix log injection Groovy incompatibility (#9314)
* Fix log injection gradle incompatibility * Address review comments
1 parent 2f4f626 commit 00f8da0

File tree

2 files changed

+5
-16
lines changed

2 files changed

+5
-16
lines changed

dd-smoke-tests/log-injection/build.gradle

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,6 @@ plugins {
44
id 'com.gradleup.shadow'
55
}
66

7-
ext {
8-
// TODO: Fix for Java 25. Gradle Test Executor failed. Update givenGradleVersionIsCompatibleWithCurrentJvm() when Gradle releases Java 25 support: https://docs.gradle.org/current/userguide/compatibility.html#java_runtime
9-
maxJavaVersionForTests = JavaVersion.VERSION_24
10-
}
11-
127
apply from: "$rootDir/gradle/java.gradle"
138
description = 'Log injection Smoke Tests.'
149

@@ -357,6 +352,11 @@ generateTestingJar('Flogger', 'Slf4jToLogbackLatest',
357352

358353
tasks.withType(Test).configureEach {
359354
dependsOn tasks.withType(ShadowJar)
355+
356+
// Runtime.getRuntime().availableProcessors() is used to scale the parallelism by default,
357+
// but it returns weird values in Gitlab/kubernetes, so fix to a specific value when available
358+
def override = System.getenv("RUNTIME_AVAILABLE_PROCESSORS_OVERRIDE")
359+
maxParallelForks = override?.toInteger() ?: Math.max(1, (Runtime.runtime.availableProcessors() / 2).toInteger())
360360
}
361361

362362

dd-smoke-tests/log-injection/src/test/resources/SpockConfig.groovy

Lines changed: 0 additions & 11 deletions
This file was deleted.

0 commit comments

Comments
 (0)