Make ES tests more deterministic by using listener pool with 1 thread
This should reduce number of false negatives in ES tests
This commit is contained in:
parent
8445409944
commit
7882e4fe23
|
@ -34,6 +34,8 @@ class Elasticsearch2NodeClientTest extends AgentTestRunner {
|
|||
|
||||
def settings = Settings.builder()
|
||||
.put("path.home", esWorkingDir.path)
|
||||
// Since we use listeners to close spans this should make our span closing deterministic which is good for tests
|
||||
.put("thread_pool.listener.size", 1)
|
||||
.put("http.port", HTTP_PORT)
|
||||
.put("transport.tcp.port", TCP_PORT)
|
||||
.build()
|
||||
|
|
|
@ -45,6 +45,8 @@ class Elasticsearch2SpringTemplateTest extends AgentTestRunner {
|
|||
|
||||
def settings = Settings.builder()
|
||||
.put("path.home", esWorkingDir.path)
|
||||
// Since we use listeners to close spans this should make our span closing deterministic which is good for tests
|
||||
.put("thread_pool.listener.size", 1)
|
||||
.put("http.port", HTTP_PORT)
|
||||
.put("transport.tcp.port", TCP_PORT)
|
||||
.build()
|
||||
|
|
|
@ -46,6 +46,8 @@ class Elasticsearch2TransportClientTest extends AgentTestRunner {
|
|||
|
||||
client = TransportClient.builder().settings(
|
||||
Settings.builder()
|
||||
// Since we use listeners to close spans this should make our span closing deterministic which is good for tests
|
||||
.put("thread_pool.listener.size", 1)
|
||||
.put("cluster.name", "test-cluster")
|
||||
.build()
|
||||
).build()
|
||||
|
|
|
@ -37,6 +37,8 @@ class Elasticsearch5NodeClientTest extends AgentTestRunner {
|
|||
|
||||
def settings = Settings.builder()
|
||||
.put("path.home", esWorkingDir.path)
|
||||
// Since we use listeners to close spans this should make our span closing deterministic which is good for tests
|
||||
.put("thread_pool.listener.size", 1)
|
||||
.put("http.port", HTTP_PORT)
|
||||
.put("transport.tcp.port", TCP_PORT)
|
||||
.put("transport.type", "netty3")
|
||||
|
|
|
@ -53,6 +53,8 @@ class Elasticsearch5TransportClientTest extends AgentTestRunner {
|
|||
|
||||
client = new PreBuiltTransportClient(
|
||||
Settings.builder()
|
||||
// Since we use listeners to close spans this should make our span closing deterministic which is good for tests
|
||||
.put("thread_pool.listener.size", 1)
|
||||
.put(CLUSTER_NAME_SETTING.getKey(), "test-cluster")
|
||||
.build()
|
||||
)
|
||||
|
|
|
@ -36,6 +36,8 @@ class Elasticsearch6NodeClientTest extends AgentTestRunner {
|
|||
|
||||
def settings = Settings.builder()
|
||||
.put("path.home", esWorkingDir.path)
|
||||
// Since we use listeners to close spans this should make our span closing deterministic which is good for tests
|
||||
.put("thread_pool.listener.size", 1)
|
||||
.put("http.port", HTTP_PORT)
|
||||
.put("transport.tcp.port", TCP_PORT)
|
||||
.put(CLUSTER_NAME_SETTING.getKey(), "test-cluster")
|
||||
|
|
|
@ -50,6 +50,8 @@ class Elasticsearch6TransportClientTest extends AgentTestRunner {
|
|||
|
||||
client = new PreBuiltTransportClient(
|
||||
Settings.builder()
|
||||
// Since we use listeners to close spans this should make our span closing deterministic which is good for tests
|
||||
.put("thread_pool.listener.size", 1)
|
||||
.put(CLUSTER_NAME_SETTING.getKey(), "test-cluster")
|
||||
.build()
|
||||
)
|
||||
|
|
Loading…
Reference in New Issue