parent
0dc63d7d3c
commit
85240a95ae
|
@ -12,43 +12,22 @@ import static datadog.trace.agent.test.utils.TraceUtils.runUnderTrace
|
||||||
|
|
||||||
@RetryOnFailure(times = 3, delaySeconds = 1)
|
@RetryOnFailure(times = 3, delaySeconds = 1)
|
||||||
class Elasticsearch53SpringRepositoryTest extends AgentTestRunner {
|
class Elasticsearch53SpringRepositoryTest extends AgentTestRunner {
|
||||||
static def repo
|
@Shared
|
||||||
|
ApplicationContext applicationContext = new AnnotationConfigApplicationContext(Config)
|
||||||
|
|
||||||
def createRepo() {
|
@Shared
|
||||||
def applicationContext
|
DocRepository repo = applicationContext.getBean(DocRepository)
|
||||||
def repo
|
|
||||||
|
|
||||||
runUnderTrace("createRepo") {
|
def setup() {
|
||||||
applicationContext = new AnnotationConfigApplicationContext(Config)
|
|
||||||
repo = applicationContext.getBean(DocRepository)
|
|
||||||
}
|
|
||||||
// NodeStatsAction
|
|
||||||
// IndicesExistAction
|
|
||||||
// IndexAction
|
|
||||||
// RefreshAction
|
|
||||||
TEST_WRITER.waitForTraces(1)
|
|
||||||
TEST_WRITER.clear()
|
TEST_WRITER.clear()
|
||||||
|
|
||||||
return repo
|
|
||||||
}
|
|
||||||
|
|
||||||
def setupRepo() {
|
|
||||||
if (repo == null) {
|
|
||||||
repo = createRepo()
|
|
||||||
}
|
|
||||||
|
|
||||||
runUnderTrace("delete") {
|
runUnderTrace("delete") {
|
||||||
repo.deleteAll()
|
repo.deleteAll()
|
||||||
}
|
}
|
||||||
TEST_WRITER.waitForTraces(1)
|
TEST_WRITER.waitForTraces(1)
|
||||||
TEST_WRITER.clear()
|
TEST_WRITER.clear()
|
||||||
|
|
||||||
return repo
|
|
||||||
}
|
}
|
||||||
|
|
||||||
def "test empty repo"() {
|
def "test empty repo"() {
|
||||||
def repo = setupRepo()
|
|
||||||
|
|
||||||
when:
|
when:
|
||||||
def result = repo.findAll()
|
def result = repo.findAll()
|
||||||
|
|
||||||
|
@ -83,8 +62,6 @@ class Elasticsearch53SpringRepositoryTest extends AgentTestRunner {
|
||||||
}
|
}
|
||||||
|
|
||||||
def "test CRUD"() {
|
def "test CRUD"() {
|
||||||
def repo = setupRepo()
|
|
||||||
|
|
||||||
when:
|
when:
|
||||||
def doc = new Doc()
|
def doc = new Doc()
|
||||||
|
|
||||||
|
|
|
@ -35,7 +35,6 @@ dependencies {
|
||||||
|
|
||||||
testCompile project(':dd-java-agent:instrumentation:apache-httpasyncclient-4')
|
testCompile project(':dd-java-agent:instrumentation:apache-httpasyncclient-4')
|
||||||
testCompile project(':dd-java-agent:instrumentation:netty-4.1')
|
testCompile project(':dd-java-agent:instrumentation:netty-4.1')
|
||||||
// testCompile project(':dd-java-agent:instrumentation:spring-data-1.9')
|
|
||||||
|
|
||||||
testCompile group: 'org.apache.logging.log4j', name: 'log4j-core', version: '2.11.0'
|
testCompile group: 'org.apache.logging.log4j', name: 'log4j-core', version: '2.11.0'
|
||||||
testCompile group: 'org.apache.logging.log4j', name: 'log4j-api', version: '2.11.0'
|
testCompile group: 'org.apache.logging.log4j', name: 'log4j-api', version: '2.11.0'
|
||||||
|
|
Loading…
Reference in New Issue