Add to ES tests.
MODIFY
dd-java-agent/instrumentation/elasticsearch-rest-5/src/latestDepTest/groovy/Elasticsearch6RestClientTest.groovy
dd-java-agent/instrumentation/elasticsearch-rest-5/src/latestDepTest/groovy/Elasticsearch6RestClientTest.groovy
+import com.anotherchrisberry.spock.extensions.retry.RetryOnFailure
import datadog.trace.agent.test.AgentTestRunner
import datadog.trace.agent.test.TestUtils
import datadog.trace.api.DDSpanTypes
@@ -19,6 +20,7 @@ import spock.lang.Shared
import static datadog.trace.agent.test.asserts.ListWriterAssert.assertTraces
+@RetryOnFailure
class Elasticsearch6RestClientTest extends AgentTestRunner {
@Shared
int httpPort

MODIFY
dd-java-agent/instrumentation/elasticsearch-rest-5/src/test/groovy/Elasticsearch5RestClientTest.groovy
dd-java-agent/instrumentation/elasticsearch-rest-5/src/test/groovy/Elasticsearch5RestClientTest.groovy
+import com.anotherchrisberry.spock.extensions.retry.RetryOnFailure
import datadog.trace.agent.test.AgentTestRunner
import datadog.trace.agent.test.TestUtils
import datadog.trace.api.DDSpanTypes
@@ -21,6 +22,7 @@ import spock.lang.Shared
import static datadog.trace.agent.test.asserts.ListWriterAssert.assertTraces
import static org.elasticsearch.cluster.ClusterName.CLUSTER_NAME_SETTING
+@RetryOnFailure
class Elasticsearch5RestClientTest extends AgentTestRunner {
@Shared
int httpPort

MODIFY
dd-java-agent/instrumentation/elasticsearch-transport-2/src/test/groovy/Elasticsearch2NodeClientTest.groovy
dd-java-agent/instrumentation/elasticsearch-transport-2/src/test/groovy/Elasticsearch2NodeClientTest.groovy
+import com.anotherchrisberry.spock.extensions.retry.RetryOnFailure
import datadog.trace.agent.test.AgentTestRunner
import datadog.trace.agent.test.TestUtils
import datadog.trace.api.DDSpanTypes
@@ -14,6 +15,7 @@ import spock.lang.Shared
import static datadog.trace.agent.test.TestUtils.runUnderTrace
import static datadog.trace.agent.test.asserts.ListWriterAssert.assertTraces
+@RetryOnFailure
class Elasticsearch2NodeClientTest extends AgentTestRunner {
public static final long TIMEOUT = 10000; // 10 seconds

MODIFY
dd-java-agent/instrumentation/elasticsearch-transport-2/src/test/groovy/Elasticsearch2TransportClientTest.groovy
dd-java-agent/instrumentation/elasticsearch-transport-2/src/test/groovy/Elasticsearch2TransportClientTest.groovy
+import com.anotherchrisberry.spock.extensions.retry.RetryOnFailure
import datadog.trace.agent.test.AgentTestRunner
import datadog.trace.agent.test.TestUtils
import datadog.trace.api.DDSpanTypes
@@ -17,6 +18,7 @@ import spock.lang.Shared
import static datadog.trace.agent.test.TestUtils.runUnderTrace
import static datadog.trace.agent.test.asserts.ListWriterAssert.assertTraces
+@RetryOnFailure
class Elasticsearch2TransportClientTest extends AgentTestRunner {
public static final long TIMEOUT = 10000; // 10 seconds

MODIFY
dd-java-agent/instrumentation/elasticsearch-transport-2/src/test/groovy/springdata/Elasticsearch2SpringRepositoryTest.groovy
dd-java-agent/instrumentation/elasticsearch-transport-2/src/test/groovy/springdata/Elasticsearch2SpringRepositoryTest.groovy
package springdata
+import com.anotherchrisberry.spock.extensions.retry.RetryOnFailure
import datadog.trace.agent.test.AgentTestRunner
import datadog.trace.api.DDSpanTypes
import datadog.trace.api.DDTags
@@ -10,6 +11,7 @@ import spock.lang.Shared
import static datadog.trace.agent.test.asserts.ListWriterAssert.assertTraces
+@RetryOnFailure
class Elasticsearch2SpringRepositoryTest extends AgentTestRunner {
@Shared
ApplicationContext applicationContext = new AnnotationConfigApplicationContext(Config)

MODIFY
dd-java-agent/instrumentation/elasticsearch-transport-2/src/test/groovy/springdata/Elasticsearch2SpringTemplateTest.groovy
dd-java-agent/instrumentation/elasticsearch-transport-2/src/test/groovy/springdata/Elasticsearch2SpringTemplateTest.groovy
package springdata
+import com.anotherchrisberry.spock.extensions.retry.RetryOnFailure
import datadog.trace.agent.test.AgentTestRunner
import datadog.trace.agent.test.TestUtils
import datadog.trace.api.DDSpanTypes
@@ -24,6 +25,7 @@ import java.util.concurrent.atomic.AtomicLong
import static datadog.trace.agent.test.asserts.ListWriterAssert.assertTraces
+@RetryOnFailure
class Elasticsearch2SpringTemplateTest extends AgentTestRunner {
public static final long TIMEOUT = 10000; // 10 seconds

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
+import com.anotherchrisberry.spock.extensions.retry.RetryOnFailure
import datadog.trace.agent.test.AgentTestRunner
import datadog.trace.agent.test.TestUtils
import datadog.trace.api.DDSpanTypes
@@ -17,6 +18,7 @@ import static datadog.trace.agent.test.TestUtils.runUnderTrace
import static datadog.trace.agent.test.asserts.ListWriterAssert.assertTraces
import static org.elasticsearch.cluster.ClusterName.CLUSTER_NAME_SETTING
+@RetryOnFailure
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
+import com.anotherchrisberry.spock.extensions.retry.RetryOnFailure
import datadog.trace.agent.test.AgentTestRunner
import datadog.trace.agent.test.TestUtils
import datadog.trace.api.DDSpanTypes
@@ -21,6 +22,7 @@ import static datadog.trace.agent.test.TestUtils.runUnderTrace
import static datadog.trace.agent.test.asserts.ListWriterAssert.assertTraces
import static org.elasticsearch.cluster.ClusterName.CLUSTER_NAME_SETTING
+@RetryOnFailure
class Elasticsearch5TransportClientTest extends AgentTestRunner {
public static final long TIMEOUT = 10000; // 10 seconds

MODIFY
dd-java-agent/instrumentation/elasticsearch-transport-6/src/test/groovy/Elasticsearch6NodeClientTest.groovy
dd-java-agent/instrumentation/elasticsearch-transport-6/src/test/groovy/Elasticsearch6NodeClientTest.groovy
+import com.anotherchrisberry.spock.extensions.retry.RetryOnFailure
import datadog.trace.agent.test.AgentTestRunner
import datadog.trace.agent.test.TestUtils
import datadog.trace.api.DDSpanTypes
@@ -16,6 +17,7 @@ import static datadog.trace.agent.test.TestUtils.runUnderTrace
import static datadog.trace.agent.test.asserts.ListWriterAssert.assertTraces
import static org.elasticsearch.cluster.ClusterName.CLUSTER_NAME_SETTING
+@RetryOnFailure
class Elasticsearch6NodeClientTest extends AgentTestRunner {
public static final long TIMEOUT = 10000; // 10 seconds

MODIFY
dd-java-agent/instrumentation/elasticsearch-transport-6/src/test/groovy/Elasticsearch6TransportClientTest.groovy
dd-java-agent/instrumentation/elasticsearch-transport-6/src/test/groovy/Elasticsearch6TransportClientTest.groovy
+import com.anotherchrisberry.spock.extensions.retry.RetryOnFailure
import datadog.trace.agent.test.AgentTestRunner
import datadog.trace.agent.test.TestUtils
import datadog.trace.api.DDSpanTypes
@@ -20,6 +21,7 @@ import static datadog.trace.agent.test.TestUtils.runUnderTrace
import static datadog.trace.agent.test.asserts.ListWriterAssert.assertTraces
import static org.elasticsearch.cluster.ClusterName.CLUSTER_NAME_SETTING
+@RetryOnFailure
class Elasticsearch6TransportClientTest extends AgentTestRunner {
public static final long TIMEOUT = 10000; // 10 seconds

MODIFY
gradle/java.gradle
gradle/java.gradle
@@ -69,6 +69,8 @@ dependencies {
testCompile deps.testLogging
testCompile 'info.solidsoft.spock:spock-global-unroll:0.5.1'
testCompile group: 'com.github.stefanbirkner', name: 'system-rules', version: '1.17.1'
+
+ testCompile group: 'com.anotherchrisberry', name: 'spock-retry', version: '0.6.4'
}
tasks.withType(Javadoc) {

Add @RetryOnFailure to ES tests.