Remove retry from some tests
Index creation fails the next time around.
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
@@ -15,7 +15,6 @@ 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
@@ -63,6 +62,7 @@ class Elasticsearch2NodeClientTest extends AgentTestRunner {
}
}
+ @RetryOnFailure
def "test elasticsearch status"() {
setup:
def result = client.admin().cluster().health(new ClusterHealthRequest(new String[0]))
@@ -92,6 +92,7 @@ class Elasticsearch2NodeClientTest extends AgentTestRunner {
}
}
+ @RetryOnFailure
def "test elasticsearch error"() {
when:
client.prepareGet(indexName, indexType, id).get()

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
@@ -18,7 +18,6 @@ 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
@@ -74,6 +73,7 @@ class Elasticsearch2TransportClientTest extends AgentTestRunner {
}
}
+ @RetryOnFailure
def "test elasticsearch status"() {
setup:
def result = client.admin().cluster().health(new ClusterHealthRequest(new String[0]))
@@ -106,6 +106,7 @@ class Elasticsearch2TransportClientTest extends AgentTestRunner {
}
}
+ @RetryOnFailure
def "test elasticsearch error"() {
when:
client.prepareGet(indexName, indexType, id).get()

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
@@ -25,7 +25,6 @@ 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
@@ -70,6 +69,7 @@ class Elasticsearch2SpringTemplateTest extends AgentTestRunner {
}
}
+ @RetryOnFailure
def "test elasticsearch error"() {
when:
template.refresh(indexName)

MODIFY
dd-java-agent/instrumentation/elasticsearch-transport-5.3/src/test/groovy/Elasticsearch53NodeClientTest.groovy
dd-java-agent/instrumentation/elasticsearch-transport-5.3/src/test/groovy/Elasticsearch53NodeClientTest.groovy
@@ -9,8 +9,8 @@ import org.elasticsearch.common.io.FileSystemUtils
import org.elasticsearch.common.settings.Settings
import org.elasticsearch.env.Environment
import org.elasticsearch.index.IndexNotFoundException
-import org.elasticsearch.node.Node
import org.elasticsearch.node.InternalSettingsPreparer
+import org.elasticsearch.node.Node
import org.elasticsearch.transport.Netty3Plugin
import spock.lang.Shared
@@ -18,7 +18,6 @@ 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 Elasticsearch53NodeClientTest extends AgentTestRunner {
public static final long TIMEOUT = 10000; // 10 seconds
@@ -69,6 +68,7 @@ class Elasticsearch53NodeClientTest extends AgentTestRunner {
}
}
+ @RetryOnFailure
def "test elasticsearch status"() {
setup:
def result = client.admin().cluster().health(new ClusterHealthRequest())
@@ -98,6 +98,7 @@ class Elasticsearch53NodeClientTest extends AgentTestRunner {
}
}
+ @RetryOnFailure
def "test elasticsearch error"() {
when:
client.prepareGet(indexName, indexType, id).get()

MODIFY
dd-java-agent/instrumentation/elasticsearch-transport-5.3/src/test/groovy/Elasticsearch53TransportClientTest.groovy
dd-java-agent/instrumentation/elasticsearch-transport-5.3/src/test/groovy/Elasticsearch53TransportClientTest.groovy
@@ -11,8 +11,8 @@ import org.elasticsearch.common.settings.Settings
import org.elasticsearch.common.transport.InetSocketTransportAddress
import org.elasticsearch.env.Environment
import org.elasticsearch.index.IndexNotFoundException
-import org.elasticsearch.node.Node
import org.elasticsearch.node.InternalSettingsPreparer
+import org.elasticsearch.node.Node
import org.elasticsearch.transport.Netty3Plugin
import org.elasticsearch.transport.RemoteTransportException
import org.elasticsearch.transport.client.PreBuiltTransportClient
@@ -22,7 +22,6 @@ 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 Elasticsearch53TransportClientTest extends AgentTestRunner {
public static final long TIMEOUT = 10000; // 10 seconds
@@ -113,6 +112,7 @@ class Elasticsearch53TransportClientTest extends AgentTestRunner {
}
}
+ @RetryOnFailure
def "test elasticsearch error"() {
when:
client.prepareGet(indexName, indexType, id).get()

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
@@ -18,7 +18,6 @@ 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
@@ -69,6 +68,7 @@ class Elasticsearch5NodeClientTest extends AgentTestRunner {
}
}
+ @RetryOnFailure
def "test elasticsearch status"() {
setup:
def result = client.admin().cluster().health(new ClusterHealthRequest())
@@ -98,6 +98,7 @@ class Elasticsearch5NodeClientTest extends AgentTestRunner {
}
}
+ @RetryOnFailure
def "test elasticsearch error"() {
when:
client.prepareGet(indexName, indexType, id).get()

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
@@ -22,7 +22,6 @@ 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
@@ -81,6 +80,7 @@ class Elasticsearch5TransportClientTest extends AgentTestRunner {
}
}
+ @RetryOnFailure
def "test elasticsearch status"() {
setup:
def result = client.admin().cluster().health(new ClusterHealthRequest())
@@ -113,6 +113,7 @@ class Elasticsearch5TransportClientTest extends AgentTestRunner {
}
}
+ @RetryOnFailure
def "test elasticsearch error"() {
when:
client.prepareGet(indexName, indexType, id).get()

Remove retry from some tests

Index creation fails the next time around.