Skip to content

Commit 3b47785

Browse files
Relax Testcontainers parallelism limit from 1 to 2 (#12034)
Relaxed test containers hard limit of one. Merge branch 'master' into alexeyk/test-containers-limit-2 Make Testcontainers parallelism limit configurable via Gradle property Read maxParallelUsages from the testcontainersMaxParallelUsages Gradle property (default 2) so it can be tuned in CI or locally without a code change, per review feedback. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Co-authored-by: alexey.kuznetsov <alexey.kuznetsov@datadoghq.com>
1 parent 84de0a8 commit 3b47785

2 files changed

Lines changed: 6 additions & 1 deletion

File tree

gradle.properties

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,9 @@ org.gradle.jvmargs=-XX:MaxMetaspaceSize=1g
55
# Toggle on to get more details during IJ sync
66
#org.gradle.logging.level=info
77

8+
# Max number of Testcontainers-backed test tasks allowed to run concurrently.
9+
# Override in CI or locally to trade CI throughput against resource pressure
10+
# (containers, memory, ports), e.g. -PtestcontainersMaxParallelUsages=3
11+
testcontainersMaxParallelUsages=2
12+
813
# CI use constrained org.gradle.java.installations settings

gradle/java_no_deps.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ abstract class TestcontainersLimitService implements BuildService<BuildServicePa
147147
}
148148

149149
ext.testcontainersLimit = gradle.sharedServices.registerIfAbsent("testcontainersLimit", TestcontainersLimitService) {
150-
maxParallelUsages = 1
150+
maxParallelUsages = project.findProperty("testcontainersMaxParallelUsages").toInteger()
151151
}
152152

153153
// Task for tests that want to run forked in their own separate JVM

0 commit comments

Comments
 (0)