Disable flaky test (#10360)
This commit is contained in:
parent
f52a3b404a
commit
7bc2b7ba90
|
@ -59,6 +59,8 @@ dependencies {
|
|||
}
|
||||
|
||||
tasks.withType<Test>().configureEach {
|
||||
systemProperty("testLatestDeps", findProperty("testLatestDeps") as Boolean)
|
||||
|
||||
// TODO run tests both with and without experimental span attributes
|
||||
jvmArgs("-Dotel.instrumentation.elasticsearch.experimental-span-attributes=true")
|
||||
|
||||
|
|
|
@ -7,8 +7,10 @@ package springdata
|
|||
|
||||
import io.opentelemetry.instrumentation.test.AgentInstrumentationSpecification
|
||||
import io.opentelemetry.semconv.SemanticAttributes
|
||||
import org.junit.jupiter.api.Assumptions
|
||||
import org.springframework.context.annotation.AnnotationConfigApplicationContext
|
||||
import spock.lang.Shared
|
||||
import spock.util.environment.Jvm
|
||||
|
||||
import java.lang.reflect.InvocationHandler
|
||||
import java.lang.reflect.Method
|
||||
|
@ -48,7 +50,7 @@ class Elasticsearch53SpringRepositoryTest extends AgentInstrumentationSpecificat
|
|||
}
|
||||
|
||||
void close() {
|
||||
applicationContext.close()
|
||||
applicationContext?.close()
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -58,6 +60,9 @@ class Elasticsearch53SpringRepositoryTest extends AgentInstrumentationSpecificat
|
|||
}
|
||||
|
||||
def setup() {
|
||||
// when running on jdk 21 this test occasionally fails with timeout
|
||||
Assumptions.assumeTrue(Boolean.getBoolean("testLatestDeps") || !Jvm.getCurrent().isJava21Compatible())
|
||||
|
||||
repo.refresh()
|
||||
clearExportedData()
|
||||
runWithSpan("delete") {
|
||||
|
|
Loading…
Reference in New Issue