Clear TEST_WRITER before waiting to ensure accurate timing
Otherwise the waitForTraces at the end might be triggered prematurely.
This commit is contained in:
parent
5fe58dc344
commit
979aa7838f
|
@ -39,6 +39,7 @@ class Elasticsearch2NodeClientTest extends AgentTestRunner {
|
|||
.build()
|
||||
testNode = NodeBuilder.newInstance().clusterName("test-cluster").settings(settings).build()
|
||||
testNode.start()
|
||||
TEST_WRITER.clear()
|
||||
testNode.client().admin().cluster().prepareHealth().setWaitForYellowStatus().execute().actionGet(5000)
|
||||
TEST_WRITER.waitForTraces(1)
|
||||
}
|
||||
|
|
|
@ -50,6 +50,7 @@ class Elasticsearch2TransportClientTest extends AgentTestRunner {
|
|||
.build()
|
||||
).build()
|
||||
client.addTransportAddress(new InetSocketTransportAddress(InetAddress.getByName("localhost"), TCP_PORT))
|
||||
TEST_WRITER.clear()
|
||||
client.admin().cluster().prepareHealth().setWaitForYellowStatus().execute().actionGet(5000)
|
||||
TEST_WRITER.waitForTraces(1)
|
||||
}
|
||||
|
|
|
@ -45,6 +45,7 @@ class Elasticsearch5NodeClientTest extends AgentTestRunner {
|
|||
.build()
|
||||
testNode = new Node(new Environment(InternalSettingsPreparer.prepareSettings(settings)), [Netty3Plugin])
|
||||
testNode.start()
|
||||
TEST_WRITER.clear()
|
||||
testNode.client().admin().cluster().prepareHealth().setWaitForYellowStatus().execute().actionGet(5000)
|
||||
TEST_WRITER.waitForTraces(1)
|
||||
}
|
||||
|
|
|
@ -57,6 +57,7 @@ class Elasticsearch5TransportClientTest extends AgentTestRunner {
|
|||
.build()
|
||||
)
|
||||
client.addTransportAddress(new InetSocketTransportAddress(InetAddress.getByName("localhost"), TCP_PORT))
|
||||
TEST_WRITER.clear()
|
||||
client.admin().cluster().prepareHealth().setWaitForYellowStatus().execute().actionGet(5000)
|
||||
TEST_WRITER.waitForTraces(1)
|
||||
}
|
||||
|
|
|
@ -42,6 +42,7 @@ class Elasticsearch6NodeClientTest extends AgentTestRunner {
|
|||
.build()
|
||||
testNode = new Node(InternalSettingsPreparer.prepareEnvironment(settings, null), [Netty4Plugin])
|
||||
testNode.start()
|
||||
TEST_WRITER.clear()
|
||||
testNode.client().admin().cluster().prepareHealth().setWaitForYellowStatus().execute().actionGet(5000)
|
||||
TEST_WRITER.waitForTraces(1)
|
||||
}
|
||||
|
|
|
@ -54,6 +54,7 @@ class Elasticsearch6TransportClientTest extends AgentTestRunner {
|
|||
.build()
|
||||
)
|
||||
client.addTransportAddress(new TransportAddress(InetAddress.getByName("localhost"), TCP_PORT))
|
||||
TEST_WRITER.clear()
|
||||
client.admin().cluster().prepareHealth().setWaitForYellowStatus().execute().actionGet(5000)
|
||||
TEST_WRITER.waitForTraces(1)
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue