RFR: 8202117: com/sun/jndi/ldap/RemoveNamingListenerTest.java fails intermittently: Connection reset
vyommani at gmail.com
Mon Mar 16 09:07:36 UTC 2020
looks good to me.
On Mon, Mar 16, 2020 at 12:59 PM Chris Yin <xu.y.yin at 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:
> > On 13 Mar 2020, at 7:51 PM, Daniel Fuchs <daniel.fuchs at oracle.com>
> > 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
More information about the core-libs-dev