Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@

package org.elasticsearch.smoketest;

import org.apache.lucene.util.Constants;
import org.elasticsearch.action.admin.cluster.health.ClusterHealthResponse;
import org.elasticsearch.action.search.SearchResponse;
import org.elasticsearch.client.Client;
Expand All @@ -27,10 +28,19 @@
import static org.hamcrest.Matchers.greaterThan;

public class SmokeTestClientIT extends ESSmokeClientTestCase {

// needed to avoid the test suite from failing for having no tests
// TODO: remove when Netty 4.1.5 is upgraded to Netty 4.1.6 including https://github.com/netty/netty/pull/5778
public void testSoThatTestsDoNotFail() {

}

/**
* Check that we are connected to a cluster named "elasticsearch".
*/
public void testSimpleClient() {
// TODO: remove when Netty 4.1.5 is upgraded to Netty 4.1.6 including https://github.com/netty/netty/pull/5778
assumeFalse("JDK is JDK 9", Constants.JRE_IS_MINIMUM_JAVA9);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Any way you can assert the netty version in here?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@nik9000 I looked into it because we are accumulating a little bit of debt here to be paid when 4.1.6 is released. Here's the problem. This test uses a randomized client (sometimes it uses the mock transport plugin, sometimes Netty 4, and sometimes the default (Netty 4, this should be fixed so the randomization selects Netty 3). So, the first thing that would have to be done is expose which transport type the client is using. Then, we have to tear open the netty-common jar and read the jar manifest to parse out the netty-common.version. This seems like way more trouble than it's worth to me?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this should be fixed so the randomization selects Netty 3

I opened #20265 for this point.

Client client = getClient();

// START SNIPPET: java-doc-admin-cluster-health
Expand All @@ -45,6 +55,8 @@ public void testSimpleClient() {
* Create an index and index some docs
*/
public void testPutDocument() {
// TODO: remove when Netty 4.1.5 is upgraded to Netty 4.1.6 including https://github.com/netty/netty/pull/5778
assumeFalse("JDK is JDK 9", Constants.JRE_IS_MINIMUM_JAVA9);
Client client = getClient();

// START SNIPPET: java-doc-index-doc-simple
Expand All @@ -63,5 +75,6 @@ public void testPutDocument() {
assertThat(searchResponse.getHits().getTotalHits(), is(1L));
// END SNIPPET: java-doc-search-simple
}

}