File tree 2 files changed +8
-1
lines changed
instrumentation/elasticsearch/elasticsearch-transport-5.3/javaagent
src/test/groovy/springdata
2 files changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -59,6 +59,8 @@ dependencies {
59
59
}
60
60
61
61
tasks.withType<Test >().configureEach {
62
+ systemProperty(" testLatestDeps" , findProperty(" testLatestDeps" ) as Boolean )
63
+
62
64
// TODO run tests both with and without experimental span attributes
63
65
jvmArgs(" -Dotel.instrumentation.elasticsearch.experimental-span-attributes=true" )
64
66
Original file line number Diff line number Diff line change @@ -7,8 +7,10 @@ package springdata
7
7
8
8
import io.opentelemetry.instrumentation.test.AgentInstrumentationSpecification
9
9
import io.opentelemetry.semconv.SemanticAttributes
10
+ import org.junit.jupiter.api.Assumptions
10
11
import org.springframework.context.annotation.AnnotationConfigApplicationContext
11
12
import spock.lang.Shared
13
+ import spock.util.environment.Jvm
12
14
13
15
import java.lang.reflect.InvocationHandler
14
16
import java.lang.reflect.Method
@@ -48,7 +50,7 @@ class Elasticsearch53SpringRepositoryTest extends AgentInstrumentationSpecificat
48
50
}
49
51
50
52
void close () {
51
- applicationContext. close()
53
+ applicationContext? . close()
52
54
}
53
55
54
56
@Override
@@ -58,6 +60,9 @@ class Elasticsearch53SpringRepositoryTest extends AgentInstrumentationSpecificat
58
60
}
59
61
60
62
def setup () {
63
+ // when running on jdk 21 this test occasionally fails with timeout
64
+ Assumptions . assumeTrue(Boolean . getBoolean(" testLatestDeps" ) || ! Jvm . getCurrent(). isJava21Compatible())
65
+
61
66
repo. refresh()
62
67
clearExportedData()
63
68
runWithSpan(" delete" ) {
You can’t perform that action at this time.
0 commit comments