Wait for initial traces before starting tests
to ensure a late reported trace doesn’t mess up the test assertions.
This commit is contained in:
parent
b58a7db7a7
commit
682fb01350
|
@ -40,6 +40,7 @@ class Elasticsearch2NodeClientTest extends AgentTestRunner {
|
||||||
testNode = NodeBuilder.newInstance().clusterName("test-cluster").settings(settings).build()
|
testNode = NodeBuilder.newInstance().clusterName("test-cluster").settings(settings).build()
|
||||||
testNode.start()
|
testNode.start()
|
||||||
testNode.client().admin().cluster().prepareHealth().setWaitForYellowStatus().execute().actionGet(5000)
|
testNode.client().admin().cluster().prepareHealth().setWaitForYellowStatus().execute().actionGet(5000)
|
||||||
|
TEST_WRITER.waitForTraces(1)
|
||||||
}
|
}
|
||||||
|
|
||||||
def cleanupSpec() {
|
def cleanupSpec() {
|
||||||
|
|
|
@ -51,6 +51,7 @@ class Elasticsearch2TransportClientTest extends AgentTestRunner {
|
||||||
).build()
|
).build()
|
||||||
client.addTransportAddress(new InetSocketTransportAddress(InetAddress.getByName("localhost"), TCP_PORT))
|
client.addTransportAddress(new InetSocketTransportAddress(InetAddress.getByName("localhost"), TCP_PORT))
|
||||||
client.admin().cluster().prepareHealth().setWaitForYellowStatus().execute().actionGet(5000)
|
client.admin().cluster().prepareHealth().setWaitForYellowStatus().execute().actionGet(5000)
|
||||||
|
TEST_WRITER.waitForTraces(1)
|
||||||
}
|
}
|
||||||
|
|
||||||
def cleanupSpec() {
|
def cleanupSpec() {
|
||||||
|
|
|
@ -46,6 +46,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()
|
||||||
testNode.client().admin().cluster().prepareHealth().setWaitForYellowStatus().execute().actionGet(5000)
|
testNode.client().admin().cluster().prepareHealth().setWaitForYellowStatus().execute().actionGet(5000)
|
||||||
|
TEST_WRITER.waitForTraces(1)
|
||||||
}
|
}
|
||||||
|
|
||||||
def cleanupSpec() {
|
def cleanupSpec() {
|
||||||
|
|
|
@ -58,6 +58,7 @@ class Elasticsearch5TransportClientTest extends AgentTestRunner {
|
||||||
)
|
)
|
||||||
client.addTransportAddress(new InetSocketTransportAddress(InetAddress.getByName("localhost"), TCP_PORT))
|
client.addTransportAddress(new InetSocketTransportAddress(InetAddress.getByName("localhost"), TCP_PORT))
|
||||||
client.admin().cluster().prepareHealth().setWaitForYellowStatus().execute().actionGet(5000)
|
client.admin().cluster().prepareHealth().setWaitForYellowStatus().execute().actionGet(5000)
|
||||||
|
TEST_WRITER.waitForTraces(1)
|
||||||
}
|
}
|
||||||
|
|
||||||
def cleanupSpec() {
|
def cleanupSpec() {
|
||||||
|
|
|
@ -43,6 +43,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()
|
||||||
testNode.client().admin().cluster().prepareHealth().setWaitForYellowStatus().execute().actionGet(5000)
|
testNode.client().admin().cluster().prepareHealth().setWaitForYellowStatus().execute().actionGet(5000)
|
||||||
|
TEST_WRITER.waitForTraces(1)
|
||||||
}
|
}
|
||||||
|
|
||||||
def cleanupSpec() {
|
def cleanupSpec() {
|
||||||
|
|
|
@ -55,6 +55,7 @@ class Elasticsearch6TransportClientTest extends AgentTestRunner {
|
||||||
)
|
)
|
||||||
client.addTransportAddress(new TransportAddress(InetAddress.getByName("localhost"), TCP_PORT))
|
client.addTransportAddress(new TransportAddress(InetAddress.getByName("localhost"), TCP_PORT))
|
||||||
client.admin().cluster().prepareHealth().setWaitForYellowStatus().execute().actionGet(5000)
|
client.admin().cluster().prepareHealth().setWaitForYellowStatus().execute().actionGet(5000)
|
||||||
|
TEST_WRITER.waitForTraces(1)
|
||||||
}
|
}
|
||||||
|
|
||||||
def cleanupSpec() {
|
def cleanupSpec() {
|
||||||
|
|
Loading…
Reference in New Issue