Add additional retries for ES tests.
This commit is contained in:
parent
e74c83ef03
commit
be205010c1
|
@ -18,7 +18,7 @@ import org.elasticsearch.node.Node
|
||||||
import org.elasticsearch.transport.Netty4Plugin
|
import org.elasticsearch.transport.Netty4Plugin
|
||||||
import spock.lang.Shared
|
import spock.lang.Shared
|
||||||
|
|
||||||
@RetryOnFailure
|
@RetryOnFailure(times = 3, delaySeconds = 1)
|
||||||
class Elasticsearch6RestClientTest extends AgentTestRunner {
|
class Elasticsearch6RestClientTest extends AgentTestRunner {
|
||||||
@Shared
|
@Shared
|
||||||
int httpPort
|
int httpPort
|
||||||
|
|
|
@ -21,7 +21,7 @@ import spock.lang.Shared
|
||||||
|
|
||||||
import static org.elasticsearch.cluster.ClusterName.CLUSTER_NAME_SETTING
|
import static org.elasticsearch.cluster.ClusterName.CLUSTER_NAME_SETTING
|
||||||
|
|
||||||
@RetryOnFailure
|
@RetryOnFailure(times = 3, delaySeconds = 1)
|
||||||
class Elasticsearch5RestClientTest extends AgentTestRunner {
|
class Elasticsearch5RestClientTest extends AgentTestRunner {
|
||||||
@Shared
|
@Shared
|
||||||
int httpPort
|
int httpPort
|
||||||
|
|
|
@ -14,7 +14,7 @@ import spock.lang.Shared
|
||||||
|
|
||||||
import static datadog.trace.agent.test.TestUtils.runUnderTrace
|
import static datadog.trace.agent.test.TestUtils.runUnderTrace
|
||||||
|
|
||||||
@RetryOnFailure
|
@RetryOnFailure(times = 3, delaySeconds = 1)
|
||||||
class Elasticsearch2NodeClientTest extends AgentTestRunner {
|
class Elasticsearch2NodeClientTest extends AgentTestRunner {
|
||||||
public static final long TIMEOUT = 10000; // 10 seconds
|
public static final long TIMEOUT = 10000; // 10 seconds
|
||||||
|
|
||||||
|
|
|
@ -17,7 +17,7 @@ import spock.lang.Shared
|
||||||
|
|
||||||
import static datadog.trace.agent.test.TestUtils.runUnderTrace
|
import static datadog.trace.agent.test.TestUtils.runUnderTrace
|
||||||
|
|
||||||
@RetryOnFailure
|
@RetryOnFailure(times = 3, delaySeconds = 1)
|
||||||
class Elasticsearch2TransportClientTest extends AgentTestRunner {
|
class Elasticsearch2TransportClientTest extends AgentTestRunner {
|
||||||
public static final long TIMEOUT = 10000; // 10 seconds
|
public static final long TIMEOUT = 10000; // 10 seconds
|
||||||
|
|
||||||
|
|
|
@ -11,7 +11,7 @@ import spock.lang.Shared
|
||||||
|
|
||||||
import static datadog.trace.agent.test.TestUtils.runUnderTrace
|
import static datadog.trace.agent.test.TestUtils.runUnderTrace
|
||||||
|
|
||||||
@RetryOnFailure
|
@RetryOnFailure(times = 3, delaySeconds = 1)
|
||||||
class Elasticsearch2SpringRepositoryTest extends AgentTestRunner {
|
class Elasticsearch2SpringRepositoryTest extends AgentTestRunner {
|
||||||
@Shared
|
@Shared
|
||||||
ApplicationContext applicationContext = new AnnotationConfigApplicationContext(Config)
|
ApplicationContext applicationContext = new AnnotationConfigApplicationContext(Config)
|
||||||
|
|
|
@ -23,7 +23,7 @@ import spock.lang.Shared
|
||||||
|
|
||||||
import java.util.concurrent.atomic.AtomicLong
|
import java.util.concurrent.atomic.AtomicLong
|
||||||
|
|
||||||
@RetryOnFailure
|
@RetryOnFailure(times = 3, delaySeconds = 1)
|
||||||
class Elasticsearch2SpringTemplateTest extends AgentTestRunner {
|
class Elasticsearch2SpringTemplateTest extends AgentTestRunner {
|
||||||
public static final long TIMEOUT = 10000; // 10 seconds
|
public static final long TIMEOUT = 10000; // 10 seconds
|
||||||
|
|
||||||
|
@ -68,7 +68,6 @@ class Elasticsearch2SpringTemplateTest extends AgentTestRunner {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@RetryOnFailure
|
|
||||||
def "test elasticsearch error"() {
|
def "test elasticsearch error"() {
|
||||||
when:
|
when:
|
||||||
template.refresh(indexName)
|
template.refresh(indexName)
|
||||||
|
|
|
@ -14,7 +14,7 @@ import spock.lang.Shared
|
||||||
|
|
||||||
import static datadog.trace.agent.test.TestUtils.runUnderTrace
|
import static datadog.trace.agent.test.TestUtils.runUnderTrace
|
||||||
|
|
||||||
@RetryOnFailure
|
@RetryOnFailure(times = 3, delaySeconds = 1)
|
||||||
class Elasticsearch2NodeClientTest extends AgentTestRunner {
|
class Elasticsearch2NodeClientTest extends AgentTestRunner {
|
||||||
public static final long TIMEOUT = 10000; // 10 seconds
|
public static final long TIMEOUT = 10000; // 10 seconds
|
||||||
|
|
||||||
|
|
|
@ -17,7 +17,7 @@ import spock.lang.Shared
|
||||||
|
|
||||||
import static datadog.trace.agent.test.TestUtils.runUnderTrace
|
import static datadog.trace.agent.test.TestUtils.runUnderTrace
|
||||||
|
|
||||||
@RetryOnFailure
|
@RetryOnFailure(times = 3, delaySeconds = 1)
|
||||||
class Elasticsearch2TransportClientTest extends AgentTestRunner {
|
class Elasticsearch2TransportClientTest extends AgentTestRunner {
|
||||||
public static final long TIMEOUT = 10000; // 10 seconds
|
public static final long TIMEOUT = 10000; // 10 seconds
|
||||||
|
|
||||||
|
|
|
@ -11,7 +11,7 @@ import spock.lang.Shared
|
||||||
|
|
||||||
import static datadog.trace.agent.test.TestUtils.runUnderTrace
|
import static datadog.trace.agent.test.TestUtils.runUnderTrace
|
||||||
|
|
||||||
@RetryOnFailure
|
@RetryOnFailure(times = 3, delaySeconds = 1)
|
||||||
class Elasticsearch2SpringRepositoryTest extends AgentTestRunner {
|
class Elasticsearch2SpringRepositoryTest extends AgentTestRunner {
|
||||||
@Shared
|
@Shared
|
||||||
ApplicationContext applicationContext = new AnnotationConfigApplicationContext(Config)
|
ApplicationContext applicationContext = new AnnotationConfigApplicationContext(Config)
|
||||||
|
|
|
@ -23,7 +23,7 @@ import spock.lang.Shared
|
||||||
|
|
||||||
import java.util.concurrent.atomic.AtomicLong
|
import java.util.concurrent.atomic.AtomicLong
|
||||||
|
|
||||||
@RetryOnFailure
|
@RetryOnFailure(times = 3, delaySeconds = 1)
|
||||||
class Elasticsearch2SpringTemplateTest extends AgentTestRunner {
|
class Elasticsearch2SpringTemplateTest extends AgentTestRunner {
|
||||||
public static final long TIMEOUT = 10000; // 10 seconds
|
public static final long TIMEOUT = 10000; // 10 seconds
|
||||||
|
|
||||||
|
@ -68,7 +68,6 @@ class Elasticsearch2SpringTemplateTest extends AgentTestRunner {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@RetryOnFailure
|
|
||||||
def "test elasticsearch error"() {
|
def "test elasticsearch error"() {
|
||||||
when:
|
when:
|
||||||
template.refresh(indexName)
|
template.refresh(indexName)
|
||||||
|
|
|
@ -17,7 +17,7 @@ import spock.lang.Shared
|
||||||
import static datadog.trace.agent.test.TestUtils.runUnderTrace
|
import static datadog.trace.agent.test.TestUtils.runUnderTrace
|
||||||
import static org.elasticsearch.cluster.ClusterName.CLUSTER_NAME_SETTING
|
import static org.elasticsearch.cluster.ClusterName.CLUSTER_NAME_SETTING
|
||||||
|
|
||||||
@RetryOnFailure
|
@RetryOnFailure(times = 3, delaySeconds = 1)
|
||||||
class Elasticsearch53NodeClientTest extends AgentTestRunner {
|
class Elasticsearch53NodeClientTest extends AgentTestRunner {
|
||||||
public static final long TIMEOUT = 10000; // 10 seconds
|
public static final long TIMEOUT = 10000; // 10 seconds
|
||||||
|
|
||||||
|
|
|
@ -21,7 +21,7 @@ import spock.lang.Shared
|
||||||
import static datadog.trace.agent.test.TestUtils.runUnderTrace
|
import static datadog.trace.agent.test.TestUtils.runUnderTrace
|
||||||
import static org.elasticsearch.cluster.ClusterName.CLUSTER_NAME_SETTING
|
import static org.elasticsearch.cluster.ClusterName.CLUSTER_NAME_SETTING
|
||||||
|
|
||||||
@RetryOnFailure
|
@RetryOnFailure(times = 3, delaySeconds = 1)
|
||||||
class Elasticsearch53TransportClientTest extends AgentTestRunner {
|
class Elasticsearch53TransportClientTest extends AgentTestRunner {
|
||||||
public static final long TIMEOUT = 10000; // 10 seconds
|
public static final long TIMEOUT = 10000; // 10 seconds
|
||||||
|
|
||||||
|
|
|
@ -11,7 +11,7 @@ import spock.lang.Shared
|
||||||
|
|
||||||
import static datadog.trace.agent.test.TestUtils.runUnderTrace
|
import static datadog.trace.agent.test.TestUtils.runUnderTrace
|
||||||
|
|
||||||
@RetryOnFailure
|
@RetryOnFailure(times = 3, delaySeconds = 1)
|
||||||
class Elasticsearch53SpringRepositoryTest extends AgentTestRunner {
|
class Elasticsearch53SpringRepositoryTest extends AgentTestRunner {
|
||||||
@Shared
|
@Shared
|
||||||
ApplicationContext applicationContext = new AnnotationConfigApplicationContext(Config)
|
ApplicationContext applicationContext = new AnnotationConfigApplicationContext(Config)
|
||||||
|
|
|
@ -28,7 +28,7 @@ import java.util.concurrent.atomic.AtomicLong
|
||||||
import static datadog.trace.agent.test.TestUtils.runUnderTrace
|
import static datadog.trace.agent.test.TestUtils.runUnderTrace
|
||||||
import static org.elasticsearch.cluster.ClusterName.CLUSTER_NAME_SETTING
|
import static org.elasticsearch.cluster.ClusterName.CLUSTER_NAME_SETTING
|
||||||
|
|
||||||
@RetryOnFailure
|
@RetryOnFailure(times = 3, delaySeconds = 1)
|
||||||
class Elasticsearch53SpringTemplateTest extends AgentTestRunner {
|
class Elasticsearch53SpringTemplateTest extends AgentTestRunner {
|
||||||
public static final long TIMEOUT = 10000; // 10 seconds
|
public static final long TIMEOUT = 10000; // 10 seconds
|
||||||
|
|
||||||
|
@ -82,7 +82,6 @@ class Elasticsearch53SpringTemplateTest extends AgentTestRunner {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@RetryOnFailure
|
|
||||||
def "test elasticsearch error"() {
|
def "test elasticsearch error"() {
|
||||||
when:
|
when:
|
||||||
template.refresh(indexName)
|
template.refresh(indexName)
|
||||||
|
|
|
@ -17,7 +17,7 @@ import spock.lang.Shared
|
||||||
import static datadog.trace.agent.test.TestUtils.runUnderTrace
|
import static datadog.trace.agent.test.TestUtils.runUnderTrace
|
||||||
import static org.elasticsearch.cluster.ClusterName.CLUSTER_NAME_SETTING
|
import static org.elasticsearch.cluster.ClusterName.CLUSTER_NAME_SETTING
|
||||||
|
|
||||||
@RetryOnFailure
|
@RetryOnFailure(times = 3, delaySeconds = 1)
|
||||||
class Elasticsearch5NodeClientTest extends AgentTestRunner {
|
class Elasticsearch5NodeClientTest extends AgentTestRunner {
|
||||||
public static final long TIMEOUT = 10000; // 10 seconds
|
public static final long TIMEOUT = 10000; // 10 seconds
|
||||||
|
|
||||||
|
|
|
@ -21,7 +21,7 @@ import spock.lang.Shared
|
||||||
import static datadog.trace.agent.test.TestUtils.runUnderTrace
|
import static datadog.trace.agent.test.TestUtils.runUnderTrace
|
||||||
import static org.elasticsearch.cluster.ClusterName.CLUSTER_NAME_SETTING
|
import static org.elasticsearch.cluster.ClusterName.CLUSTER_NAME_SETTING
|
||||||
|
|
||||||
@RetryOnFailure
|
@RetryOnFailure(times = 3, delaySeconds = 1)
|
||||||
class Elasticsearch5TransportClientTest extends AgentTestRunner {
|
class Elasticsearch5TransportClientTest extends AgentTestRunner {
|
||||||
public static final long TIMEOUT = 10000; // 10 seconds
|
public static final long TIMEOUT = 10000; // 10 seconds
|
||||||
|
|
||||||
|
@ -80,7 +80,6 @@ class Elasticsearch5TransportClientTest extends AgentTestRunner {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@RetryOnFailure
|
|
||||||
def "test elasticsearch status"() {
|
def "test elasticsearch status"() {
|
||||||
setup:
|
setup:
|
||||||
def result = client.admin().cluster().health(new ClusterHealthRequest())
|
def result = client.admin().cluster().health(new ClusterHealthRequest())
|
||||||
|
|
|
@ -17,7 +17,7 @@ import spock.lang.Shared
|
||||||
import static datadog.trace.agent.test.TestUtils.runUnderTrace
|
import static datadog.trace.agent.test.TestUtils.runUnderTrace
|
||||||
import static org.elasticsearch.cluster.ClusterName.CLUSTER_NAME_SETTING
|
import static org.elasticsearch.cluster.ClusterName.CLUSTER_NAME_SETTING
|
||||||
|
|
||||||
@RetryOnFailure
|
@RetryOnFailure(times = 3, delaySeconds = 1)
|
||||||
class Elasticsearch5NodeClientTest extends AgentTestRunner {
|
class Elasticsearch5NodeClientTest extends AgentTestRunner {
|
||||||
public static final long TIMEOUT = 10000; // 10 seconds
|
public static final long TIMEOUT = 10000; // 10 seconds
|
||||||
|
|
||||||
|
|
|
@ -21,7 +21,7 @@ import spock.lang.Shared
|
||||||
import static datadog.trace.agent.test.TestUtils.runUnderTrace
|
import static datadog.trace.agent.test.TestUtils.runUnderTrace
|
||||||
import static org.elasticsearch.cluster.ClusterName.CLUSTER_NAME_SETTING
|
import static org.elasticsearch.cluster.ClusterName.CLUSTER_NAME_SETTING
|
||||||
|
|
||||||
@RetryOnFailure
|
@RetryOnFailure(times = 3, delaySeconds = 1)
|
||||||
class Elasticsearch5TransportClientTest extends AgentTestRunner {
|
class Elasticsearch5TransportClientTest extends AgentTestRunner {
|
||||||
public static final long TIMEOUT = 10000; // 10 seconds
|
public static final long TIMEOUT = 10000; // 10 seconds
|
||||||
|
|
||||||
|
|
|
@ -16,7 +16,7 @@ import spock.lang.Shared
|
||||||
import static datadog.trace.agent.test.TestUtils.runUnderTrace
|
import static datadog.trace.agent.test.TestUtils.runUnderTrace
|
||||||
import static org.elasticsearch.cluster.ClusterName.CLUSTER_NAME_SETTING
|
import static org.elasticsearch.cluster.ClusterName.CLUSTER_NAME_SETTING
|
||||||
|
|
||||||
@RetryOnFailure
|
@RetryOnFailure(times = 3, delaySeconds = 1)
|
||||||
class Elasticsearch6NodeClientTest extends AgentTestRunner {
|
class Elasticsearch6NodeClientTest extends AgentTestRunner {
|
||||||
public static final long TIMEOUT = 10000; // 10 seconds
|
public static final long TIMEOUT = 10000; // 10 seconds
|
||||||
|
|
||||||
|
|
|
@ -20,7 +20,7 @@ import spock.lang.Shared
|
||||||
import static datadog.trace.agent.test.TestUtils.runUnderTrace
|
import static datadog.trace.agent.test.TestUtils.runUnderTrace
|
||||||
import static org.elasticsearch.cluster.ClusterName.CLUSTER_NAME_SETTING
|
import static org.elasticsearch.cluster.ClusterName.CLUSTER_NAME_SETTING
|
||||||
|
|
||||||
@RetryOnFailure
|
@RetryOnFailure(times = 3, delaySeconds = 1)
|
||||||
class Elasticsearch6TransportClientTest extends AgentTestRunner {
|
class Elasticsearch6TransportClientTest extends AgentTestRunner {
|
||||||
public static final long TIMEOUT = 10000; // 10 seconds
|
public static final long TIMEOUT = 10000; // 10 seconds
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue