From 4e1d44110b06f73c62eb65cb4d8669c3be29303b Mon Sep 17 00:00:00 2001 From: Alexander Reelsen Date: Fri, 29 Jan 2016 15:15:25 +0100 Subject: [PATCH] Marvel: Fix compilation issues in tests Original commit: elastic/x-pack-elasticsearch@9ffc4c501bdfdc320338d633860a04d370494f2e --- .../src/main/java/org/elasticsearch/marvel/MarvelPlugin.java | 2 +- .../java/org/elasticsearch/marvel/MarvelPluginTests.java | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/elasticsearch/x-pack/marvel/src/main/java/org/elasticsearch/marvel/MarvelPlugin.java b/elasticsearch/x-pack/marvel/src/main/java/org/elasticsearch/marvel/MarvelPlugin.java index 1ef382fd569..0be8e573628 100644 --- a/elasticsearch/x-pack/marvel/src/main/java/org/elasticsearch/marvel/MarvelPlugin.java +++ b/elasticsearch/x-pack/marvel/src/main/java/org/elasticsearch/marvel/MarvelPlugin.java @@ -45,7 +45,7 @@ public class MarvelPlugin extends Plugin { public static final String ENABLED = NAME + ".enabled"; public static final Setting INDEX_MARVEL_VERSION_SETTING = new Setting<>("index.marvel.plugin.version", "", Function.identity(), false, Setting.Scope.INDEX); public static final Setting INDEX_MARVEL_TEMPLATE_VERSION_SETTING = new Setting<>("index.marvel.template.version", "", Function.identity(), false, Setting.Scope.INDEX); - private static final String TRIBE_NAME_SETTING = "tribe.name"; + public static final String TRIBE_NAME_SETTING = "tribe.name"; private final Settings settings; private final boolean enabled; diff --git a/elasticsearch/x-pack/marvel/src/test/java/org/elasticsearch/marvel/MarvelPluginTests.java b/elasticsearch/x-pack/marvel/src/test/java/org/elasticsearch/marvel/MarvelPluginTests.java index 89292290d67..d7c4e368070 100644 --- a/elasticsearch/x-pack/marvel/src/test/java/org/elasticsearch/marvel/MarvelPluginTests.java +++ b/elasticsearch/x-pack/marvel/src/test/java/org/elasticsearch/marvel/MarvelPluginTests.java @@ -14,7 +14,6 @@ import org.elasticsearch.marvel.shield.MarvelShieldIntegration; import org.elasticsearch.marvel.test.MarvelIntegTestCase; import org.elasticsearch.plugins.PluginInfo; import org.elasticsearch.test.ESIntegTestCase.ClusterScope; -import org.elasticsearch.tribe.TribeService; import org.elasticsearch.xpack.XPackPlugin; import static org.elasticsearch.test.ESIntegTestCase.Scope.TEST; @@ -43,14 +42,14 @@ public class MarvelPluginTests extends MarvelIntegTestCase { } public void testMarvelEnabledOnTribeNode() { - internalCluster().startNode(Settings.builder().put(MarvelPlugin.ENABLED, true).put(TribeService.TRIBE_NAME, "t1").build()); + internalCluster().startNode(Settings.builder().put(MarvelPlugin.ENABLED, true).put(MarvelPlugin.TRIBE_NAME_SETTING, "t1").build()); assertPluginIsLoaded(); assertServiceIsBound(AgentService.class); assertServiceIsBound(MarvelShieldIntegration.class); } public void testMarvelDisabledOnTribeNode() { - internalCluster().startNode(Settings.builder().put(TribeService.TRIBE_NAME, "t1").build()); + internalCluster().startNode(Settings.builder().put(MarvelPlugin.TRIBE_NAME_SETTING, "t1").build()); assertPluginIsLoaded(); assertServiceIsNotBound(AgentService.class); assertServiceIsBound(MarvelShieldIntegration.class);