You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@directory.apache.org by se...@apache.org on 2018/07/14 19:37:09 UTC

[directory-server] branch master updated: Fix test with java 9/10/11, behaviour of LdapContext.reconnect() has changed

This is an automated email from the ASF dual-hosted git repository.

seelmann pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/directory-server.git


The following commit(s) were added to refs/heads/master by this push:
     new 8ecbf60  Fix test with java 9/10/11, behaviour of LdapContext.reconnect() has changed
8ecbf60 is described below

commit 8ecbf6030bc6e665ef848135f506448962f0e393
Author: Stefan Seelmann <ma...@stefan-seelmann.de>
AuthorDate: Sat Jul 14 21:36:55 2018 +0200

    Fix test with java 9/10/11, behaviour of LdapContext.reconnect() has changed
---
 .../directory/server/ssl/StartTlsConfidentialityIT.java     | 13 ++++++++++++-
 1 file changed, 12 insertions(+), 1 deletion(-)

diff --git a/server-integ/src/test/java/org/apache/directory/server/ssl/StartTlsConfidentialityIT.java b/server-integ/src/test/java/org/apache/directory/server/ssl/StartTlsConfidentialityIT.java
index 8aae40e..9da7e2e 100644
--- a/server-integ/src/test/java/org/apache/directory/server/ssl/StartTlsConfidentialityIT.java
+++ b/server-integ/src/test/java/org/apache/directory/server/ssl/StartTlsConfidentialityIT.java
@@ -226,7 +226,18 @@ public class StartTlsConfidentialityIT extends AbstractLdapTestUnit
         ctx.addToEnvironment( Context.SECURITY_PRINCIPAL, "uid=admin,ou=system" );
         ctx.addToEnvironment( Context.SECURITY_CREDENTIALS, "secret" );
         ctx.addToEnvironment( Context.SECURITY_AUTHENTICATION, "simple" );
-        ctx.reconnect( null );
+
+        /*
+         * Since Java 9 behavior of LdapContext.reconnect() changed. It no longer uses the existing
+         * physical connection but always creates a new one, hence previous StartTLS is not established.
+         * 
+         * However calling reconnect explicitly is not mandatory, addToEnvironment causes bind
+         * with the next operation.
+         * 
+         * Issue: https://bugs.openjdk.java.net/browse/JDK-8059009
+         * Commit: http://hg.openjdk.java.net/jdk9/jdk9/jdk/rev/021b47694183
+         */
+        //ctx.reconnect( null );
 
         // -------------------------------------------------------------------
         // do a search and confirm