Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ZOOKEEPER-3455: fix UnifiedServerSocketTest on jdk 13 #1029

Closed
wants to merge 1 commit into from
Closed

ZOOKEEPER-3455: fix UnifiedServerSocketTest on jdk 13 #1029

wants to merge 1 commit into from

Conversation

symat
Copy link
Contributor

@symat symat commented Jul 30, 2019

The UnifiedServerSocketTest.testConnectWithoutSSLToStrictServer fails on OpenJDK 13 because in the new default socket implementation (https://openjdk.java.net/jeps/353) the NioSocketImpl.getInputStream.read() behaves differently than the old SocketInputStream.read().

A workaround could be to execute the tests using the -Djdk.net.usePlainSocketImpl system property (hardcoding it in the maven / ant configs), which enforces the usage of the old socket implementation in JDK 13. But I preferred instead to make the test compatible with both older and newer JDK, so it should succeed even if someone is executing it outside of our build environment.

@eolivelli
Copy link
Contributor

Thank you very much @symat I think we should report this behaviour change to the nio-dev mailing list as soon as possible.
If you prefer I can send the email

@eolivelli eolivelli requested a review from anmolnar July 30, 2019 15:11
@symat
Copy link
Contributor Author

symat commented Jul 30, 2019

Thank you very much @symat I think we should report this behaviour change to the nio-dev mailing list as soon as possible.
If you prefer I can send the email

Thanks! I am not sure about the address of the nio-dev mailing list, so it would be great if you could send it :) Please CC me as well.

In the "Risks and Assumptions" chapter on https://openjdk.java.net/jeps/353 there are already listed some similar differences, but not exactly like this one.

@eolivelli
Copy link
Contributor

What's your email address ? @symat

@eolivelli
Copy link
Contributor

You should subscribe to https://mail.openjdk.java.net/mailman/listinfo/nio-dev

@eolivelli
Copy link
Contributor

Copy link
Contributor

@anmolnar anmolnar left a comment

Choose a reason for hiding this comment

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

+1 Great catch @symat !

@symat
Copy link
Contributor Author

symat commented Jul 31, 2019

This is the email I sent
https://mail.openjdk.java.net/pipermail/nio-dev/2019-July/006409.html

Thanks Enrico for sending the mail! I registered on the mailing list and sent some stacktraces, hope it will help. https://mail.openjdk.java.net/pipermail/nio-dev/2019-July/006413.html

@asfgit asfgit closed this in 6b6ff1d Aug 2, 2019
asfgit pushed a commit that referenced this pull request Aug 2, 2019
The `UnifiedServerSocketTest.testConnectWithoutSSLToStrictServer` fails on OpenJDK 13 because in the new default socket implementation (https://openjdk.java.net/jeps/353) the `NioSocketImpl.getInputStream.read()` behaves differently than the old `SocketInputStream.read()`.

A workaround could be to execute the tests using the `-Djdk.net.usePlainSocketImpl` system property (hardcoding it in the maven / ant configs), which enforces the usage of the old socket implementation in JDK 13. But I preferred instead to make the test compatible with both older and newer JDK, so it should succeed even if someone is executing it outside of our build environment.

Author: Mate Szalay-Beko <szalay.beko.mate@gmail.com>

Reviewers: andor@apache.org

Closes #1029 from symat/master

(cherry picked from commit 6b6ff1d)
Signed-off-by: Andor Molnar <andor@apache.org>
@anmolnar
Copy link
Contributor

anmolnar commented Aug 2, 2019

Merged to master and 3.5 branches. Thanks @symat !

stickyhipp pushed a commit to stickyhipp/zookeeper that referenced this pull request Aug 19, 2020
The `UnifiedServerSocketTest.testConnectWithoutSSLToStrictServer` fails on OpenJDK 13 because in the new default socket implementation (https://openjdk.java.net/jeps/353) the `NioSocketImpl.getInputStream.read()` behaves differently than the old `SocketInputStream.read()`.

A workaround could be to execute the tests using the `-Djdk.net.usePlainSocketImpl` system property (hardcoding it in the maven / ant configs), which enforces the usage of the old socket implementation in JDK 13. But I preferred instead to make the test compatible with both older and newer JDK, so it should succeed even if someone is executing it outside of our build environment.

Author: Mate Szalay-Beko <szalay.beko.mate@gmail.com>

Reviewers: andor@apache.org

Closes apache#1029 from symat/master
RokLenarcic pushed a commit to RokLenarcic/zookeeper that referenced this pull request Aug 31, 2022
The `UnifiedServerSocketTest.testConnectWithoutSSLToStrictServer` fails on OpenJDK 13 because in the new default socket implementation (https://openjdk.java.net/jeps/353) the `NioSocketImpl.getInputStream.read()` behaves differently than the old `SocketInputStream.read()`.

A workaround could be to execute the tests using the `-Djdk.net.usePlainSocketImpl` system property (hardcoding it in the maven / ant configs), which enforces the usage of the old socket implementation in JDK 13. But I preferred instead to make the test compatible with both older and newer JDK, so it should succeed even if someone is executing it outside of our build environment.

Author: Mate Szalay-Beko <szalay.beko.mate@gmail.com>

Reviewers: andor@apache.org

Closes apache#1029 from symat/master
RokLenarcic pushed a commit to RokLenarcic/zookeeper that referenced this pull request Sep 3, 2022
The `UnifiedServerSocketTest.testConnectWithoutSSLToStrictServer` fails on OpenJDK 13 because in the new default socket implementation (https://openjdk.java.net/jeps/353) the `NioSocketImpl.getInputStream.read()` behaves differently than the old `SocketInputStream.read()`.

A workaround could be to execute the tests using the `-Djdk.net.usePlainSocketImpl` system property (hardcoding it in the maven / ant configs), which enforces the usage of the old socket implementation in JDK 13. But I preferred instead to make the test compatible with both older and newer JDK, so it should succeed even if someone is executing it outside of our build environment.

Author: Mate Szalay-Beko <szalay.beko.mate@gmail.com>

Reviewers: andor@apache.org

Closes apache#1029 from symat/master
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants