Skip to content

Commit 024f1a5

Browse files
authored
Mute failing testPerformActionAttrsRequestFails (#42933)
1 parent 186b52c commit 024f1a5

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

x-pack/plugin/core/src/test/java/org/elasticsearch/xpack/core/indexlifecycle/SetSingleNodeAllocateStepTests.java

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -202,6 +202,7 @@ public void testPerformActionAttrsNoNodesValid() {
202202
assertNoValidNode(indexMetaData, index, nodes);
203203
}
204204

205+
@AwaitsFix(bugUrl = "https://github.com/elastic/elasticsearch/issues/42932")
205206
public void testPerformActionAttrsRequestFails() {
206207
int numAttrs = randomIntBetween(1, 10);
207208
String[][] validAttrs = new String[numAttrs][2];
@@ -213,7 +214,7 @@ public void testPerformActionAttrsRequestFails() {
213214
indexSettings.put(IndexMetaData.INDEX_ROUTING_INCLUDE_GROUP_SETTING.getKey() + attr[0], attr[1]);
214215
}
215216
IndexMetaData indexMetaData = IndexMetaData.builder(randomAlphaOfLength(10)).settings(indexSettings)
216-
.numberOfShards(randomIntBetween(1, 5)).numberOfReplicas(randomIntBetween(0, 5)).build();
217+
.numberOfShards(randomIntBetween(1, 5)).numberOfReplicas(randomIntBetween(0, 5)).build();
217218
Index index = indexMetaData.getIndex();
218219
Set<String> validNodeIds = new HashSet<>();
219220
Settings validNodeSettings = Settings.EMPTY;
@@ -225,17 +226,17 @@ public void testPerformActionAttrsRequestFails() {
225226
int nodePort = 9300 + i;
226227
String[] nodeAttr = randomFrom(validAttrs);
227228
Settings nodeSettings = Settings.builder().put(validNodeSettings).put(Node.NODE_NAME_SETTING.getKey(), nodeName)
228-
.put(Node.NODE_ATTRIBUTES.getKey() + nodeAttr[0], nodeAttr[1]).build();
229+
.put(Node.NODE_ATTRIBUTES.getKey() + nodeAttr[0], nodeAttr[1]).build();
229230
nodes.add(DiscoveryNode.createLocal(nodeSettings, new TransportAddress(TransportAddress.META_ADDRESS, nodePort), nodeId));
230231
validNodeIds.add(nodeId);
231232
}
232233

233234
ImmutableOpenMap.Builder<String, IndexMetaData> indices = ImmutableOpenMap.<String, IndexMetaData> builder().fPut(index.getName(),
234-
indexMetaData);
235+
indexMetaData);
235236
IndexRoutingTable.Builder indexRoutingTable = IndexRoutingTable.builder(index)
236-
.addShard(TestShardRouting.newShardRouting(new ShardId(index, 0), "node_id_0", true, ShardRoutingState.STARTED));
237+
.addShard(TestShardRouting.newShardRouting(new ShardId(index, 0), "node_id_0", true, ShardRoutingState.STARTED));
237238
ClusterState clusterState = ClusterState.builder(ClusterState.EMPTY_STATE).metaData(MetaData.builder().indices(indices.build()))
238-
.nodes(nodes).routingTable(RoutingTable.builder().add(indexRoutingTable).build()).build();
239+
.nodes(nodes).routingTable(RoutingTable.builder().add(indexRoutingTable).build()).build();
239240

240241
SetSingleNodeAllocateStep step = createRandomInstance();
241242
Exception exception = new RuntimeException();
@@ -253,8 +254,8 @@ public Void answer(InvocationOnMock invocation) throws Throwable {
253254
@SuppressWarnings("unchecked")
254255
ActionListener<AcknowledgedResponse> listener = (ActionListener<AcknowledgedResponse>) invocation.getArguments()[1];
255256
assertSettingsRequestContainsValueFrom(request,
256-
IndexMetaData.INDEX_ROUTING_REQUIRE_GROUP_SETTING.getKey() + "_id", validNodeIds, true,
257-
indexMetaData.getIndex().getName());
257+
IndexMetaData.INDEX_ROUTING_REQUIRE_GROUP_SETTING.getKey() + "_id", validNodeIds, true,
258+
indexMetaData.getIndex().getName());
258259
listener.onFailure(exception);
259260
return null;
260261
}

0 commit comments

Comments
 (0)