Clean up akkahttp-server/lagom tests
MODIFY
dd-java-agent/instrumentation/akka-http-10.0/src/lagomTest/groovy/LagomTest.groovy
dd-java-agent/instrumentation/akka-http-10.0/src/lagomTest/groovy/LagomTest.groovy
@@ -2,7 +2,6 @@ import akka.NotUsed
import akka.stream.javadsl.Source
import akka.stream.testkit.javadsl.TestSink
import net.bytebuddy.utility.JavaModule
-import org.junit.After
import static java.util.concurrent.TimeUnit.SECONDS
import datadog.trace.agent.test.AgentTestRunner
@@ -34,9 +33,8 @@ class LagomTest extends AgentTestRunner {
// Looks like a compiler/packaging issue on akka's end. Or maybe this interface is dynamically generated.
return false
- } else {
- return super.onInstrumentationError(typeName, classLoader, module, loaded, throwable)
}
+ return super.onInstrumentationError(typeName, classLoader, module, loaded, throwable)
}
def setupSpec() {
@@ -94,6 +92,7 @@ class LagomTest extends AgentTestRunner {
}
span(1) {
childOf span(0)
+ operationName 'EchoServiceImpl.tracedMethod'
}
}
}

MODIFY
dd-java-agent/instrumentation/akka-http-10.0/src/test/groovy/AkkaHttpInstrumentationTest.groovy
dd-java-agent/instrumentation/akka-http-10.0/src/test/groovy/AkkaHttpInstrumentationTest.groovy
@@ -103,7 +103,7 @@ class AkkaHttpInstrumentationTest extends AgentTestRunner {
"error" true
"error.type" RuntimeException.name
"error.msg" errorMessage
- "error.stack" tag("error.stack")
+ "error.stack" String
}
}
}

MODIFY
dd-java-agent/instrumentation/play-2.4/src/latestDepTest/groovy/Play26Test.groovy
dd-java-agent/instrumentation/play-2.4/src/latestDepTest/groovy/Play26Test.groovy
@@ -177,7 +177,7 @@ class Play26Test extends AgentTestRunner {
"error" true
"error.msg" "oh no"
"error.type" RuntimeException.getName()
- "error.stack" tag("error.stack")
+ "error.stack" String
}
}
}

MODIFY
dd-java-agent/testing/src/main/groovy/datadog/trace/agent/test/TagsAssert.groovy
dd-java-agent/testing/src/main/groovy/datadog/trace/agent/test/TagsAssert.groovy
@@ -61,8 +61,4 @@ class TagsAssert {
void assertTagsAllVerified() {
assert tags.keySet() == assertedTags
}
-
- Object tag(String tagName) {
- return tags[tagName]
- }
}

Clean up akkahttp-server/lagom tests