mirror of
https://github.com/honeymoose/OpenSearch.git
synced 2025-03-01 16:39:11 +00:00
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[/\\]plugins[/\\]RemovePluginCommandTests.java" checks="LineLength" />
|
||||||
<suppress files="qa[/\\]evil-tests[/\\]src[/\\]test[/\\]java[/\\]org[/\\]elasticsearch[/\\]tribe[/\\]TribeUnitTests.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[/\\]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[/\\]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[/\\]CorsRegexIT.java" checks="LineLength" />
|
||||||
<suppress files="qa[/\\]smoke-test-http[/\\]src[/\\]test[/\\]java[/\\]org[/\\]elasticsearch[/\\]http[/\\]DeprecationHttpIT.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".
|
* Check that we are connected to a cluster named "elasticsearch".
|
||||||
*/
|
*/
|
||||||
public void testSimpleClient() {
|
public void testSimpleClient() {
|
||||||
Client client = getClient();
|
final Client client = getClient();
|
||||||
|
|
||||||
// START SNIPPET: java-doc-admin-cluster-health
|
// START SNIPPET: java-doc-admin-cluster-health
|
||||||
ClusterHealthResponse health = client.admin().cluster().prepareHealth().setWaitForYellowStatus().get();
|
final ClusterHealthResponse health =
|
||||||
String clusterName = health.getClusterName();
|
client.admin().cluster().prepareHealth().setWaitForYellowStatus().get();
|
||||||
int numberOfNodes = health.getNumberOfNodes();
|
final String clusterName = health.getClusterName();
|
||||||
|
final int numberOfNodes = health.getNumberOfNodes();
|
||||||
// END SNIPPET: java-doc-admin-cluster-health
|
// 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
|
* Create an index and index some docs
|
||||||
*/
|
*/
|
||||||
public void testPutDocument() {
|
public void testPutDocument() {
|
||||||
Client client = getClient();
|
final Client client = getClient();
|
||||||
|
|
||||||
// START SNIPPET: java-doc-index-doc-simple
|
// START SNIPPET: java-doc-index-doc-simple
|
||||||
client.prepareIndex(index, "doc", "1") // Index, Type, Id
|
client.prepareIndex(index, "doc", "1") // Index, Type, Id
|
||||||
@ -60,7 +64,7 @@ public class SmokeTestClientIT extends ESSmokeClientTestCase {
|
|||||||
// END SNIPPET: java-doc-admin-indices-refresh
|
// END SNIPPET: java-doc-admin-indices-refresh
|
||||||
|
|
||||||
// START SNIPPET: java-doc-search-simple
|
// 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));
|
assertThat(searchResponse.getHits().getTotalHits(), is(1L));
|
||||||
// END SNIPPET: java-doc-search-simple
|
// END SNIPPET: java-doc-search-simple
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user