blob: 5c141624221f672b2a2fa73e16ccf8afadcbc7af [file] [log] [blame]
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
apply plugin: 'jvm-test-suite'
apply plugin: 'jacoco'
testing {
suites {
integrationTest(JvmTestSuite) {
testType = TestSuiteType.INTEGRATION_TEST
useJUnitJupiter()
dependencies {
implementation project()
implementation libs.junit5.api
implementation libs.junit5.impl
implementation libs.junit5.params
implementation libs.junit.pioneer
implementation libs.mockito.core
implementation libs.mockito.junit
implementation libs.hamcrest.core
implementation libs.hamcrest.optional
implementation libs.hamcrest.path
implementation libs.jansi.core
implementation libs.log4j.api
implementation libs.log4j.core
implementation libs.log4j.bridge
implementation libs.slf4j.log4j
}
sources {
java {
srcDirs = ['src/integrationTest/java']
}
}
targets {
configureEach {
testTask.configure {
shouldRunAfter(test)
jvmArgs "-XX:+HeapDumpOnOutOfMemoryError", "-XX:MaxDirectMemorySize=256m", "-XX:MaxMetaspaceSize=2g"
maxHeapSize = '4g'
// Define default test timeouts to avoid everhanging tests.
systemProperty 'junit.jupiter.execution.timeout.testable.method.default', '10m'
systemProperty 'junit.jupiter.execution.timeout.lifecycle.method.default', '60s'
// Enable auto-detection of JUnit 5 extensions to automatically apply DumpThreadsOnTimeout extension.
systemProperty 'junit.jupiter.extensions.autodetection.enabled', true
systemProperty 'jraft.available_processors', 4
}
}
}
}
}
}
check {
dependsOn integrationTest
}
pmdIntegrationTest {
enabled = false
}
tasks.register('jacocoIntegrationTestReport', JacocoReport) {
dependsOn integrationTest
group = 'verification'
reports {
xml.required = false
html.required = true
}
}
spotbugsIntegrationTest {
enabled(false)
}