@@ -93,7 +93,7 @@ public void testTwoNodesNoClusterManagerBlock() throws Exception {
93
93
94
94
logger .info ("--> should be blocked, no cluster-manager..." );
95
95
ClusterState state = client ().admin ().cluster ().prepareState ().setLocal (true ).execute ().actionGet ().getState ();
96
- assertThat (state .blocks ().hasGlobalBlockWithId (NoClusterManagerBlockService .NO_MASTER_BLOCK_ID ), equalTo (true ));
96
+ assertThat (state .blocks ().hasGlobalBlockWithId (NoClusterManagerBlockService .NO_CLUSTER_MANAGER_BLOCK_ID ), equalTo (true ));
97
97
assertThat (state .nodes ().getSize (), equalTo (1 )); // verify that we still see the local node in the cluster state
98
98
99
99
logger .info ("--> start second node, cluster should be formed" );
@@ -109,9 +109,9 @@ public void testTwoNodesNoClusterManagerBlock() throws Exception {
109
109
assertThat (clusterHealthResponse .isTimedOut (), equalTo (false ));
110
110
111
111
state = client ().admin ().cluster ().prepareState ().setLocal (true ).execute ().actionGet ().getState ();
112
- assertThat (state .blocks ().hasGlobalBlockWithId (NoClusterManagerBlockService .NO_MASTER_BLOCK_ID ), equalTo (false ));
112
+ assertThat (state .blocks ().hasGlobalBlockWithId (NoClusterManagerBlockService .NO_CLUSTER_MANAGER_BLOCK_ID ), equalTo (false ));
113
113
state = client ().admin ().cluster ().prepareState ().setLocal (true ).execute ().actionGet ().getState ();
114
- assertThat (state .blocks ().hasGlobalBlockWithId (NoClusterManagerBlockService .NO_MASTER_BLOCK_ID ), equalTo (false ));
114
+ assertThat (state .blocks ().hasGlobalBlockWithId (NoClusterManagerBlockService .NO_CLUSTER_MANAGER_BLOCK_ID ), equalTo (false ));
115
115
116
116
state = client ().admin ().cluster ().prepareState ().execute ().actionGet ().getState ();
117
117
assertThat (state .nodes ().getSize (), equalTo (2 ));
@@ -161,11 +161,11 @@ public void testTwoNodesNoClusterManagerBlock() throws Exception {
161
161
162
162
assertBusy (() -> {
163
163
ClusterState clusterState = client ().admin ().cluster ().prepareState ().setLocal (true ).execute ().actionGet ().getState ();
164
- assertTrue (clusterState .blocks ().hasGlobalBlockWithId (NoClusterManagerBlockService .NO_MASTER_BLOCK_ID ));
164
+ assertTrue (clusterState .blocks ().hasGlobalBlockWithId (NoClusterManagerBlockService .NO_CLUSTER_MANAGER_BLOCK_ID ));
165
165
});
166
166
167
167
state = client ().admin ().cluster ().prepareState ().setLocal (true ).execute ().actionGet ().getState ();
168
- assertThat (state .blocks ().hasGlobalBlockWithId (NoClusterManagerBlockService .NO_MASTER_BLOCK_ID ), equalTo (true ));
168
+ assertThat (state .blocks ().hasGlobalBlockWithId (NoClusterManagerBlockService .NO_CLUSTER_MANAGER_BLOCK_ID ), equalTo (true ));
169
169
// verify that both nodes are still in the cluster state but there is no cluster-manager
170
170
assertThat (state .nodes ().getSize (), equalTo (2 ));
171
171
assertThat (state .nodes ().getClusterManagerNode (), equalTo (null ));
@@ -184,9 +184,9 @@ public void testTwoNodesNoClusterManagerBlock() throws Exception {
184
184
assertThat (clusterHealthResponse .isTimedOut (), equalTo (false ));
185
185
186
186
state = client ().admin ().cluster ().prepareState ().setLocal (true ).execute ().actionGet ().getState ();
187
- assertThat (state .blocks ().hasGlobalBlockWithId (NoClusterManagerBlockService .NO_MASTER_BLOCK_ID ), equalTo (false ));
187
+ assertThat (state .blocks ().hasGlobalBlockWithId (NoClusterManagerBlockService .NO_CLUSTER_MANAGER_BLOCK_ID ), equalTo (false ));
188
188
state = client ().admin ().cluster ().prepareState ().setLocal (true ).execute ().actionGet ().getState ();
189
- assertThat (state .blocks ().hasGlobalBlockWithId (NoClusterManagerBlockService .NO_MASTER_BLOCK_ID ), equalTo (false ));
189
+ assertThat (state .blocks ().hasGlobalBlockWithId (NoClusterManagerBlockService .NO_CLUSTER_MANAGER_BLOCK_ID ), equalTo (false ));
190
190
191
191
state = client ().admin ().cluster ().prepareState ().execute ().actionGet ().getState ();
192
192
assertThat (state .nodes ().getSize (), equalTo (2 ));
@@ -214,7 +214,7 @@ public void testTwoNodesNoClusterManagerBlock() throws Exception {
214
214
215
215
assertBusy (() -> {
216
216
ClusterState state1 = client ().admin ().cluster ().prepareState ().setLocal (true ).execute ().actionGet ().getState ();
217
- assertThat (state1 .blocks ().hasGlobalBlockWithId (NoClusterManagerBlockService .NO_MASTER_BLOCK_ID ), equalTo (true ));
217
+ assertThat (state1 .blocks ().hasGlobalBlockWithId (NoClusterManagerBlockService .NO_CLUSTER_MANAGER_BLOCK_ID ), equalTo (true ));
218
218
});
219
219
220
220
logger .info ("--> starting the previous cluster-manager node again..." );
@@ -232,9 +232,9 @@ public void testTwoNodesNoClusterManagerBlock() throws Exception {
232
232
assertThat (clusterHealthResponse .isTimedOut (), equalTo (false ));
233
233
234
234
state = client ().admin ().cluster ().prepareState ().setLocal (true ).execute ().actionGet ().getState ();
235
- assertThat (state .blocks ().hasGlobalBlockWithId (NoClusterManagerBlockService .NO_MASTER_BLOCK_ID ), equalTo (false ));
235
+ assertThat (state .blocks ().hasGlobalBlockWithId (NoClusterManagerBlockService .NO_CLUSTER_MANAGER_BLOCK_ID ), equalTo (false ));
236
236
state = client ().admin ().cluster ().prepareState ().setLocal (true ).execute ().actionGet ().getState ();
237
- assertThat (state .blocks ().hasGlobalBlockWithId (NoClusterManagerBlockService .NO_MASTER_BLOCK_ID ), equalTo (false ));
237
+ assertThat (state .blocks ().hasGlobalBlockWithId (NoClusterManagerBlockService .NO_CLUSTER_MANAGER_BLOCK_ID ), equalTo (false ));
238
238
239
239
state = client ().admin ().cluster ().prepareState ().execute ().actionGet ().getState ();
240
240
assertThat (state .nodes ().getSize (), equalTo (2 ));
@@ -262,7 +262,7 @@ public void testThreeNodesNoClusterManagerBlock() throws Exception {
262
262
assertBusy (() -> {
263
263
for (Client client : clients ()) {
264
264
ClusterState state1 = client .admin ().cluster ().prepareState ().setLocal (true ).execute ().actionGet ().getState ();
265
- assertThat (state1 .blocks ().hasGlobalBlockWithId (NoClusterManagerBlockService .NO_MASTER_BLOCK_ID ), equalTo (true ));
265
+ assertThat (state1 .blocks ().hasGlobalBlockWithId (NoClusterManagerBlockService .NO_CLUSTER_MANAGER_BLOCK_ID ), equalTo (true ));
266
266
}
267
267
});
268
268
@@ -324,7 +324,7 @@ public void testThreeNodesNoClusterManagerBlock() throws Exception {
324
324
// spin here to wait till the state is set
325
325
assertBusy (() -> {
326
326
ClusterState st = client ().admin ().cluster ().prepareState ().setLocal (true ).execute ().actionGet ().getState ();
327
- assertThat (st .blocks ().hasGlobalBlockWithId (NoClusterManagerBlockService .NO_MASTER_BLOCK_ID ), equalTo (true ));
327
+ assertThat (st .blocks ().hasGlobalBlockWithId (NoClusterManagerBlockService .NO_CLUSTER_MANAGER_BLOCK_ID ), equalTo (true ));
328
328
});
329
329
330
330
logger .info ("--> start back the 2 nodes " );
0 commit comments