Fix checkstyle issues
This commit is contained in:
parent
a029c147a3
commit
7c7abc349c
|
@ -63,20 +63,23 @@ public class AzureMinimumMasterNodesTests extends AbstractAzureComputeServiceTes
|
||||||
logger.info("--> start data node / non master node");
|
logger.info("--> start data node / non master node");
|
||||||
internalCluster().startNode();
|
internalCluster().startNode();
|
||||||
try {
|
try {
|
||||||
assertThat(client().admin().cluster().prepareState().setMasterNodeTimeout("100ms").execute().actionGet().getState().nodes().getMasterNodeId(), nullValue());
|
assertThat(client().admin().cluster().prepareState().setMasterNodeTimeout("100ms").get().getState().nodes().getMasterNodeId(),
|
||||||
|
nullValue());
|
||||||
fail("should not be able to find master");
|
fail("should not be able to find master");
|
||||||
} catch (MasterNotDiscoveredException e) {
|
} catch (MasterNotDiscoveredException e) {
|
||||||
// all is well, no master elected
|
// all is well, no master elected
|
||||||
}
|
}
|
||||||
logger.info("--> start another node");
|
logger.info("--> start another node");
|
||||||
internalCluster().startNode();
|
internalCluster().startNode();
|
||||||
assertThat(client().admin().cluster().prepareState().setMasterNodeTimeout("1s").execute().actionGet().getState().nodes().getMasterNodeId(), notNullValue());
|
assertThat(client().admin().cluster().prepareState().setMasterNodeTimeout("1s").get().getState().nodes().getMasterNodeId(),
|
||||||
|
notNullValue());
|
||||||
|
|
||||||
logger.info("--> stop master node");
|
logger.info("--> stop master node");
|
||||||
internalCluster().stopCurrentMasterNode();
|
internalCluster().stopCurrentMasterNode();
|
||||||
|
|
||||||
try {
|
try {
|
||||||
assertThat(client().admin().cluster().prepareState().setMasterNodeTimeout("1s").execute().actionGet().getState().nodes().getMasterNodeId(), nullValue());
|
assertThat(client().admin().cluster().prepareState().setMasterNodeTimeout("1s").get().getState().nodes().getMasterNodeId(),
|
||||||
|
nullValue());
|
||||||
fail("should not be able to find master");
|
fail("should not be able to find master");
|
||||||
} catch (MasterNotDiscoveredException e) {
|
} catch (MasterNotDiscoveredException e) {
|
||||||
// all is well, no master elected
|
// all is well, no master elected
|
||||||
|
@ -84,6 +87,7 @@ public class AzureMinimumMasterNodesTests extends AbstractAzureComputeServiceTes
|
||||||
|
|
||||||
logger.info("--> start another node");
|
logger.info("--> start another node");
|
||||||
internalCluster().startNode();
|
internalCluster().startNode();
|
||||||
assertThat(client().admin().cluster().prepareState().setMasterNodeTimeout("1s").execute().actionGet().getState().nodes().getMasterNodeId(), notNullValue());
|
assertThat(client().admin().cluster().prepareState().setMasterNodeTimeout("1s").get().getState().nodes().getMasterNodeId(),
|
||||||
|
notNullValue());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -45,7 +45,8 @@ public class AzureSimpleTests extends AbstractAzureComputeServiceTestCase {
|
||||||
|
|
||||||
logger.info("--> start one node");
|
logger.info("--> start one node");
|
||||||
internalCluster().startNode(settings);
|
internalCluster().startNode(settings);
|
||||||
assertThat(client().admin().cluster().prepareState().setMasterNodeTimeout("1s").execute().actionGet().getState().nodes().getMasterNodeId(), notNullValue());
|
assertThat(client().admin().cluster().prepareState().setMasterNodeTimeout("1s").get().getState().nodes().getMasterNodeId(),
|
||||||
|
notNullValue());
|
||||||
|
|
||||||
// We expect having 1 node as part of the cluster, let's test that
|
// We expect having 1 node as part of the cluster, let's test that
|
||||||
checkNumberOfNodes(1);
|
checkNumberOfNodes(1);
|
||||||
|
@ -58,7 +59,8 @@ public class AzureSimpleTests extends AbstractAzureComputeServiceTestCase {
|
||||||
|
|
||||||
logger.info("--> start one node");
|
logger.info("--> start one node");
|
||||||
internalCluster().startNode(settings);
|
internalCluster().startNode(settings);
|
||||||
assertThat(client().admin().cluster().prepareState().setMasterNodeTimeout("1s").execute().actionGet().getState().nodes().getMasterNodeId(), notNullValue());
|
assertThat(client().admin().cluster().prepareState().setMasterNodeTimeout("1s").get().getState().nodes().getMasterNodeId(),
|
||||||
|
notNullValue());
|
||||||
|
|
||||||
// We expect having 1 node as part of the cluster, let's test that
|
// We expect having 1 node as part of the cluster, let's test that
|
||||||
checkNumberOfNodes(1);
|
checkNumberOfNodes(1);
|
||||||
|
|
|
@ -46,11 +46,13 @@ public class AzureTwoStartedNodesTests extends AbstractAzureComputeServiceTestCa
|
||||||
|
|
||||||
logger.info("--> start first node");
|
logger.info("--> start first node");
|
||||||
internalCluster().startNode(settings);
|
internalCluster().startNode(settings);
|
||||||
assertThat(client().admin().cluster().prepareState().setMasterNodeTimeout("1s").execute().actionGet().getState().nodes().getMasterNodeId(), notNullValue());
|
assertThat(client().admin().cluster().prepareState().setMasterNodeTimeout("1s").get().getState().nodes().getMasterNodeId(),
|
||||||
|
notNullValue());
|
||||||
|
|
||||||
logger.info("--> start another node");
|
logger.info("--> start another node");
|
||||||
internalCluster().startNode(settings);
|
internalCluster().startNode(settings);
|
||||||
assertThat(client().admin().cluster().prepareState().setMasterNodeTimeout("1s").execute().actionGet().getState().nodes().getMasterNodeId(), notNullValue());
|
assertThat(client().admin().cluster().prepareState().setMasterNodeTimeout("1s").get().getState().nodes().getMasterNodeId(),
|
||||||
|
notNullValue());
|
||||||
|
|
||||||
// We expect having 2 nodes as part of the cluster, let's test that
|
// We expect having 2 nodes as part of the cluster, let's test that
|
||||||
checkNumberOfNodes(2);
|
checkNumberOfNodes(2);
|
||||||
|
@ -64,11 +66,13 @@ public class AzureTwoStartedNodesTests extends AbstractAzureComputeServiceTestCa
|
||||||
|
|
||||||
logger.info("--> start first node");
|
logger.info("--> start first node");
|
||||||
internalCluster().startNode(settings);
|
internalCluster().startNode(settings);
|
||||||
assertThat(client().admin().cluster().prepareState().setMasterNodeTimeout("1s").execute().actionGet().getState().nodes().getMasterNodeId(), notNullValue());
|
assertThat(client().admin().cluster().prepareState().setMasterNodeTimeout("1s").get().getState().nodes().getMasterNodeId(),
|
||||||
|
notNullValue());
|
||||||
|
|
||||||
logger.info("--> start another node");
|
logger.info("--> start another node");
|
||||||
internalCluster().startNode(settings);
|
internalCluster().startNode(settings);
|
||||||
assertThat(client().admin().cluster().prepareState().setMasterNodeTimeout("1s").execute().actionGet().getState().nodes().getMasterNodeId(), notNullValue());
|
assertThat(client().admin().cluster().prepareState().setMasterNodeTimeout("1s").get().getState().nodes().getMasterNodeId(),
|
||||||
|
notNullValue());
|
||||||
|
|
||||||
// We expect having 2 nodes as part of the cluster, let's test that
|
// We expect having 2 nodes as part of the cluster, let's test that
|
||||||
checkNumberOfNodes(2);
|
checkNumberOfNodes(2);
|
||||||
|
|
Loading…
Reference in New Issue