Increase ElasticSearch timeout in tests
Hopefully this would improve build stability
This commit is contained in:
parent
f893948412
commit
c98d5ef64b
|
@ -16,6 +16,8 @@ class Elasticsearch2NodeClientTest extends AgentTestRunner {
|
||||||
System.setProperty("dd.integration.elasticsearch.enabled", "true")
|
System.setProperty("dd.integration.elasticsearch.enabled", "true")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static final long TIMEOUT = 10000; // 10 seconds
|
||||||
|
|
||||||
@Shared
|
@Shared
|
||||||
int httpPort
|
int httpPort
|
||||||
@Shared
|
@Shared
|
||||||
|
@ -45,7 +47,7 @@ class Elasticsearch2NodeClientTest extends AgentTestRunner {
|
||||||
testNode = NodeBuilder.newInstance().local(true).clusterName("test-cluster").settings(settings).build()
|
testNode = NodeBuilder.newInstance().local(true).clusterName("test-cluster").settings(settings).build()
|
||||||
testNode.start()
|
testNode.start()
|
||||||
TEST_WRITER.clear()
|
TEST_WRITER.clear()
|
||||||
testNode.client().admin().cluster().prepareHealth().setWaitForYellowStatus().execute().actionGet(5000)
|
testNode.client().admin().cluster().prepareHealth().setWaitForYellowStatus().execute().actionGet(TIMEOUT)
|
||||||
TEST_WRITER.waitForTraces(1)
|
TEST_WRITER.waitForTraces(1)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -132,7 +134,7 @@ class Elasticsearch2NodeClientTest extends AgentTestRunner {
|
||||||
TEST_WRITER.size() == 1
|
TEST_WRITER.size() == 1
|
||||||
|
|
||||||
when:
|
when:
|
||||||
client.admin().cluster().prepareHealth().setWaitForYellowStatus().execute().actionGet(5000)
|
client.admin().cluster().prepareHealth().setWaitForYellowStatus().execute().actionGet(TIMEOUT)
|
||||||
def emptyResult = client.prepareGet(indexName, indexType, id).get()
|
def emptyResult = client.prepareGet(indexName, indexType, id).get()
|
||||||
|
|
||||||
then:
|
then:
|
||||||
|
|
|
@ -26,6 +26,8 @@ class Elasticsearch2SpringTemplateTest extends AgentTestRunner {
|
||||||
System.setProperty("dd.integration.elasticsearch.enabled", "true")
|
System.setProperty("dd.integration.elasticsearch.enabled", "true")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static final long TIMEOUT = 10000; // 10 seconds
|
||||||
|
|
||||||
@Shared
|
@Shared
|
||||||
int httpPort
|
int httpPort
|
||||||
@Shared
|
@Shared
|
||||||
|
@ -103,7 +105,7 @@ class Elasticsearch2SpringTemplateTest extends AgentTestRunner {
|
||||||
def "test elasticsearch get"() {
|
def "test elasticsearch get"() {
|
||||||
expect:
|
expect:
|
||||||
template.createIndex(indexName)
|
template.createIndex(indexName)
|
||||||
template.getClient().admin().cluster().prepareHealth().setWaitForYellowStatus().execute().actionGet(5000)
|
template.getClient().admin().cluster().prepareHealth().setWaitForYellowStatus().execute().actionGet(TIMEOUT)
|
||||||
|
|
||||||
when:
|
when:
|
||||||
NativeSearchQuery query = new NativeSearchQueryBuilder()
|
NativeSearchQuery query = new NativeSearchQueryBuilder()
|
||||||
|
@ -261,7 +263,7 @@ class Elasticsearch2SpringTemplateTest extends AgentTestRunner {
|
||||||
def "test results extractor"() {
|
def "test results extractor"() {
|
||||||
setup:
|
setup:
|
||||||
template.createIndex(indexName)
|
template.createIndex(indexName)
|
||||||
testNode.client().admin().cluster().prepareHealth().setWaitForYellowStatus().execute().actionGet(5000)
|
testNode.client().admin().cluster().prepareHealth().setWaitForYellowStatus().execute().actionGet(TIMEOUT)
|
||||||
template.index(IndexQueryBuilder.newInstance()
|
template.index(IndexQueryBuilder.newInstance()
|
||||||
.withObject(new Doc(id: 1, data: "doc a"))
|
.withObject(new Doc(id: 1, data: "doc a"))
|
||||||
.withIndexName(indexName)
|
.withIndexName(indexName)
|
||||||
|
|
|
@ -19,6 +19,8 @@ class Elasticsearch2TransportClientTest extends AgentTestRunner {
|
||||||
System.setProperty("dd.integration.elasticsearch.enabled", "true")
|
System.setProperty("dd.integration.elasticsearch.enabled", "true")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static final long TIMEOUT = 10000; // 10 seconds
|
||||||
|
|
||||||
@Shared
|
@Shared
|
||||||
int httpPort
|
int httpPort
|
||||||
@Shared
|
@Shared
|
||||||
|
@ -56,7 +58,7 @@ class Elasticsearch2TransportClientTest extends AgentTestRunner {
|
||||||
).build()
|
).build()
|
||||||
client.addTransportAddress(new InetSocketTransportAddress(InetAddress.getByName("localhost"), tcpPort))
|
client.addTransportAddress(new InetSocketTransportAddress(InetAddress.getByName("localhost"), tcpPort))
|
||||||
TEST_WRITER.clear()
|
TEST_WRITER.clear()
|
||||||
client.admin().cluster().prepareHealth().setWaitForYellowStatus().execute().actionGet(5000)
|
client.admin().cluster().prepareHealth().setWaitForYellowStatus().execute().actionGet(TIMEOUT)
|
||||||
TEST_WRITER.waitForTraces(1)
|
TEST_WRITER.waitForTraces(1)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -146,7 +148,7 @@ class Elasticsearch2TransportClientTest extends AgentTestRunner {
|
||||||
TEST_WRITER.size() == 1
|
TEST_WRITER.size() == 1
|
||||||
|
|
||||||
when:
|
when:
|
||||||
client.admin().cluster().prepareHealth().setWaitForYellowStatus().execute().actionGet(5000)
|
client.admin().cluster().prepareHealth().setWaitForYellowStatus().execute().actionGet(TIMEOUT)
|
||||||
def emptyResult = client.prepareGet(indexName, indexType, id).get()
|
def emptyResult = client.prepareGet(indexName, indexType, id).get()
|
||||||
|
|
||||||
then:
|
then:
|
||||||
|
|
|
@ -19,6 +19,8 @@ class Elasticsearch5NodeClientTest extends AgentTestRunner {
|
||||||
System.setProperty("dd.integration.elasticsearch.enabled", "true")
|
System.setProperty("dd.integration.elasticsearch.enabled", "true")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static final long TIMEOUT = 10000; // 10 seconds
|
||||||
|
|
||||||
@Shared
|
@Shared
|
||||||
int httpPort
|
int httpPort
|
||||||
@Shared
|
@Shared
|
||||||
|
@ -51,7 +53,7 @@ class Elasticsearch5NodeClientTest extends AgentTestRunner {
|
||||||
testNode = new Node(new Environment(InternalSettingsPreparer.prepareSettings(settings)), [Netty3Plugin])
|
testNode = new Node(new Environment(InternalSettingsPreparer.prepareSettings(settings)), [Netty3Plugin])
|
||||||
testNode.start()
|
testNode.start()
|
||||||
TEST_WRITER.clear()
|
TEST_WRITER.clear()
|
||||||
testNode.client().admin().cluster().prepareHealth().setWaitForYellowStatus().execute().actionGet(5000)
|
testNode.client().admin().cluster().prepareHealth().setWaitForYellowStatus().execute().actionGet(TIMEOUT)
|
||||||
TEST_WRITER.waitForTraces(1)
|
TEST_WRITER.waitForTraces(1)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -138,7 +140,7 @@ class Elasticsearch5NodeClientTest extends AgentTestRunner {
|
||||||
TEST_WRITER.size() == 1
|
TEST_WRITER.size() == 1
|
||||||
|
|
||||||
when:
|
when:
|
||||||
client.admin().cluster().prepareHealth().setWaitForYellowStatus().execute().actionGet(5000)
|
client.admin().cluster().prepareHealth().setWaitForYellowStatus().execute().actionGet(TIMEOUT)
|
||||||
def emptyResult = client.prepareGet(indexName, indexType, id).get()
|
def emptyResult = client.prepareGet(indexName, indexType, id).get()
|
||||||
|
|
||||||
then:
|
then:
|
||||||
|
|
|
@ -23,6 +23,8 @@ class Elasticsearch5TransportClientTest extends AgentTestRunner {
|
||||||
System.setProperty("dd.integration.elasticsearch.enabled", "true")
|
System.setProperty("dd.integration.elasticsearch.enabled", "true")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static final long TIMEOUT = 10000; // 10 seconds
|
||||||
|
|
||||||
@Shared
|
@Shared
|
||||||
int httpPort
|
int httpPort
|
||||||
@Shared
|
@Shared
|
||||||
|
@ -63,7 +65,7 @@ class Elasticsearch5TransportClientTest extends AgentTestRunner {
|
||||||
)
|
)
|
||||||
client.addTransportAddress(new InetSocketTransportAddress(InetAddress.getByName("localhost"), tcpPort))
|
client.addTransportAddress(new InetSocketTransportAddress(InetAddress.getByName("localhost"), tcpPort))
|
||||||
TEST_WRITER.clear()
|
TEST_WRITER.clear()
|
||||||
client.admin().cluster().prepareHealth().setWaitForYellowStatus().execute().actionGet(5000)
|
client.admin().cluster().prepareHealth().setWaitForYellowStatus().execute().actionGet(TIMEOUT)
|
||||||
TEST_WRITER.waitForTraces(1)
|
TEST_WRITER.waitForTraces(1)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -18,6 +18,8 @@ class Elasticsearch6NodeClientTest extends AgentTestRunner {
|
||||||
System.setProperty("dd.integration.elasticsearch.enabled", "true")
|
System.setProperty("dd.integration.elasticsearch.enabled", "true")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static final long TIMEOUT = 10000; // 10 seconds
|
||||||
|
|
||||||
@Shared
|
@Shared
|
||||||
int httpPort
|
int httpPort
|
||||||
@Shared
|
@Shared
|
||||||
|
@ -48,7 +50,7 @@ class Elasticsearch6NodeClientTest extends AgentTestRunner {
|
||||||
testNode = new Node(InternalSettingsPreparer.prepareEnvironment(settings, null), [Netty4Plugin])
|
testNode = new Node(InternalSettingsPreparer.prepareEnvironment(settings, null), [Netty4Plugin])
|
||||||
testNode.start()
|
testNode.start()
|
||||||
TEST_WRITER.clear()
|
TEST_WRITER.clear()
|
||||||
testNode.client().admin().cluster().prepareHealth().setWaitForYellowStatus().execute().actionGet(5000)
|
testNode.client().admin().cluster().prepareHealth().setWaitForYellowStatus().execute().actionGet(TIMEOUT)
|
||||||
TEST_WRITER.waitForTraces(1)
|
TEST_WRITER.waitForTraces(1)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -22,6 +22,8 @@ class Elasticsearch6TransportClientTest extends AgentTestRunner {
|
||||||
System.setProperty("dd.integration.elasticsearch.enabled", "true")
|
System.setProperty("dd.integration.elasticsearch.enabled", "true")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static final long TIMEOUT = 10000; // 10 seconds
|
||||||
|
|
||||||
@Shared
|
@Shared
|
||||||
int httpPort
|
int httpPort
|
||||||
@Shared
|
@Shared
|
||||||
|
@ -60,7 +62,7 @@ class Elasticsearch6TransportClientTest extends AgentTestRunner {
|
||||||
)
|
)
|
||||||
client.addTransportAddress(new TransportAddress(InetAddress.getByName("localhost"), tcpPort))
|
client.addTransportAddress(new TransportAddress(InetAddress.getByName("localhost"), tcpPort))
|
||||||
TEST_WRITER.clear()
|
TEST_WRITER.clear()
|
||||||
client.admin().cluster().prepareHealth().setWaitForYellowStatus().execute().actionGet(5000)
|
client.admin().cluster().prepareHealth().setWaitForYellowStatus().execute().actionGet(TIMEOUT)
|
||||||
TEST_WRITER.waitForTraces(1)
|
TEST_WRITER.waitForTraces(1)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue