You are viewing a plain text version of this content. The canonical link for it is here.
Posted to oak-commits@jackrabbit.apache.org by md...@apache.org on 2017/02/25 20:12:17 UTC
svn commit: r1784400 -
/jackrabbit/oak/branches/1.0/oak-auth-ldap/src/test/java/org/apache/jackrabbit/oak/security/authentication/ldap/LdapProviderTest.java
Author: mduerig
Date: Sat Feb 25 20:12:17 2017
New Revision: 1784400
URL: http://svn.apache.org/viewvc?rev=1784400&view=rev
Log:
OAK-5843: Test failure: testGetUserByRef LdapProviderTest
Added null check in test teardown after failed assumption in test setup
Modified:
jackrabbit/oak/branches/1.0/oak-auth-ldap/src/test/java/org/apache/jackrabbit/oak/security/authentication/ldap/LdapProviderTest.java
Modified: jackrabbit/oak/branches/1.0/oak-auth-ldap/src/test/java/org/apache/jackrabbit/oak/security/authentication/ldap/LdapProviderTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/branches/1.0/oak-auth-ldap/src/test/java/org/apache/jackrabbit/oak/security/authentication/ldap/LdapProviderTest.java?rev=1784400&r1=1784399&r2=1784400&view=diff
==============================================================================
--- jackrabbit/oak/branches/1.0/oak-auth-ldap/src/test/java/org/apache/jackrabbit/oak/security/authentication/ldap/LdapProviderTest.java (original)
+++ jackrabbit/oak/branches/1.0/oak-auth-ldap/src/test/java/org/apache/jackrabbit/oak/security/authentication/ldap/LdapProviderTest.java Sat Feb 25 20:12:17 2017
@@ -17,6 +17,12 @@
package org.apache.jackrabbit.oak.security.authentication.ldap;
+import static junit.framework.Assert.assertEquals;
+import static junit.framework.Assert.assertNotNull;
+import static junit.framework.Assert.assertNull;
+import static junit.framework.Assert.assertTrue;
+import static junit.framework.Assert.fail;
+
import java.io.InputStream;
import java.util.Arrays;
import java.util.Collections;
@@ -41,12 +47,6 @@ import org.junit.Before;
import org.junit.BeforeClass;
import org.junit.Test;
-import static junit.framework.Assert.assertEquals;
-import static junit.framework.Assert.assertNotNull;
-import static junit.framework.Assert.assertNull;
-import static junit.framework.Assert.assertTrue;
-import static junit.framework.Assert.fail;
-
public class LdapProviderTest {
protected static final InternalLdapServer LDAP_SERVER = new InternalLdapServer();
@@ -93,8 +93,10 @@ public class LdapProviderTest {
if (!USE_COMMON_LDAP_FIXTURE) {
LDAP_SERVER.tearDown();
}
- idp.close();
- idp = null;
+ if (idp != null) {
+ idp.close();
+ idp = null;
+ }
}
protected LdapIdentityProvider createIDP() {