(build) Move unit test configuration to root build.gradle

This commit is contained in:
Viktor Lofgren 2023-10-04 12:46:22 +02:00
parent 233b51e29e
commit c51159672e
53 changed files with 15 additions and 546 deletions

View File

@ -36,6 +36,18 @@ allprojects {
lombok libs.lombok // prevent plugin from downgrading the version to something incompatible with '19 lombok libs.lombok // prevent plugin from downgrading the version to something incompatible with '19
} }
test {
maxHeapSize = "8G"
useJUnitPlatform()
}
tasks.register('fastTests', Test) {
maxHeapSize = "8G"
useJUnitPlatform {
excludeTags "slow"
}
}
} }
tasks.register('dist', Copy) { tasks.register('dist', Copy) {

View File

@ -29,13 +29,3 @@ dependencies {
testImplementation libs.mockito testImplementation libs.mockito
} }
test {
useJUnitPlatform()
}
task fastTests(type: Test) {
useJUnitPlatform {
excludeTags "slow"
}
}

View File

@ -33,13 +33,3 @@ dependencies {
testImplementation libs.bundles.junit testImplementation libs.bundles.junit
testImplementation libs.mockito testImplementation libs.mockito
} }
test {
useJUnitPlatform()
}
task fastTests(type: Test) {
useJUnitPlatform {
excludeTags "slow"
}
}

View File

@ -18,13 +18,3 @@ dependencies {
testImplementation libs.bundles.junit testImplementation libs.bundles.junit
testImplementation libs.mockito testImplementation libs.mockito
} }
test {
useJUnitPlatform()
}
task fastTests(type: Test) {
useJUnitPlatform {
excludeTags "slow"
}
}

View File

@ -31,13 +31,3 @@ dependencies {
testImplementation libs.mockito testImplementation libs.mockito
} }
test {
useJUnitPlatform()
}
task fastTests(type: Test) {
useJUnitPlatform {
excludeTags "slow"
}
}

View File

@ -15,17 +15,3 @@ dependencies {
implementation project(':code:common:service-discovery') implementation project(':code:common:service-discovery')
implementation project(':code:common:service-client') implementation project(':code:common:service-client')
} }
test {
maxParallelForks = Runtime.runtime.availableProcessors().intdiv(2) ?: 1
maxHeapSize = "8G"
useJUnitPlatform()
}
task fastTests(type: Test) {
maxParallelForks = Runtime.runtime.availableProcessors().intdiv(2) ?: 1
maxHeapSize = "8G"
useJUnitPlatform {
excludeTags "slow"
}
}

View File

@ -52,17 +52,3 @@ flyway {
locations = ['filesystem:src/main/resources/db/migration'] locations = ['filesystem:src/main/resources/db/migration']
} }
test {
maxParallelForks = Runtime.runtime.availableProcessors().intdiv(2) ?: 1
maxHeapSize = "8G"
useJUnitPlatform()
}
task fastTests(type: Test) {
maxParallelForks = Runtime.runtime.availableProcessors().intdiv(2) ?: 1
maxHeapSize = "8G"
useJUnitPlatform {
excludeTags "slow"
}
}

View File

@ -38,17 +38,3 @@ dependencies {
testImplementation 'org.testcontainers:junit-jupiter:1.17.4' testImplementation 'org.testcontainers:junit-jupiter:1.17.4'
} }
test {
maxParallelForks = Runtime.runtime.availableProcessors().intdiv(2) ?: 1
maxHeapSize = "8G"
useJUnitPlatform()
}
task fastTests(type: Test) {
maxParallelForks = Runtime.runtime.availableProcessors().intdiv(2) ?: 1
maxHeapSize = "8G"
useJUnitPlatform {
excludeTags "slow"
}
}

View File

@ -36,17 +36,4 @@ dependencies {
testImplementation libs.mockito testImplementation libs.mockito
} }
test {
maxParallelForks = Runtime.runtime.availableProcessors().intdiv(2) ?: 1
maxHeapSize = "8G"
useJUnitPlatform()
}
task fastTests(type: Test) {
maxParallelForks = Runtime.runtime.availableProcessors().intdiv(2) ?: 1
maxHeapSize = "8G"
useJUnitPlatform {
excludeTags "slow"
}
}

View File

@ -27,17 +27,3 @@ dependencies {
testImplementation libs.bundles.junit testImplementation libs.bundles.junit
testImplementation libs.mockito testImplementation libs.mockito
} }
test {
maxParallelForks = Runtime.runtime.availableProcessors().intdiv(2) ?: 1
maxHeapSize = "8G"
useJUnitPlatform()
}
task fastTests(type: Test) {
maxParallelForks = Runtime.runtime.availableProcessors().intdiv(2) ?: 1
maxHeapSize = "8G"
useJUnitPlatform {
excludeTags "slow"
}
}

View File

@ -20,14 +20,3 @@ dependencies {
testImplementation libs.bundles.junit testImplementation libs.bundles.junit
testImplementation libs.mockito testImplementation libs.mockito
} }
test {
useJUnitPlatform()
}
task fastTests(type: Test) {
useJUnitPlatform {
excludeTags "slow"
}
}

View File

@ -34,17 +34,3 @@ dependencies {
testImplementation libs.bundles.junit testImplementation libs.bundles.junit
testImplementation libs.mockito testImplementation libs.mockito
} }
test {
maxParallelForks = Runtime.runtime.availableProcessors().intdiv(2) ?: 1
maxHeapSize = "8G"
useJUnitPlatform()
}
task fastTests(type: Test) {
maxParallelForks = Runtime.runtime.availableProcessors().intdiv(2) ?: 1
maxHeapSize = "8G"
useJUnitPlatform {
excludeTags "slow"
}
}

View File

@ -26,13 +26,3 @@ dependencies {
testImplementation libs.mockito testImplementation libs.mockito
} }
test {
useJUnitPlatform()
}
task fastTests(type: Test) {
useJUnitPlatform {
excludeTags "slow"
}
}

View File

@ -35,14 +35,3 @@ dependencies {
testImplementation libs.mockito testImplementation libs.mockito
testImplementation project(':code:processes:converting-process') testImplementation project(':code:processes:converting-process')
} }
test {
maxHeapSize = "8G"
useJUnitPlatform()
}
task fastTests(type: Test) {
useJUnitPlatform {
excludeTags "slow"
}
}

View File

@ -27,14 +27,3 @@ dependencies {
testImplementation libs.mockito testImplementation libs.mockito
testImplementation project(':code:common:config') testImplementation project(':code:common:config')
} }
test {
useJUnitPlatform()
}
task fastTests(type: Test) {
useJUnitPlatform {
excludeTags "slow"
}
}

View File

@ -15,6 +15,7 @@ dependencies {
implementation 'org.tukaani:xz:1.8' implementation 'org.tukaani:xz:1.8'
implementation project(':code:libraries:blocking-thread-pool') implementation project(':code:libraries:blocking-thread-pool')
implementation project(':code:common:model')
implementation libs.notnull implementation libs.notnull
implementation libs.jsoup implementation libs.jsoup

View File

@ -35,13 +35,3 @@ dependencies {
testImplementation project(':code:common:model') testImplementation project(':code:common:model')
} }
test {
maxHeapSize = "8G"
useJUnitPlatform()
}
task fastTests(type: Test) {
useJUnitPlatform {
excludeTags "slow"
}
}

View File

@ -27,14 +27,3 @@ dependencies {
testImplementation libs.bundles.junit testImplementation libs.bundles.junit
testImplementation libs.mockito testImplementation libs.mockito
} }
test {
useJUnitPlatform()
}
task fastTests(type: Test) {
useJUnitPlatform {
excludeTags "slow"
}
}

View File

@ -35,12 +35,3 @@ dependencies {
testImplementation libs.mockito testImplementation libs.mockito
} }
test {
useJUnitPlatform()
}
task fastTests(type: Test) {
useJUnitPlatform {
excludeTags "slow"
}
}

View File

@ -31,13 +31,3 @@ dependencies {
testImplementation libs.bundles.junit testImplementation libs.bundles.junit
testImplementation libs.mockito testImplementation libs.mockito
} }
test {
useJUnitPlatform()
}
task fastTests(type: Test) {
useJUnitPlatform {
excludeTags "slow"
}
}

View File

@ -30,14 +30,3 @@ dependencies {
testImplementation libs.bundles.junit testImplementation libs.bundles.junit
testImplementation libs.mockito testImplementation libs.mockito
} }
test {
useJUnitPlatform()
}
task fastTests(type: Test) {
useJUnitPlatform {
excludeTags "slow"
}
}

View File

@ -32,13 +32,3 @@ dependencies {
testImplementation libs.bundles.junit testImplementation libs.bundles.junit
testImplementation libs.mockito testImplementation libs.mockito
} }
test {
useJUnitPlatform()
}
task fastTests(type: Test) {
useJUnitPlatform {
excludeTags "slow"
}
}

View File

@ -29,13 +29,3 @@ dependencies {
testImplementation libs.bundles.junit testImplementation libs.bundles.junit
testImplementation libs.mockito testImplementation libs.mockito
} }
test {
useJUnitPlatform()
}
task fastTests(type: Test) {
useJUnitPlatform {
excludeTags "slow"
}
}

View File

@ -23,12 +23,3 @@ dependencies {
testImplementation libs.mockito testImplementation libs.mockito
} }
test {
useJUnitPlatform()
}
task fastTests(type: Test) {
useJUnitPlatform {
excludeTags "slow"
}
}

View File

@ -31,12 +31,3 @@ dependencies {
testImplementation libs.mockito testImplementation libs.mockito
} }
test {
useJUnitPlatform()
}
task fastTests(type: Test) {
useJUnitPlatform {
excludeTags "slow"
}
}

View File

@ -32,15 +32,3 @@ dependencies {
testImplementation libs.mockito testImplementation libs.mockito
} }
test {
maxHeapSize = "8G"
useJUnitPlatform()
}
task fastTests(type: Test) {
maxHeapSize = "8G"
useJUnitPlatform {
excludeTags "slow"
}
}

View File

@ -33,17 +33,3 @@ configurations {
e2eTestImplementation.extendsFrom(testImplementation) e2eTestImplementation.extendsFrom(testImplementation)
} }
test {
maxParallelForks = Runtime.runtime.availableProcessors().intdiv(2) ?: 1
maxHeapSize = "8G"
useJUnitPlatform()
}
task fastTests(type: Test) {
maxParallelForks = Runtime.runtime.availableProcessors().intdiv(2) ?: 1
maxHeapSize = "8G"
useJUnitPlatform {
excludeTags "slow"
}
}

View File

@ -28,13 +28,3 @@ dependencies {
testImplementation project(':code:libraries:braille-block-punch-cards') testImplementation project(':code:libraries:braille-block-punch-cards')
} }
test {
useJUnitPlatform()
}
task fastTests(type: Test) {
useJUnitPlatform {
excludeTags "slow"
}
}

View File

@ -27,15 +27,4 @@ dependencies {
testImplementation libs.bundles.junit testImplementation libs.bundles.junit
testImplementation libs.mockito testImplementation libs.mockito
}
test {
useJUnitPlatform()
}
task fastTests(type: Test) {
useJUnitPlatform {
excludeTags "slow"
}
} }

View File

@ -33,14 +33,3 @@ dependencies {
testImplementation libs.bundles.junit testImplementation libs.bundles.junit
testImplementation libs.mockito testImplementation libs.mockito
} }
test {
useJUnitPlatform()
}
task fastTests(type: Test) {
useJUnitPlatform {
excludeTags "slow"
}
}

View File

@ -30,13 +30,3 @@ dependencies {
testImplementation 'org.testcontainers:mariadb:1.17.4' testImplementation 'org.testcontainers:mariadb:1.17.4'
testImplementation 'org.testcontainers:junit-jupiter:1.17.4' testImplementation 'org.testcontainers:junit-jupiter:1.17.4'
} }
test {
useJUnitPlatform()
}
task fastTests(type: Test) {
useJUnitPlatform {
excludeTags "slow"
}
}

View File

@ -35,14 +35,3 @@ dependencies {
testImplementation libs.bundles.junit testImplementation libs.bundles.junit
testImplementation libs.mockito testImplementation libs.mockito
} }
test {
useJUnitPlatform()
}
task fastTests(type: Test) {
useJUnitPlatform {
excludeTags "slow"
}
}

View File

@ -27,12 +27,3 @@ dependencies {
testImplementation libs.mockito testImplementation libs.mockito
} }
test {
useJUnitPlatform()
}
task fastTests(type: Test) {
useJUnitPlatform {
excludeTags "slow"
}
}

View File

@ -34,13 +34,3 @@ dependencies {
testImplementation libs.bundles.junit testImplementation libs.bundles.junit
testImplementation libs.mockito testImplementation libs.mockito
} }
test {
useJUnitPlatform()
}
task fastTests(type: Test) {
useJUnitPlatform {
excludeTags "slow"
}
}

View File

@ -24,12 +24,3 @@ dependencies {
testImplementation libs.mockito testImplementation libs.mockito
} }
test {
useJUnitPlatform()
}
task fastTests(type: Test) {
useJUnitPlatform {
excludeTags "slow"
}
}

View File

@ -20,12 +20,3 @@ dependencies {
testImplementation libs.mockito testImplementation libs.mockito
} }
test {
useJUnitPlatform()
}
task fastTests(type: Test) {
useJUnitPlatform {
excludeTags "slow"
}
}

View File

@ -96,14 +96,3 @@ dependencies {
testImplementation project(':code:processes:test-data') testImplementation project(':code:processes:test-data')
testImplementation project(':code:processes:crawling-process') testImplementation project(':code:processes:crawling-process')
} }
test {
maxHeapSize = "8G"
useJUnitPlatform()
}
task fastTests(type: Test) {
useJUnitPlatform {
excludeTags "slow"
}
}

View File

@ -62,12 +62,3 @@ dependencies {
testImplementation project(':code:processes:test-data') testImplementation project(':code:processes:test-data')
} }
test {
useJUnitPlatform()
}
task fastTests(type: Test) {
useJUnitPlatform {
excludeTags "slow"
}
}

View File

@ -43,12 +43,3 @@ dependencies {
testImplementation project(':code:processes:test-data') testImplementation project(':code:processes:test-data')
} }
test {
useJUnitPlatform()
}
task fastTests(type: Test) {
useJUnitPlatform {
excludeTags "slow"
}
}

View File

@ -58,12 +58,3 @@ dependencies {
testImplementation 'org.testcontainers:junit-jupiter:1.17.4' testImplementation 'org.testcontainers:junit-jupiter:1.17.4'
} }
test {
useJUnitPlatform()
}
task fastTests(type: Test) {
useJUnitPlatform {
excludeTags "slow"
}
}

View File

@ -54,14 +54,3 @@ dependencies {
} }
test {
useJUnitPlatform()
}
task fastTests(type: Test) {
useJUnitPlatform {
excludeTags "slow"
}
}

View File

@ -60,13 +60,4 @@ dependencies {
testImplementation 'org.testcontainers:junit-jupiter:1.17.4' testImplementation 'org.testcontainers:junit-jupiter:1.17.4'
} }
test {
useJUnitPlatform()
}
task fastTests(type: Test) {
useJUnitPlatform {
excludeTags "slow"
}
}

View File

@ -64,12 +64,3 @@ dependencies {
} }
test {
useJUnitPlatform()
}
task fastTests(type: Test) {
useJUnitPlatform {
excludeTags "slow"
}
}

View File

@ -64,15 +64,4 @@ dependencies {
testImplementation libs.mockito testImplementation libs.mockito
} }
test {
maxHeapSize = "8G"
useJUnitPlatform()
}
task fastTests(type: Test) {
maxHeapSize = "8G"
useJUnitPlatform {
excludeTags "slow"
}
}

View File

@ -51,13 +51,3 @@ dependencies {
testImplementation 'org.testcontainers:junit-jupiter:1.17.4' testImplementation 'org.testcontainers:junit-jupiter:1.17.4'
} }
test {
useJUnitPlatform()
}
task fastTests(type: Test) {
useJUnitPlatform {
excludeTags "slow"
}
}

View File

@ -51,14 +51,3 @@ dependencies {
} }
test {
useJUnitPlatform()
}
task fastTests(type: Test) {
useJUnitPlatform {
excludeTags "slow"
}
}

View File

@ -46,13 +46,3 @@ dependencies {
testImplementation libs.bundles.junit testImplementation libs.bundles.junit
testImplementation libs.mockito testImplementation libs.mockito
} }
test {
useJUnitPlatform()
}
task fastTests(type: Test) {
useJUnitPlatform {
excludeTags "slow"
}
}

View File

@ -53,13 +53,3 @@ dependencies {
testImplementation libs.mockito testImplementation libs.mockito
} }
test {
useJUnitPlatform()
}
task fastTests(type: Test) {
useJUnitPlatform {
excludeTags "slow"
}
}

View File

@ -19,13 +19,3 @@ dependencies {
implementation libs.notnull implementation libs.notnull
} }
test {
useJUnitPlatform()
}
task fastTests(type: Test) {
useJUnitPlatform {
excludeTags "slow"
}
}

View File

@ -37,12 +37,3 @@ dependencies {
} }
test {
useJUnitPlatform()
}
task fastTests(type: Test) {
useJUnitPlatform {
excludeTags "slow"
}
}

View File

@ -38,13 +38,3 @@ dependencies {
testImplementation libs.mockito testImplementation libs.mockito
} }
test {
useJUnitPlatform()
}
task fastTests(type: Test) {
useJUnitPlatform {
excludeTags "slow"
}
}

View File

@ -46,15 +46,4 @@ dependencies {
testImplementation libs.bundles.slf4j.test testImplementation libs.bundles.slf4j.test
testImplementation libs.bundles.junit testImplementation libs.bundles.junit
testImplementation libs.mockito testImplementation libs.mockito
} }
test {
useJUnitPlatform()
}
task fastTests(type: Test) {
useJUnitPlatform {
excludeTags "slow"
}
}

View File

@ -38,18 +38,4 @@ dependencies {
configurations { configurations {
e2eTestImplementation.extendsFrom(testImplementation) e2eTestImplementation.extendsFrom(testImplementation)
} }
test {
maxParallelForks = Runtime.runtime.availableProcessors().intdiv(2) ?: 1
maxHeapSize = "8G"
useJUnitPlatform()
}
task fastTests(type: Test) {
maxParallelForks = Runtime.runtime.availableProcessors().intdiv(2) ?: 1
maxHeapSize = "8G"
useJUnitPlatform {
excludeTags "slow"
}
}