[Security][Tests] Print LDAP reconnect stacktrace on fail
Original commit: elastic/x-pack-elasticsearch@18f235197c
This commit is contained in:
parent
bce8d6f9e6
commit
a57999e1e1
|
@ -9,6 +9,8 @@ import com.unboundid.ldap.sdk.LDAPConnection;
|
|||
import com.unboundid.ldap.sdk.LDAPConnectionPool;
|
||||
import com.unboundid.ldap.sdk.LDAPException;
|
||||
import com.unboundid.ldap.sdk.LDAPInterface;
|
||||
|
||||
import org.elasticsearch.ExceptionsHelper;
|
||||
import org.elasticsearch.common.settings.Settings;
|
||||
import org.elasticsearch.env.Environment;
|
||||
import org.elasticsearch.env.TestEnvironment;
|
||||
|
@ -100,7 +102,8 @@ public class AbstractActiveDirectoryIntegTests extends ESTestCase {
|
|||
}
|
||||
}
|
||||
} catch (LDAPException e) {
|
||||
fail("Connection is not valid. It will not work on follow referral flow.");
|
||||
fail("Connection is not valid. It will not work on follow referral flow." +
|
||||
System.lineSeparator() + ExceptionsHelper.stackTrace(e));
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
|
|
@ -12,6 +12,8 @@ import com.unboundid.ldap.sdk.LDAPConnectionPool;
|
|||
import com.unboundid.ldap.sdk.LDAPException;
|
||||
import com.unboundid.ldap.sdk.LDAPInterface;
|
||||
import com.unboundid.ldap.sdk.LDAPURL;
|
||||
|
||||
import org.elasticsearch.ExceptionsHelper;
|
||||
import org.elasticsearch.action.support.PlainActionFuture;
|
||||
import org.elasticsearch.common.Strings;
|
||||
import org.elasticsearch.common.settings.SecureString;
|
||||
|
@ -182,7 +184,8 @@ public abstract class LdapTestCase extends ESTestCase {
|
|||
}
|
||||
}
|
||||
} catch (LDAPException e) {
|
||||
fail("Connection is not valid. It will not work on follow referral flow.");
|
||||
fail("Connection is not valid. It will not work on follow referral flow." +
|
||||
System.lineSeparator() + ExceptionsHelper.stackTrace(e));
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue