mirror of
https://github.com/corda/corda.git
synced 2025-05-29 13:44:25 +00:00
INFRA-563 Update Corda to test distributed-testing-plugin 1.3-SNAPSHOT. (#6551)
Integrate YAML profile support, and the eagle-eyed will notice that the plugin no longer needs to be applied at the very bottom of the build.gradle file! Other features include: * Implicit upgrade to docker-remote-api plugin v5.3.0 * Fixing a ClassGraph-related memory leak by closing the ScanResult objects after use. * More logging of any exceptions from Kubenetese. * The gradlecache volume is now created with a hostPath of "/gradle/$podName/$podIdx-$taskForExecuteName", which should allow having multiple pods on a single node.
This commit is contained in:
parent
9fd8107922
commit
d60feb1138
120
build.gradle
120
build.gradle
@ -1,5 +1,4 @@
|
|||||||
import com.r3.testing.DistributeTestsBy
|
import com.r3.testing.DistributeTestsBy
|
||||||
import com.r3.testing.ParallelTestGroup
|
|
||||||
import com.r3.testing.PodLogLevel
|
import com.r3.testing.PodLogLevel
|
||||||
|
|
||||||
import static org.gradle.api.JavaVersion.VERSION_11
|
import static org.gradle.api.JavaVersion.VERSION_11
|
||||||
@ -218,10 +217,13 @@ buildscript {
|
|||||||
// Capsule gradle plugin forked and maintained locally to support Gradle 5.x
|
// Capsule gradle plugin forked and maintained locally to support Gradle 5.x
|
||||||
// See https://github.com/corda/gradle-capsule-plugin
|
// See https://github.com/corda/gradle-capsule-plugin
|
||||||
classpath "us.kirchmeier:gradle-capsule-plugin:1.0.4_r3"
|
classpath "us.kirchmeier:gradle-capsule-plugin:1.0.4_r3"
|
||||||
classpath group: "com.r3.testing", name: "gradle-distributed-testing-plugin", version: "1.2-LOCAL-K8S-SHARED-CACHE-SNAPSHOT", changing: true
|
classpath group: "com.r3.testing", name: "gradle-distributed-testing-plugin", version: "1.3-SNAPSHOT", changing: true
|
||||||
classpath "com.bmuschko:gradle-docker-plugin:5.0.0"
|
|
||||||
classpath "org.sonarsource.scanner.gradle:sonarqube-gradle-plugin:2.8"
|
classpath "org.sonarsource.scanner.gradle:sonarqube-gradle-plugin:2.8"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
configurations.all {
|
||||||
|
resolutionStrategy.cacheChangingModulesFor 0, 'seconds'
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
plugins {
|
plugins {
|
||||||
@ -235,7 +237,7 @@ apply plugin: 'project-report'
|
|||||||
apply plugin: 'com.github.ben-manes.versions'
|
apply plugin: 'com.github.ben-manes.versions'
|
||||||
apply plugin: 'net.corda.plugins.publish-utils'
|
apply plugin: 'net.corda.plugins.publish-utils'
|
||||||
apply plugin: 'com.jfrog.artifactory'
|
apply plugin: 'com.jfrog.artifactory'
|
||||||
apply plugin: "com.bmuschko.docker-remote-api"
|
apply plugin: 'com.r3.testing.distributed-testing'
|
||||||
|
|
||||||
|
|
||||||
// If the command line project option -PversionFromGit is added to the gradle invocation, we'll resolve
|
// If the command line project option -PversionFromGit is added to the gradle invocation, we'll resolve
|
||||||
@ -733,77 +735,45 @@ buildScan {
|
|||||||
termsOfServiceAgree = 'yes'
|
termsOfServiceAgree = 'yes'
|
||||||
}
|
}
|
||||||
|
|
||||||
ext.generalPurpose = [
|
distributedTesting {
|
||||||
numberOfShards: 15,
|
profilesURL = 'https://raw.githubusercontent.com/corda/infrastructure-profiles/master'
|
||||||
streamOutput: false,
|
|
||||||
coresPerFork: 2,
|
|
||||||
memoryInGbPerFork: 12,
|
|
||||||
nodeTaints: "small"
|
|
||||||
]
|
|
||||||
|
|
||||||
ext.largeScaleSet = [
|
parallelTestGroups {
|
||||||
numberOfShards: 15,
|
allParallelIntegrationTest {
|
||||||
streamOutput: false,
|
testGroups 'integrationTest'
|
||||||
coresPerFork: 6,
|
profile 'generalPurpose.yml'
|
||||||
memoryInGbPerFork: 10,
|
podLogLevel PodLogLevel.INFO
|
||||||
nodeTaints: "big"
|
distribution DistributeTestsBy.METHOD
|
||||||
]
|
}
|
||||||
|
allParallelUnitTest {
|
||||||
|
podLogLevel PodLogLevel.INFO
|
||||||
|
testGroups 'test'
|
||||||
|
profile 'generalPurpose.yml'
|
||||||
|
distribution DistributeTestsBy.CLASS
|
||||||
|
}
|
||||||
|
allParallelUnitAndIntegrationTest {
|
||||||
|
testGroups 'test', 'integrationTest'
|
||||||
|
profile 'generalPurpose.yml'
|
||||||
|
distribution DistributeTestsBy.METHOD
|
||||||
|
}
|
||||||
|
parallelRegressionTest {
|
||||||
|
testGroups 'test', 'integrationTest', 'smokeTest'
|
||||||
|
profile 'generalPurpose.yml'
|
||||||
|
distribution DistributeTestsBy.METHOD
|
||||||
|
}
|
||||||
|
allParallelSmokeTest {
|
||||||
|
testGroups 'smokeTest'
|
||||||
|
profile 'generalPurpose.yml'
|
||||||
|
distribution DistributeTestsBy.METHOD
|
||||||
|
}
|
||||||
|
allParallelSlowIntegrationTest {
|
||||||
|
testGroups 'slowIntegrationTest'
|
||||||
|
profile 'generalPurpose.yml'
|
||||||
|
distribution DistributeTestsBy.METHOD
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
task allParallelIntegrationTest(type: ParallelTestGroup) {
|
ignoredTests = [
|
||||||
podLogLevel PodLogLevel.INFO
|
':core-deterministic:testing:data:test'
|
||||||
testGroups "integrationTest"
|
]
|
||||||
numberOfShards generalPurpose.numberOfShards
|
|
||||||
streamOutput generalPurpose.streamOutput
|
|
||||||
coresPerFork generalPurpose.coresPerFork
|
|
||||||
memoryInGbPerFork generalPurpose.memoryInGbPerFork
|
|
||||||
nodeTaints generalPurpose.nodeTaints
|
|
||||||
distribute DistributeTestsBy.METHOD
|
|
||||||
}
|
}
|
||||||
task allParallelUnitTest(type: ParallelTestGroup) {
|
|
||||||
podLogLevel PodLogLevel.INFO
|
|
||||||
testGroups "test"
|
|
||||||
numberOfShards generalPurpose.numberOfShards
|
|
||||||
streamOutput generalPurpose.streamOutput
|
|
||||||
coresPerFork generalPurpose.coresPerFork
|
|
||||||
memoryInGbPerFork generalPurpose.memoryInGbPerFork
|
|
||||||
nodeTaints generalPurpose.nodeTaints
|
|
||||||
distribute DistributeTestsBy.CLASS
|
|
||||||
}
|
|
||||||
task allParallelUnitAndIntegrationTest(type: ParallelTestGroup) {
|
|
||||||
testGroups "test", "integrationTest"
|
|
||||||
numberOfShards generalPurpose.numberOfShards
|
|
||||||
streamOutput generalPurpose.streamOutput
|
|
||||||
coresPerFork generalPurpose.coresPerFork
|
|
||||||
memoryInGbPerFork generalPurpose.memoryInGbPerFork
|
|
||||||
nodeTaints generalPurpose.nodeTaints
|
|
||||||
distribute DistributeTestsBy.METHOD
|
|
||||||
}
|
|
||||||
task parallelRegressionTest(type: ParallelTestGroup) {
|
|
||||||
testGroups "test", "integrationTest", "smokeTest"
|
|
||||||
numberOfShards generalPurpose.numberOfShards
|
|
||||||
streamOutput generalPurpose.streamOutput
|
|
||||||
coresPerFork generalPurpose.coresPerFork
|
|
||||||
memoryInGbPerFork generalPurpose.memoryInGbPerFork
|
|
||||||
nodeTaints generalPurpose.nodeTaints
|
|
||||||
distribute DistributeTestsBy.METHOD
|
|
||||||
}
|
|
||||||
task allParallelSmokeTest(type: ParallelTestGroup) {
|
|
||||||
testGroups "smokeTest"
|
|
||||||
numberOfShards generalPurpose.numberOfShards
|
|
||||||
streamOutput generalPurpose.streamOutput
|
|
||||||
coresPerFork generalPurpose.coresPerFork
|
|
||||||
memoryInGbPerFork generalPurpose.memoryInGbPerFork
|
|
||||||
nodeTaints generalPurpose.nodeTaints
|
|
||||||
distribute DistributeTestsBy.METHOD
|
|
||||||
}
|
|
||||||
task allParallelSlowIntegrationTest(type: ParallelTestGroup) {
|
|
||||||
testGroups "slowIntegrationTest"
|
|
||||||
numberOfShards generalPurpose.numberOfShards
|
|
||||||
streamOutput generalPurpose.streamOutput
|
|
||||||
coresPerFork generalPurpose.coresPerFork
|
|
||||||
memoryInGbPerFork generalPurpose.memoryInGbPerFork
|
|
||||||
nodeTaints generalPurpose.nodeTaints
|
|
||||||
distribute DistributeTestsBy.METHOD
|
|
||||||
}
|
|
||||||
apply plugin: 'com.r3.testing.distributed-testing'
|
|
||||||
apply plugin: 'com.r3.testing.image-building'
|
|
||||||
|
@ -25,10 +25,7 @@ tasks.named('jar', Jar) {
|
|||||||
enabled = false
|
enabled = false
|
||||||
}
|
}
|
||||||
|
|
||||||
test {
|
def test = tasks.named('test', Test) {
|
||||||
ext {
|
|
||||||
ignoreForDistribution = true
|
|
||||||
}
|
|
||||||
filter {
|
filter {
|
||||||
// Running this class is the whole point, so include it explicitly.
|
// Running this class is the whole point, so include it explicitly.
|
||||||
includeTestsMatching "net.corda.deterministic.data.GenerateData"
|
includeTestsMatching "net.corda.deterministic.data.GenerateData"
|
||||||
@ -37,8 +34,9 @@ test {
|
|||||||
// note: required by Gradle Build Cache.
|
// note: required by Gradle Build Cache.
|
||||||
outputs.upToDateWhen { false }
|
outputs.upToDateWhen { false }
|
||||||
}
|
}
|
||||||
assemble.finalizedBy test
|
|
||||||
|
|
||||||
|
def testDataJar = file("$buildDir/test-data.jar")
|
||||||
artifacts {
|
artifacts {
|
||||||
testData file: file("$buildDir/test-data.jar"), type: 'jar', builtBy: test
|
archives file: testDataJar, type: 'jar', builtBy: test
|
||||||
|
testData file: testDataJar, type: 'jar', builtBy: test
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user