Skip to content

Commit 6b4f258

Browse files
authored
remove spock and groovy test utils (#15172)
1 parent 0d36ffc commit 6b4f258

File tree

40 files changed

+12
-1976
lines changed

40 files changed

+12
-1976
lines changed

.github/renovate.json5

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -93,13 +93,6 @@
9393
'com.fasterxml.jackson.core:**',
9494
],
9595
},
96-
{
97-
// prevent update to 2.4-groovy-4.0-SNAPSHOT
98-
allowedVersions: '!/\\-SNAPSHOT$/',
99-
matchPackageNames: [
100-
'org.spockframework:**',
101-
],
102-
},
10396
{
10497
// prevent 3.0.1u2 -> 3.0.1
10598
matchPackageNames: [

conventions/src/main/kotlin/otel.java-conventions.gradle.kts

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -187,24 +187,6 @@ testing {
187187
implementation("org.mockito:mockito-junit-jupiter")
188188

189189
implementation("org.objenesis:objenesis")
190-
implementation("org.spockframework:spock-core") {
191-
with(this as ExternalDependency) {
192-
// exclude optional dependencies
193-
exclude(group = "cglib", module = "cglib-nodep")
194-
exclude(group = "net.bytebuddy", module = "byte-buddy")
195-
exclude(group = "org.junit.platform", module = "junit-platform-testkit")
196-
exclude(group = "org.jetbrains", module = "annotations")
197-
exclude(group = "org.objenesis", module = "objenesis")
198-
exclude(group = "org.ow2.asm", module = "asm")
199-
}
200-
}
201-
implementation("org.spockframework:spock-junit4") {
202-
with(this as ExternalDependency) {
203-
// spock-core is already added as dependency
204-
// exclude it here to avoid pulling in optional dependencies
205-
exclude(group = "org.spockframework", module = "spock-core")
206-
}
207-
}
208190
implementation("ch.qos.logback:logback-classic")
209191
implementation("org.slf4j:log4j-over-slf4j")
210192
implementation("org.slf4j:jcl-over-slf4j")

conventions/src/main/kotlin/otel.scala-conventions.gradle.kts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
// Enable testing scala code in groovy spock tests.
2-
31
plugins {
42
scala
53
}

dependencyManagement/build.gradle.kts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,8 +81,6 @@ val CORE_DEPENDENCIES = listOf(
8181
// this top level to help consistently satisfy large numbers of transitive dependencies.
8282
val DEPENDENCIES = listOf(
8383
"org.junit.jupiter:junit-jupiter-api:5.14.0",
84-
"org.spockframework:spock-core:2.4-M6-groovy-4.0",
85-
"org.spockframework:spock-junit4:2.4-M6-groovy-4.0",
8684

8785
"io.r2dbc:r2dbc-proxy:1.1.6.RELEASE",
8886
"ch.qos.logback:logback-classic:1.3.16", // 1.4+ requires Java 11+

docs/contributing/writing-instrumentation.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,7 @@ a `testImplementation` dependency on the `testing` submodule. Then, create a tes
226226
the abstract test class from `testing`. You should implement the abstract `configure()` method to
227227
initialize the library using the exposed mechanism to register interceptors/listeners, perhaps a
228228
method like `registerInterceptor`. You can also wrap the object with the instrumentation decorator.
229-
Make sure that the test class is marked as a library instrumentation test. Both JUnit and Spock test
229+
Make sure that the test class is marked as a library instrumentation test. JUnit test
230230
utilities expose a way to specify whether you're running a library or javaagent test. If the tests
231231
pass, the library instrumentation is working.
232232

instrumentation/elasticsearch/elasticsearch-transport-5.3/javaagent/src/test/java/io/opentelemetry/javaagent/instrumentation/elasticsearch/transport/v5_3/springdata/Elasticsearch53SpringRepositoryTest.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@
3131
import org.junit.jupiter.api.extension.RegisterExtension;
3232
import org.junit.jupiter.api.io.TempDir;
3333
import org.springframework.context.annotation.AnnotationConfigApplicationContext;
34-
import spock.util.environment.Jvm;
3534

3635
@SuppressWarnings("deprecation") // using deprecated semconv
3736
@TestInstance(TestInstance.Lifecycle.PER_CLASS)
@@ -51,7 +50,7 @@ private static DocRepository repository() {
5150
// when running on jdk 21 this test occasionally fails with timeout
5251
Assumptions.assumeTrue(
5352
Boolean.getBoolean("testLatestDeps")
54-
|| !Jvm.getCurrent().isJava21Compatible()
53+
|| Double.parseDouble(System.getProperty("java.specification.version")) < 21
5554
|| Boolean.getBoolean("collectMetadata"));
5655

5756
DocRepository result =

instrumentation/elasticsearch/elasticsearch-transport-5.3/javaagent/src/test/java/io/opentelemetry/javaagent/instrumentation/elasticsearch/transport/v5_3/springdata/Elasticsearch53SpringTemplateTest.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,6 @@
6666
import org.springframework.data.elasticsearch.core.query.IndexQueryBuilder;
6767
import org.springframework.data.elasticsearch.core.query.NativeSearchQuery;
6868
import org.springframework.data.elasticsearch.core.query.NativeSearchQueryBuilder;
69-
import spock.util.environment.Jvm;
7069

7170
@SuppressWarnings("deprecation") // using deprecated semconv
7271
class Elasticsearch53SpringTemplateTest extends ElasticsearchSpringTest {
@@ -158,7 +157,7 @@ void prepareTest() {
158157
// when running on jdk 21 this test occasionally fails with timeout
159158
Assumptions.assumeTrue(
160159
Boolean.getBoolean("testLatestDeps")
161-
|| !Jvm.getCurrent().isJava21Compatible()
160+
|| Double.parseDouble(System.getProperty("java.specification.version")) < 21
162161
|| Boolean.getBoolean("collectMetadata"));
163162
}
164163

instrumentation/grails-3.0/javaagent/build.gradle.kts

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -38,13 +38,6 @@ dependencies {
3838
latestDepTestLibrary("org.springframework.boot:spring-boot-starter-tomcat:2.+") // related dependency
3939
}
4040

41-
// testing-common pulls in groovy 4 and spock as dependencies, exclude them
42-
configurations.configureEach {
43-
exclude("org.apache.groovy", "groovy")
44-
exclude("org.apache.groovy", "groovy-json")
45-
exclude("org.spockframework", "spock-core")
46-
}
47-
4841
val latestDepTest = findProperty("testLatestDeps") as Boolean
4942

5043
if (!latestDepTest) {

0 commit comments

Comments
 (0)