Skip to content

Conversation

@jasontedor
Copy link
Member

This commit adds an assumption to SmokeTestClientIT tests on JDK 9. The
underlying issue is that Netty attempts to access sun.nio.ch but this
package is not exported from java.base on JDK 9. This throws an uncaught
InaccessibleObjectException causing the test to fail. This assumption
can be removed when Netty 4.1.6 is released as it will include a fix for
this scenario.

Relates #20251, netty/netty#5778

This commit adds an assumption to SmokeTestClientIT tests on JDK 9. The
underlying issue is that Netty attempts to access sun.nio.ch but this
package is not exported from java.base on JDK 9. This throws an uncaught
InaccessibleObjectException causing the test to fail. This assumption
can be removed when Netty 4.1.6 is released as it will include a fix for
this scenario.
@jasontedor jasontedor added >test Issues or PRs that are addressing/adding tests review :Distributed Coordination/Network Http and internode communication implementations v5.0.0-beta1 labels Aug 31, 2016
*/
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.

@nik9000
Copy link
Member

nik9000 commented Aug 31, 2016

LGTM. Left a suggestion that you can ignore if you like.

@jasontedor jasontedor merged commit 5877cb2 into elastic:master Aug 31, 2016
@jasontedor jasontedor deleted the skip-smoke-test-client-jdk-9 branch August 31, 2016 18:57
@jasontedor
Copy link
Member Author

Thanks @nik9000!

jasontedor added a commit that referenced this pull request Mar 27, 2017
These tests were disabled due to an issue in Netty which has since been
resolved and integrated into Elasticsearch.

Relates #20260
jasontedor added a commit that referenced this pull request Mar 28, 2017
These tests were disabled due to an issue in Netty which has since been
resolved and integrated into Elasticsearch.

Relates #20260
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

:Distributed Coordination/Network Http and internode communication implementations >test Issues or PRs that are addressing/adding tests v5.0.0-beta1

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants