Fix DDInfoTest
This test was not marked as `Specification` and therefor was not run
during builds. Some time ago some code got moved around and this test
got broken - so fixing it.
MODIFY
dd-java-agent/agent-tooling/src/main/java/datadog/trace/agent/tooling/DDJavaAgentInfo.java
dd-java-agent/agent-tooling/src/main/java/datadog/trace/agent/tooling/DDJavaAgentInfo.java
@@ -10,9 +10,9 @@ public class DDJavaAgentInfo {
static {
String v;
try {
- Class<?> tracingAgentClass =
+ final Class<?> tracingAgentClass =
ClassLoader.getSystemClassLoader().loadClass("datadog.trace.agent.TracingAgent");
- Method getAgentVersionMethod = tracingAgentClass.getMethod("getAgentVersion");
+ final Method getAgentVersionMethod = tracingAgentClass.getMethod("getAgentVersion");
v = (String) getAgentVersionMethod.invoke(null);
} catch (final Exception e) {
log.error("failed to read agent version", e);

MODIFY
dd-java-agent/src/test/groovy/datadog/trace/agent/DDInfoTest.groovy
dd-java-agent/src/test/groovy/datadog/trace/agent/DDInfoTest.groovy
@@ -2,8 +2,9 @@ package datadog.trace.agent
import datadog.opentracing.DDTraceOTInfo
import datadog.trace.api.DDTraceApiInfo
+import spock.lang.Specification
-class DDInfoTest {
+class DDInfoTest extends Specification {
def "info accessible from api"() {
expect:
DDTraceApiInfo.VERSION == DDTraceOTInfo.VERSION

Fix DDInfoTest

This test was not marked as `Specification` and therefor was not run
during builds. Some time ago some code got moved around and this test
got broken - so fixing it.