Revert "Changing test set-up timing"

This reverts commit 0dc63d7d3c.
This commit is contained in:
dougqh 2019-10-01 16:16:52 -04:00
parent 0dc63d7d3c
commit 85240a95ae
2 changed files with 5 additions and 29 deletions

View File

@ -12,43 +12,22 @@ import static datadog.trace.agent.test.utils.TraceUtils.runUnderTrace
@RetryOnFailure(times = 3, delaySeconds = 1)
class Elasticsearch53SpringRepositoryTest extends AgentTestRunner {
static def repo
@Shared
ApplicationContext applicationContext = new AnnotationConfigApplicationContext(Config)
def createRepo() {
def applicationContext
def repo
@Shared
DocRepository repo = applicationContext.getBean(DocRepository)
runUnderTrace("createRepo") {
applicationContext = new AnnotationConfigApplicationContext(Config)
repo = applicationContext.getBean(DocRepository)
}
// NodeStatsAction
// IndicesExistAction
// IndexAction
// RefreshAction
TEST_WRITER.waitForTraces(1)
def setup() {
TEST_WRITER.clear()
return repo
}
def setupRepo() {
if (repo == null) {
repo = createRepo()
}
runUnderTrace("delete") {
repo.deleteAll()
}
TEST_WRITER.waitForTraces(1)
TEST_WRITER.clear()
return repo
}
def "test empty repo"() {
def repo = setupRepo()
when:
def result = repo.findAll()
@ -83,8 +62,6 @@ class Elasticsearch53SpringRepositoryTest extends AgentTestRunner {
}
def "test CRUD"() {
def repo = setupRepo()
when:
def doc = new Doc()

View File

@ -35,7 +35,6 @@ dependencies {
testCompile project(':dd-java-agent:instrumentation:apache-httpasyncclient-4')
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-api', version: '2.11.0'