From 2852a6a97a68c28536c295f7d04fb1a736113cd7 Mon Sep 17 00:00:00 2001 From: Nikolay Martynov Date: Wed, 21 Nov 2018 16:03:19 -0500 Subject: [PATCH 1/2] Fix setup so springweb tests produce appropriate logs --- .../spring-web/spring-web.gradle | 2 +- .../spring-web/src/test/resources/logback.xml | 18 ++++++++++++++++++ 2 files changed, 19 insertions(+), 1 deletion(-) create mode 100644 dd-java-agent/instrumentation/spring-web/src/test/resources/logback.xml diff --git a/dd-java-agent/instrumentation/spring-web/spring-web.gradle b/dd-java-agent/instrumentation/spring-web/spring-web.gradle index 7da0219f3c..e349442954 100644 --- a/dd-java-agent/instrumentation/spring-web/spring-web.gradle +++ b/dd-java-agent/instrumentation/spring-web/spring-web.gradle @@ -32,7 +32,7 @@ dependencies { testCompile group: 'javax.validation', name: 'validation-api', version: '1.1.0.Final' testCompile group: 'org.hibernate', name: 'hibernate-validator', version: '5.4.2.Final' - testCompile group: 'org.spockframework', name: 'spock-spring', version: '1.1-groovy-2.4' + testCompile group: 'org.spockframework', name: 'spock-spring', version: "$versions.spock" testCompile group: 'org.springframework.boot', name: 'spring-boot-starter-test', version: '1.5.17.RELEASE' testCompile group: 'org.springframework.boot', name: 'spring-boot-starter-web', version: '1.5.17.RELEASE' diff --git a/dd-java-agent/instrumentation/spring-web/src/test/resources/logback.xml b/dd-java-agent/instrumentation/spring-web/src/test/resources/logback.xml new file mode 100644 index 0000000000..eeb933ffad --- /dev/null +++ b/dd-java-agent/instrumentation/spring-web/src/test/resources/logback.xml @@ -0,0 +1,18 @@ + + + + + + + %d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n + + + + + + + + + + + From fdffee8f5cad803c898d95dbb7613c071253308b Mon Sep 17 00:00:00 2001 From: Nikolay Martynov Date: Wed, 21 Nov 2018 16:25:34 -0500 Subject: [PATCH 2/2] Fix Hysrix test to not poll queue and return null Instead wait for value to appear --- .../hystrix-1.4/src/test/groovy/HystrixTest.groovy | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dd-java-agent/instrumentation/hystrix-1.4/src/test/groovy/HystrixTest.groovy b/dd-java-agent/instrumentation/hystrix-1.4/src/test/groovy/HystrixTest.groovy index e919475ca9..0ed7809d62 100644 --- a/dd-java-agent/instrumentation/hystrix-1.4/src/test/groovy/HystrixTest.groovy +++ b/dd-java-agent/instrumentation/hystrix-1.4/src/test/groovy/HystrixTest.groovy @@ -86,7 +86,7 @@ class HystrixTest extends AgentTestRunner { cmd.observe().subscribe { next -> queue.put(next) } - queue.poll() + queue.take() } }