@@ -79,7 +79,7 @@ public void rerouteWithCommands() throws Exception {
79
79
state = client ("node1" ).admin ().cluster ().prepareReroute ()
80
80
.add (new AllocateAllocationCommand (new ShardId ("test" , 0 ), "node1" , true ))
81
81
.setDryRun (true )
82
- .execute ().actionGet ().state ();
82
+ .execute ().actionGet ().getState ();
83
83
assertThat (state .routingNodes ().unassigned ().size (), equalTo (1 ));
84
84
assertThat (state .routingNodes ().node (state .nodes ().resolveNode ("node1" ).id ()).shards ().get (0 ).state (), equalTo (ShardRoutingState .INITIALIZING ));
85
85
@@ -90,7 +90,7 @@ public void rerouteWithCommands() throws Exception {
90
90
logger .info ("--> explicitly allocate shard 1, actually allocating, no dry run" );
91
91
state = client ("node1" ).admin ().cluster ().prepareReroute ()
92
92
.add (new AllocateAllocationCommand (new ShardId ("test" , 0 ), "node1" , true ))
93
- .execute ().actionGet ().state ();
93
+ .execute ().actionGet ().getState ();
94
94
assertThat (state .routingNodes ().unassigned ().size (), equalTo (1 ));
95
95
assertThat (state .routingNodes ().node (state .nodes ().resolveNode ("node1" ).id ()).shards ().get (0 ).state (), equalTo (ShardRoutingState .INITIALIZING ));
96
96
@@ -105,7 +105,7 @@ public void rerouteWithCommands() throws Exception {
105
105
logger .info ("--> move shard 1 primary from node1 to node2" );
106
106
state = client ("node1" ).admin ().cluster ().prepareReroute ()
107
107
.add (new MoveAllocationCommand (new ShardId ("test" , 0 ), "node1" , "node2" ))
108
- .execute ().actionGet ().state ();
108
+ .execute ().actionGet ().getState ();
109
109
110
110
assertThat (state .routingNodes ().node (state .nodes ().resolveNode ("node1" ).id ()).shards ().get (0 ).state (), equalTo (ShardRoutingState .RELOCATING ));
111
111
assertThat (state .routingNodes ().node (state .nodes ().resolveNode ("node2" ).id ()).shards ().get (0 ).state (), equalTo (ShardRoutingState .INITIALIZING ));
@@ -149,7 +149,7 @@ public void rerouteWithAllocateLocalGateway() throws Exception {
149
149
logger .info ("--> explicitly allocate shard 1, actually allocating, no dry run" );
150
150
state = client ("node1" ).admin ().cluster ().prepareReroute ()
151
151
.add (new AllocateAllocationCommand (new ShardId ("test" , 0 ), "node1" , true ))
152
- .execute ().actionGet ().state ();
152
+ .execute ().actionGet ().getState ();
153
153
assertThat (state .routingNodes ().unassigned ().size (), equalTo (1 ));
154
154
assertThat (state .routingNodes ().node (state .nodes ().resolveNode ("node1" ).id ()).shards ().get (0 ).state (), equalTo (ShardRoutingState .INITIALIZING ));
155
155
0 commit comments