Merge pull request #973 from DataDog/landerson/all-tests-on-all-jvms
Run all tests on all java versions
This commit is contained in:
commit
983b4e2e6c
|
@ -2,12 +2,6 @@ plugins {
|
|||
id "com.github.johnrengelman.shadow" version "4.0.4"
|
||||
}
|
||||
|
||||
// Set properties before any plugins get loaded
|
||||
project.ext {
|
||||
// Execute tests on all JVMs, even rare and outdated ones
|
||||
integrationTests = true
|
||||
}
|
||||
|
||||
description = 'dd-java-agent'
|
||||
|
||||
apply from: "${rootDir}/gradle/java.gradle"
|
||||
|
|
|
@ -5,13 +5,6 @@
|
|||
* instrumentation isn't able to reference it.
|
||||
*/
|
||||
|
||||
// Set properties before any plugins get loaded
|
||||
project.ext {
|
||||
// Execute tests on all JVMs, even rare and outdated ones
|
||||
coreJavaInstrumentation = true
|
||||
minJavaVersionForTests = JavaVersion.VERSION_1_7
|
||||
}
|
||||
|
||||
muzzle {
|
||||
pass {
|
||||
group = "org.hibernate"
|
||||
|
|
|
@ -1,10 +1,3 @@
|
|||
// Set properties before any plugins get loaded
|
||||
project.ext {
|
||||
// Execute tests on all JVMs, even rare and outdated ones
|
||||
coreJavaInstrumentation = true
|
||||
minJavaVersionForTests = JavaVersion.VERSION_1_7
|
||||
}
|
||||
|
||||
muzzle {
|
||||
pass {
|
||||
group = "org.hibernate"
|
||||
|
|
|
@ -1,10 +1,3 @@
|
|||
// Set properties before any plugins get loaded
|
||||
project.ext {
|
||||
// Execute tests on all JVMs, even rare and outdated ones
|
||||
coreJavaInstrumentation = true
|
||||
minJavaVersionForTests = JavaVersion.VERSION_1_7
|
||||
}
|
||||
|
||||
muzzle {
|
||||
pass {
|
||||
group = "org.hibernate"
|
||||
|
|
|
@ -1,9 +1,3 @@
|
|||
// Set properties before any plugins get loaded
|
||||
project.ext {
|
||||
// Execute tests on all JVMs, even rare and outdated ones
|
||||
coreJavaInstrumentation = true
|
||||
}
|
||||
|
||||
apply from: "${rootDir}/gradle/java.gradle"
|
||||
|
||||
dependencies {
|
||||
|
|
|
@ -1,8 +1,6 @@
|
|||
// Set properties before any plugins get loaded
|
||||
ext {
|
||||
minJavaVersionForTests = JavaVersion.VERSION_1_8
|
||||
// Execute tests on all JVMs, even rare and outdated ones
|
||||
coreJavaInstrumentation = true
|
||||
}
|
||||
|
||||
apply from: "${rootDir}/gradle/java.gradle"
|
||||
|
|
|
@ -1,9 +1,3 @@
|
|||
// Set properties before any plugins get loaded
|
||||
ext {
|
||||
// Execute tests on all JVMs, even rare and outdated ones
|
||||
coreJavaInstrumentation = true
|
||||
}
|
||||
|
||||
apply from: "${rootDir}/gradle/java.gradle"
|
||||
apply from: "${rootDir}/gradle/test-with-scala.gradle"
|
||||
|
||||
|
|
|
@ -1,9 +1,3 @@
|
|||
// Set properties before any plugins get loaded
|
||||
project.ext {
|
||||
// Execute tests on all JVMs, even rare and outdated ones
|
||||
coreJavaInstrumentation = true
|
||||
}
|
||||
|
||||
apply from: "${rootDir}/gradle/java.gradle"
|
||||
apply from: "${rootDir}/gradle/test-with-scala.gradle"
|
||||
apply from: "${rootDir}/gradle/test-with-kotlin.gradle"
|
||||
|
|
|
@ -1,9 +1,3 @@
|
|||
// Set properties before any plugins get loaded
|
||||
project.ext {
|
||||
// Execute tests on all JVMs, even rare and outdated ones
|
||||
coreJavaInstrumentation = true
|
||||
}
|
||||
|
||||
apply from: "${rootDir}/gradle/java.gradle"
|
||||
apply from: "${rootDir}/gradle/test-with-scala.gradle"
|
||||
|
||||
|
|
|
@ -1,9 +1,3 @@
|
|||
// Set properties before any plugins get loaded
|
||||
project.ext {
|
||||
// Execute tests on all JVMs, even rare and outdated ones
|
||||
coreJavaInstrumentation = true
|
||||
}
|
||||
|
||||
apply from: "${rootDir}/gradle/java.gradle"
|
||||
|
||||
apply plugin: 'org.unbroken-dome.test-sets'
|
||||
|
|
|
@ -346,9 +346,9 @@ class SpanImplTest extends Specification {
|
|||
def "test JSON rendering with big ID values"() {
|
||||
setup: "create span"
|
||||
def parentContext = new SpanContextImpl(
|
||||
new BigInteger(2).pow(64).subtract(1).toString(),
|
||||
BigInteger.valueOf(2).pow(64).subtract(1).toString(),
|
||||
"123",
|
||||
new BigInteger(2).pow(64).subtract(2).toString())
|
||||
BigInteger.valueOf(2).pow(64).subtract(2).toString())
|
||||
def span = new SpanImpl(trace, parentContext, startTimestamp)
|
||||
span.finish()
|
||||
|
||||
|
|
|
@ -7,6 +7,7 @@ import datadog.trace.tracer.writer.AgentWriter
|
|||
import datadog.trace.tracer.writer.SampleRateByService
|
||||
import datadog.trace.tracer.writer.Writer
|
||||
import datadog.trace.util.gc.GCUtils
|
||||
import spock.lang.Requires
|
||||
import spock.lang.Shared
|
||||
import spock.lang.Specification
|
||||
|
||||
|
@ -14,6 +15,7 @@ import java.lang.ref.WeakReference
|
|||
import java.util.concurrent.TimeUnit
|
||||
import java.util.concurrent.atomic.AtomicInteger
|
||||
|
||||
@Requires({ !System.getProperty("java.vm.name").contains("IBM J9 VM") })
|
||||
class TracerTest extends Specification {
|
||||
|
||||
@Shared
|
||||
|
|
|
@ -255,22 +255,6 @@ def isJdkForced(String javaName) {
|
|||
return (project.hasProperty('forceJdk') && project.getProperty('forceJdk').contains(javaName))
|
||||
}
|
||||
|
||||
// JVM names we would like to run complete test suite on
|
||||
// Note: complete test suite is always run on JVM used for compilation
|
||||
// Note2: apparently there is no way to have a 'global' variable, so instead we have per project
|
||||
// attribute that has same value in all projects
|
||||
project.ext.majorSupportedJVMs = ["7", "11"]
|
||||
|
||||
def isTestingEnabled(String javaName) {
|
||||
if (javaName in project.majorSupportedJVMs) {
|
||||
return true
|
||||
}
|
||||
if (project.findProperty("coreJavaInstrumentation") || project.findProperty("integrationTests")) {
|
||||
return true
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
// Disable default test tasks if current JVM doesn't match version requirements
|
||||
tasks.withType(Test).configureEach {
|
||||
if (name.endsWith("Generated")) {
|
||||
|
@ -326,7 +310,7 @@ for (def env : System.getenv().entrySet()) {
|
|||
jvmArgs '-XX:CompileCommand=exclude,net.bytebuddy.description.type.TypeDescription$Generic$Visitor$Substitutor::onParameterizedType'
|
||||
}
|
||||
|
||||
onlyIf { (isJavaVersionAllowed(javaVersion) && isTestingEnabled(javaName)) || isJdkForced(javaName) }
|
||||
onlyIf { isJavaVersionAllowed(javaVersion) || isJdkForced(javaName) }
|
||||
if (applyCodeCoverage) {
|
||||
jacoco {
|
||||
// Disable jacoco for additional JVM tests to speed things up a bit
|
||||
|
|
Loading…
Reference in New Issue