Skip to content

Commit

Permalink
Fix DiscoveryNodeRoleIT (#43225)
Browse files Browse the repository at this point in the history
The test fails if querying the roles via a transport client, since the
transport client does not have the plugin necessary to interpret the additional
role correctly. This commit adds this plugin to the transport client used.

Relates #43175
Fixes #43223
  • Loading branch information
DaveCTurner authored Jun 14, 2019
1 parent 7af2332 commit 221d23d
Showing 1 changed file with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@

package org.elasticsearch.cluster.node;

import org.apache.lucene.util.LuceneTestCase.AwaitsFix;
import org.elasticsearch.action.admin.cluster.node.info.NodesInfoResponse;
import org.elasticsearch.common.settings.Setting;
import org.elasticsearch.common.settings.Settings;
Expand All @@ -36,7 +35,6 @@
import static org.hamcrest.Matchers.hasSize;
import static org.hamcrest.Matchers.not;

@AwaitsFix(bugUrl = "https://github.com/elastic/elasticsearch/issues/43223")
public class DiscoveryNodeRoleIT extends ESIntegTestCase {

public static class AdditionalRolePlugin extends Plugin {
Expand Down Expand Up @@ -74,6 +72,11 @@ protected Collection<Class<? extends Plugin>> nodePlugins() {
return Collections.singletonList(AdditionalRolePlugin.class);
}

@Override
protected Collection<Class<? extends Plugin>> transportClientPlugins() {
return Collections.singletonList(AdditionalRolePlugin.class);
}

public void testDefaultHasAdditionalRole() {
runTestNodeHasAdditionalRole(Settings.EMPTY);
}
Expand Down

0 comments on commit 221d23d

Please sign in to comment.