@@ -202,6 +202,7 @@ public void testPerformActionAttrsNoNodesValid() {
202
202
assertNoValidNode (indexMetaData , index , nodes );
203
203
}
204
204
205
+ @ AwaitsFix (bugUrl = "https://github.com/elastic/elasticsearch/issues/42932" )
205
206
public void testPerformActionAttrsRequestFails () {
206
207
int numAttrs = randomIntBetween (1 , 10 );
207
208
String [][] validAttrs = new String [numAttrs ][2 ];
@@ -213,7 +214,7 @@ public void testPerformActionAttrsRequestFails() {
213
214
indexSettings .put (IndexMetaData .INDEX_ROUTING_INCLUDE_GROUP_SETTING .getKey () + attr [0 ], attr [1 ]);
214
215
}
215
216
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 ();
217
218
Index index = indexMetaData .getIndex ();
218
219
Set <String > validNodeIds = new HashSet <>();
219
220
Settings validNodeSettings = Settings .EMPTY ;
@@ -225,17 +226,17 @@ public void testPerformActionAttrsRequestFails() {
225
226
int nodePort = 9300 + i ;
226
227
String [] nodeAttr = randomFrom (validAttrs );
227
228
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 ();
229
230
nodes .add (DiscoveryNode .createLocal (nodeSettings , new TransportAddress (TransportAddress .META_ADDRESS , nodePort ), nodeId ));
230
231
validNodeIds .add (nodeId );
231
232
}
232
233
233
234
ImmutableOpenMap .Builder <String , IndexMetaData > indices = ImmutableOpenMap .<String , IndexMetaData > builder ().fPut (index .getName (),
234
- indexMetaData );
235
+ indexMetaData );
235
236
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 ));
237
238
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 ();
239
240
240
241
SetSingleNodeAllocateStep step = createRandomInstance ();
241
242
Exception exception = new RuntimeException ();
@@ -253,8 +254,8 @@ public Void answer(InvocationOnMock invocation) throws Throwable {
253
254
@ SuppressWarnings ("unchecked" )
254
255
ActionListener <AcknowledgedResponse > listener = (ActionListener <AcknowledgedResponse >) invocation .getArguments ()[1 ];
255
256
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 ());
258
259
listener .onFailure (exception );
259
260
return null ;
260
261
}
0 commit comments