Remove line-length violations in SmokeTestClientIT
This commit removes the line-length violations in SmokeTestClientIT.java and removes this file from the list of suppressions.
This commit is contained in:
parent
7930dcad89
commit
6b461a1458
|
@ -3947,7 +3947,6 @@
|
|||
<suppress files="qa[/\\]evil-tests[/\\]src[/\\]test[/\\]java[/\\]org[/\\]elasticsearch[/\\]plugins[/\\]RemovePluginCommandTests.java" checks="LineLength" />
|
||||
<suppress files="qa[/\\]evil-tests[/\\]src[/\\]test[/\\]java[/\\]org[/\\]elasticsearch[/\\]tribe[/\\]TribeUnitTests.java" checks="LineLength" />
|
||||
<suppress files="qa[/\\]smoke-test-client[/\\]src[/\\]test[/\\]java[/\\]org[/\\]elasticsearch[/\\]smoketest[/\\]ESSmokeClientTestCase.java" checks="LineLength" />
|
||||
<suppress files="qa[/\\]smoke-test-client[/\\]src[/\\]test[/\\]java[/\\]org[/\\]elasticsearch[/\\]smoketest[/\\]SmokeTestClientIT.java" checks="LineLength" />
|
||||
<suppress files="qa[/\\]smoke-test-http[/\\]src[/\\]test[/\\]java[/\\]org[/\\]elasticsearch[/\\]http[/\\]ContextAndHeaderTransportIT.java" checks="LineLength" />
|
||||
<suppress files="qa[/\\]smoke-test-http[/\\]src[/\\]test[/\\]java[/\\]org[/\\]elasticsearch[/\\]http[/\\]CorsRegexIT.java" checks="LineLength" />
|
||||
<suppress files="qa[/\\]smoke-test-http[/\\]src[/\\]test[/\\]java[/\\]org[/\\]elasticsearch[/\\]http[/\\]DeprecationHttpIT.java" checks="LineLength" />
|
||||
|
|
|
@ -32,21 +32,25 @@ public class SmokeTestClientIT extends ESSmokeClientTestCase {
|
|||
* Check that we are connected to a cluster named "elasticsearch".
|
||||
*/
|
||||
public void testSimpleClient() {
|
||||
Client client = getClient();
|
||||
final Client client = getClient();
|
||||
|
||||
// START SNIPPET: java-doc-admin-cluster-health
|
||||
ClusterHealthResponse health = client.admin().cluster().prepareHealth().setWaitForYellowStatus().get();
|
||||
String clusterName = health.getClusterName();
|
||||
int numberOfNodes = health.getNumberOfNodes();
|
||||
final ClusterHealthResponse health =
|
||||
client.admin().cluster().prepareHealth().setWaitForYellowStatus().get();
|
||||
final String clusterName = health.getClusterName();
|
||||
final int numberOfNodes = health.getNumberOfNodes();
|
||||
// END SNIPPET: java-doc-admin-cluster-health
|
||||
assertThat("cluster [" + clusterName + "] should have at least 1 node", numberOfNodes, greaterThan(0));
|
||||
assertThat(
|
||||
"cluster [" + clusterName + "] should have at least 1 node",
|
||||
numberOfNodes,
|
||||
greaterThan(0));
|
||||
}
|
||||
|
||||
/**
|
||||
* Create an index and index some docs
|
||||
*/
|
||||
public void testPutDocument() {
|
||||
Client client = getClient();
|
||||
final Client client = getClient();
|
||||
|
||||
// START SNIPPET: java-doc-index-doc-simple
|
||||
client.prepareIndex(index, "doc", "1") // Index, Type, Id
|
||||
|
@ -60,7 +64,7 @@ public class SmokeTestClientIT extends ESSmokeClientTestCase {
|
|||
// END SNIPPET: java-doc-admin-indices-refresh
|
||||
|
||||
// START SNIPPET: java-doc-search-simple
|
||||
SearchResponse searchResponse = client.prepareSearch(index).get();
|
||||
final SearchResponse searchResponse = client.prepareSearch(index).get();
|
||||
assertThat(searchResponse.getHits().getTotalHits(), is(1L));
|
||||
// END SNIPPET: java-doc-search-simple
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue