Speed up integ tests by reducing scope for annotation scan.
MODIFY
dd-java-agent-ittests/dd-java-agent-ittests.gradle
dd-java-agent-ittests/dd-java-agent-ittests.gradle
@@ -50,7 +50,7 @@ test {
}
if (project.hasProperty("disableShadowRelocate") && disableShadowRelocate) {
- exclude 'com/datadoghq/trace/agent/ShadowPackageRenamingTest.class'
+ exclude 'com/datadoghq/trace/agent/test/ShadowPackageRenamingTest.class'
}
}

RENAME
dd-java-agent-ittests/src/test/java/com/datadoghq/trace/agent/SayTracedHello.java
dd-java-agent-ittests/src/test/java/com/datadoghq/trace/agent/test/SayTracedHello.java
-package com.datadoghq.trace.agent;
+package com.datadoghq.trace.agent.test;
import com.datadoghq.trace.DDTags;
import com.datadoghq.trace.Trace;

RENAME
dd-java-agent-ittests/src/test/java/com/datadoghq/trace/agent/ShadowPackageRenamingTest.java
dd-java-agent-ittests/src/test/java/com/datadoghq/trace/agent/test/ShadowPackageRenamingTest.java
-package com.datadoghq.trace.agent;
+package com.datadoghq.trace.agent.test;
import com.google.common.collect.MapMaker;
import org.junit.Assert;

RENAME
dd-java-agent-ittests/src/test/java/com/datadoghq/trace/agent/TraceAnnotationsManagerTest.java
dd-java-agent-ittests/src/test/java/com/datadoghq/trace/agent/test/TraceAnnotationsManagerTest.java
-package com.datadoghq.trace.agent;
+package com.datadoghq.trace.agent.test;
import static org.assertj.core.api.Assertions.assertThat;

RENAME
dd-java-agent-ittests/src/test/java/com/datadoghq/trace/agent/integration/AWSInstrumentationTest.java
dd-java-agent-ittests/src/test/java/com/datadoghq/trace/agent/test/integration/AWSInstrumentationTest.java
-package com.datadoghq.trace.agent.integration;
+package com.datadoghq.trace.agent.test.integration;
import static org.assertj.core.api.Assertions.assertThat;

RENAME
dd-java-agent-ittests/src/test/java/com/datadoghq/trace/agent/integration/ApacheHTTPClientTest.java
dd-java-agent-ittests/src/test/java/com/datadoghq/trace/agent/test/integration/ApacheHTTPClientTest.java
-package com.datadoghq.trace.agent.integration;
+package com.datadoghq.trace.agent.test.integration;
import static org.assertj.core.api.Assertions.assertThat;

RENAME
dd-java-agent-ittests/src/test/java/com/datadoghq/trace/agent/integration/CassandraIntegrationTest.java
dd-java-agent-ittests/src/test/java/com/datadoghq/trace/agent/test/integration/CassandraIntegrationTest.java
-package com.datadoghq.trace.agent.integration;
+package com.datadoghq.trace.agent.test.integration;
import static org.assertj.core.api.Assertions.assertThat;

RENAME
dd-java-agent-ittests/src/test/java/com/datadoghq/trace/agent/integration/JMSInstrumentationTest.java
dd-java-agent-ittests/src/test/java/com/datadoghq/trace/agent/test/integration/JMSInstrumentationTest.java
-package com.datadoghq.trace.agent.integration;
+package com.datadoghq.trace.agent.test.integration;
import static org.assertj.core.api.Assertions.assertThat;

RENAME
dd-java-agent-ittests/src/test/java/com/datadoghq/trace/agent/integration/JettyServletInstrumentationTest.java
dd-java-agent-ittests/src/test/java/com/datadoghq/trace/agent/test/integration/JettyServletInstrumentationTest.java
-package com.datadoghq.trace.agent.integration;
+package com.datadoghq.trace.agent.test.integration;
import static org.assertj.core.api.Assertions.assertThat;

RENAME
dd-java-agent-ittests/src/test/java/com/datadoghq/trace/agent/integration/MongoClientInstrumentationTest.java
dd-java-agent-ittests/src/test/java/com/datadoghq/trace/agent/test/integration/MongoClientInstrumentationTest.java
-package com.datadoghq.trace.agent.integration;
+package com.datadoghq.trace.agent.test.integration;
import static org.assertj.core.api.Assertions.assertThat;

RENAME
dd-java-agent-ittests/src/test/java/com/datadoghq/trace/agent/integration/OkHTTPInstrumentationTest.java
dd-java-agent-ittests/src/test/java/com/datadoghq/trace/agent/test/integration/OkHTTPInstrumentationTest.java
-package com.datadoghq.trace.agent.integration;
+package com.datadoghq.trace.agent.test.integration;
import static org.assertj.core.api.Assertions.assertThat;

RENAME
dd-java-agent-ittests/src/test/java/com/datadoghq/trace/agent/integration/TomcatServletInstrumentationTest.java
dd-java-agent-ittests/src/test/java/com/datadoghq/trace/agent/test/integration/TomcatServletInstrumentationTest.java
-package com.datadoghq.trace.agent.integration;
+package com.datadoghq.trace.agent.test.integration;
import static org.assertj.core.api.Assertions.assertThat;

MODIFY
dd-java-agent-ittests/src/test/resources/dd-trace.yaml
dd-java-agent-ittests/src/test/resources/dd-trace.yaml
@@ -21,7 +21,7 @@ sampler:
# skipTagsPatterns: {"http.url": ".*/demo/add.*"}
# Enable custom annotation tracing over a selected set of packages
-enableCustomAnnotationTracingOver: ["com.datadoghq.trace.agent"]
+enableCustomAnnotationTracingOver: ["com.datadoghq.trace.agent.test"]
# Disable some instrumentations
# disabledInstrumentations: ["apache http", "mongo", "jetty", "tomcat", ...]

Speed up integ tests by reducing scope for annotation scan.