From 01bc1f4124607a173c4ec47abd6fe8db2144a209 Mon Sep 17 00:00:00 2001 From: Simon Willnauer Date: Wed, 20 Jan 2016 09:39:37 +0100 Subject: [PATCH] Pass identity function as a client wrapper #Relates to elastic/elasticsearchelastic/elasticsearch#16101 Original commit: elastic/x-pack-elasticsearch@5eff4b440bfe7c3ea0c1526eec97ac19b310612d --- .../elasticsearch/shield/audit/index/IndexAuditTrailTests.java | 3 ++- .../shield/audit/index/RemoteIndexAuditTrailStartingTests.java | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/elasticsearch/x-pack/shield/src/test/java/org/elasticsearch/shield/audit/index/IndexAuditTrailTests.java b/elasticsearch/x-pack/shield/src/test/java/org/elasticsearch/shield/audit/index/IndexAuditTrailTests.java index 4347ee61656..1a19ed419eb 100644 --- a/elasticsearch/x-pack/shield/src/test/java/org/elasticsearch/shield/audit/index/IndexAuditTrailTests.java +++ b/elasticsearch/x-pack/shield/src/test/java/org/elasticsearch/shield/audit/index/IndexAuditTrailTests.java @@ -53,6 +53,7 @@ import java.util.List; import java.util.Locale; import java.util.Map; import java.util.Set; +import java.util.function.Function; import static org.elasticsearch.shield.audit.index.IndexNameResolver.Rollover.DAILY; import static org.elasticsearch.shield.audit.index.IndexNameResolver.Rollover.HOURLY; @@ -172,7 +173,7 @@ public class IndexAuditTrailTests extends ShieldIntegTestCase { return builder.build(); } }; - cluster2 = new InternalTestCluster("network", randomLong(), createTempDir(), numNodes, numNodes, cluster2Name, cluster2SettingsSource, 0, false, SECOND_CLUSTER_NODE_PREFIX, getMockPlugins()); + cluster2 = new InternalTestCluster("network", randomLong(), createTempDir(), numNodes, numNodes, cluster2Name, cluster2SettingsSource, 0, false, SECOND_CLUSTER_NODE_PREFIX, getMockPlugins(), Function.identity()); cluster2.beforeTest(getRandom(), 0.5); remoteClient = cluster2.client(); diff --git a/elasticsearch/x-pack/shield/src/test/java/org/elasticsearch/shield/audit/index/RemoteIndexAuditTrailStartingTests.java b/elasticsearch/x-pack/shield/src/test/java/org/elasticsearch/shield/audit/index/RemoteIndexAuditTrailStartingTests.java index dd83018bcd6..d6a9d31db2a 100644 --- a/elasticsearch/x-pack/shield/src/test/java/org/elasticsearch/shield/audit/index/RemoteIndexAuditTrailStartingTests.java +++ b/elasticsearch/x-pack/shield/src/test/java/org/elasticsearch/shield/audit/index/RemoteIndexAuditTrailStartingTests.java @@ -24,6 +24,7 @@ import java.util.List; import java.util.Map; import java.util.Set; import java.util.concurrent.TimeUnit; +import java.util.function.Function; import static org.elasticsearch.test.InternalTestCluster.clusterName; import static org.hamcrest.Matchers.is; @@ -106,7 +107,7 @@ public class RemoteIndexAuditTrailStartingTests extends ShieldIntegTestCase { return builder.build(); } }; - remoteCluster = new InternalTestCluster("network", randomLong(), createTempDir(), numNodes, numNodes, cluster2Name, cluster2SettingsSource, 0, false, SECOND_CLUSTER_NODE_PREFIX, getMockPlugins()); + remoteCluster = new InternalTestCluster("network", randomLong(), createTempDir(), numNodes, numNodes, cluster2Name, cluster2SettingsSource, 0, false, SECOND_CLUSTER_NODE_PREFIX, getMockPlugins(), Function.identity()); remoteCluster.beforeTest(getRandom(), 0.5); }