[15] RFR: 8202117: com/sun/jndi/ldap/RemoveNamingListenerTest.java fails intermittently: Connection reset
Hello, Please review following changes to try to fix intermittent failure of test com/sun/jndi/ldap/RemoveNamingListenerTest.java, thanks Bug: https://bugs.openjdk.java.net/browse/JDK-8202117 Webrev: http://cr.openjdk.java.net/~xyin/8202117/webrev.00/ According to failure logs, test already run done and give a pass message, but test framework caught “java.lang.RuntimeException: java.net.SocketException: Connection reset” from other thread during test end, go through the test code, LDAPServerHandler thread may throw such exception in specific case. This change will replace test itself implemented TestLDAPServer/LDAPServerHandler with customized BaseLdapServer to fix the corner. I had run the changed test on 4 platforms for total 600 times, no failure observed. Thanks, Chris
Hi Chris, Thanks for taking care of this issue, changes looks OK to me. I am happy to see that we are removing the lot's of duplicate "DummyServer" from individual test cases and using the "BaseLdapServer" test-server instead. Thanks, Vyom On Fri, Mar 13, 2020 at 1:59 PM Chris Yin <xu.y.yin@oracle.com> wrote:
Hello,
Please review following changes to try to fix intermittent failure of test com/sun/jndi/ldap/RemoveNamingListenerTest.java, thanks
Bug: https://bugs.openjdk.java.net/browse/JDK-8202117 Webrev: http://cr.openjdk.java.net/~xyin/8202117/webrev.00/
According to failure logs, test already run done and give a pass message, but test framework caught “java.lang.RuntimeException: java.net.SocketException: Connection reset” from other thread during test end, go through the test code, LDAPServerHandler thread may throw such exception in specific case. This change will replace test itself implemented TestLDAPServer/LDAPServerHandler with customized BaseLdapServer to fix the corner. I had run the changed test on 4 platforms for total 600 times, no failure observed.
Thanks, Chris
-- Thanks, Vyom
Hi Chris, This looks fine to me too. Thanks for taking care of this issue. A potential issue I see is that the test might fail if "localhost" does not resolve to the loopback address - but you would likely get a "Connection refused" in that case. One possibility to get that out of the way could be to use the URIBuilder: * @library lib/ /test/lib ... URI providerURI = URIBuilder.newBuilder() .scheme("ldap") .loopback() .port(server.getLocalPort()) .path("/o=example") .build(); ... 59 env.put(Context.PROVIDER_URL, providerURI.toString()); best regards, -- daniel On 13/03/2020 08:28, Chris Yin wrote:
Hello,
Please review following changes to try to fix intermittent failure of test com/sun/jndi/ldap/RemoveNamingListenerTest.java, thanks
Bug: https://bugs.openjdk.java.net/browse/JDK-8202117 Webrev: http://cr.openjdk.java.net/~xyin/8202117/webrev.00/
According to failure logs, test already run done and give a pass message, but test framework caught “java.lang.RuntimeException: java.net.SocketException: Connection reset” from other thread during test end, go through the test code, LDAPServerHandler thread may throw such exception in specific case. This change will replace test itself implemented TestLDAPServer/LDAPServerHandler with customized BaseLdapServer to fix the corner. I had run the changed test on 4 platforms for total 600 times, no failure observed.
Thanks, Chris
Thanks for reviewing, Daniel, Vyom. Hi, Daniel I modified the test as you suggested to cover the potential issue with URIBuilder, many thanks. Updated webrev as below: http://cr.openjdk.java.net/~xyin/8202117/webrev.01/ Regards, Chris
On 13 Mar 2020, at 7:51 PM, Daniel Fuchs <daniel.fuchs@oracle.com> wrote:
Hi Chris,
This looks fine to me too. Thanks for taking care of this issue.
A potential issue I see is that the test might fail if "localhost" does not resolve to the loopback address - but you would likely get a "Connection refused" in that case.
One possibility to get that out of the way could be to use the URIBuilder:
* @library lib/ /test/lib
...
URI providerURI = URIBuilder.newBuilder() .scheme("ldap") .loopback() .port(server.getLocalPort()) .path("/o=example") .build(); ...
59 env.put(Context.PROVIDER_URL, providerURI.toString());
best regards,
-- daniel
On 13/03/2020 08:28, Chris Yin wrote:
Hello, Please review following changes to try to fix intermittent failure of test com/sun/jndi/ldap/RemoveNamingListenerTest.java, thanks Bug: https://bugs.openjdk.java.net/browse/JDK-8202117 Webrev: http://cr.openjdk.java.net/~xyin/8202117/webrev.00/ According to failure logs, test already run done and give a pass message, but test framework caught “java.lang.RuntimeException: java.net.SocketException: Connection reset” from other thread during test end, go through the test code, LDAPServerHandler thread may throw such exception in specific case. This change will replace test itself implemented TestLDAPServer/LDAPServerHandler with customized BaseLdapServer to fix the corner. I had run the changed test on 4 platforms for total 600 times, no failure observed. Thanks, Chris
looks good to me. Vyom On Mon, Mar 16, 2020 at 12:59 PM Chris Yin <xu.y.yin@oracle.com> wrote:
Thanks for reviewing, Daniel, Vyom.
Hi, Daniel
I modified the test as you suggested to cover the potential issue with URIBuilder, many thanks. Updated webrev as below:
http://cr.openjdk.java.net/~xyin/8202117/webrev.01/
Regards, Chris
On 13 Mar 2020, at 7:51 PM, Daniel Fuchs <daniel.fuchs@oracle.com> wrote:
Hi Chris,
This looks fine to me too. Thanks for taking care of this issue.
A potential issue I see is that the test might fail if "localhost" does not resolve to the loopback address - but you would likely get a "Connection refused" in that case.
One possibility to get that out of the way could be to use the URIBuilder:
* @library lib/ /test/lib
...
URI providerURI = URIBuilder.newBuilder() .scheme("ldap") .loopback() .port(server.getLocalPort()) .path("/o=example") .build(); ...
59 env.put(Context.PROVIDER_URL, providerURI.toString());
best regards,
-- daniel
On 13/03/2020 08:28, Chris Yin wrote:
Hello, Please review following changes to try to fix intermittent failure of test com/sun/jndi/ldap/RemoveNamingListenerTest.java, thanks Bug: https://bugs.openjdk.java.net/browse/JDK-8202117 Webrev: http://cr.openjdk.java.net/~xyin/8202117/webrev.00/ According to failure logs, test already run done and give a pass message, but test framework caught “java.lang.RuntimeException: java.net.SocketException: Connection reset” from other thread during test end, go through the test code, LDAPServerHandler thread may throw such exception in specific case. This change will replace test itself implemented TestLDAPServer/LDAPServerHandler with customized BaseLdapServer to fix the corner. I had run the changed test on 4 platforms for total 600 times, no failure observed. Thanks, Chris
-- Thanks, Vyom
Hi Chris, Thanks for that! It looks good to me. best regards, -- daniel On 16/03/2020 07:26, Chris Yin wrote:
Thanks for reviewing, Daniel, Vyom.
Hi, Daniel
I modified the test as you suggested to cover the potential issue with URIBuilder, many thanks. Updated webrev as below:
http://cr.openjdk.java.net/~xyin/8202117/webrev.01/
Regards, Chris
Thank you, Daniel, Vyom Pushed. Regards, Chris
On 18 Mar 2020, at 6:03 PM, Daniel Fuchs <daniel.fuchs@oracle.com> wrote:
Hi Chris,
Thanks for that!
It looks good to me.
best regards,
-- daniel
On 16/03/2020 07:26, Chris Yin wrote:
Thanks for reviewing, Daniel, Vyom. Hi, Daniel I modified the test as you suggested to cover the potential issue with URIBuilder, many thanks. Updated webrev as below: http://cr.openjdk.java.net/~xyin/8202117/webrev.01/ Regards, Chris
participants (3)
-
Chris Yin
-
Daniel Fuchs
-
Vyom Tiwari