Try limiting latest to 5.1.x
MODIFY
dd-java-agent/instrumentation/elasticsearch/transport-5/src/test/groovy/Elasticsearch5NodeClientTest.groovy
dd-java-agent/instrumentation/elasticsearch/transport-5/src/test/groovy/Elasticsearch5NodeClientTest.groovy
@@ -11,14 +11,11 @@ import org.elasticsearch.index.IndexNotFoundException
import org.elasticsearch.node.Node
import org.elasticsearch.node.internal.InternalSettingsPreparer
import org.elasticsearch.transport.Netty3Plugin
-import spock.lang.Requires
import spock.lang.Shared
import static datadog.trace.agent.test.utils.TraceUtils.runUnderTrace
import static org.elasticsearch.cluster.ClusterName.CLUSTER_NAME_SETTING
-// Currently broken in CI:
-@Requires({ "false" == System.getenv("CI") })
@RetryOnFailure(times = 3, delaySeconds = 1)
class Elasticsearch5NodeClientTest extends AgentTestRunner {
public static final long TIMEOUT = 10000; // 10 seconds

MODIFY
dd-java-agent/instrumentation/elasticsearch/transport-5/src/test/groovy/Elasticsearch5TransportClientTest.groovy
dd-java-agent/instrumentation/elasticsearch/transport-5/src/test/groovy/Elasticsearch5TransportClientTest.groovy
@@ -15,14 +15,11 @@ import org.elasticsearch.node.internal.InternalSettingsPreparer
import org.elasticsearch.transport.Netty3Plugin
import org.elasticsearch.transport.RemoteTransportException
import org.elasticsearch.transport.client.PreBuiltTransportClient
-import spock.lang.Requires
import spock.lang.Shared
import static datadog.trace.agent.test.utils.TraceUtils.runUnderTrace
import static org.elasticsearch.cluster.ClusterName.CLUSTER_NAME_SETTING
-// Currently broken in CI:
-@Requires({ "false" == System.getenv("CI") })
@RetryOnFailure(times = 3, delaySeconds = 1)
class Elasticsearch5TransportClientTest extends AgentTestRunner {
public static final long TIMEOUT = 10000; // 10 seconds

MODIFY
dd-java-agent/instrumentation/elasticsearch/transport-5/transport-5.gradle
dd-java-agent/instrumentation/elasticsearch/transport-5/transport-5.gradle
@@ -51,6 +51,6 @@ dependencies {
testCompile group: 'org.elasticsearch.plugin', name: 'transport-netty3-client', version: '5.0.0'
testCompile group: 'org.elasticsearch.client', name: 'transport', version: '5.0.0'
- latestDepTestCompile group: 'org.elasticsearch.plugin', name: 'transport-netty3-client', version: '5.2.+'
- latestDepTestCompile group: 'org.elasticsearch.client', name: 'transport', version: '5.2.+'
+ latestDepTestCompile group: 'org.elasticsearch.plugin', name: 'transport-netty3-client', version: '5.1.+'
+ latestDepTestCompile group: 'org.elasticsearch.client', name: 'transport', version: '5.1.+'
}

Try limiting latest to 5.1.x