Run the LDAP connector tests against an embedded OpenDJ#101
Open
vharseko wants to merge 1 commit into
Open
Conversation
The module had surefire skip=true since the ForgeRock era, so none of its tests ran, and LdapConnectorTestBase expected a pre-built OpenDS instance on the test classpath that is no longer in the repository. Set the instance up at run time from the OpenDJ distribution archive instead: configure it, import data.ldif and MakeLDIF-generated Big Company entries, enable replication so it serves the external change log, then restore a pristine copy for each test that asks for a restart. 159 tests now run, up from none. Bump OpenDJ to 5.1.2-SNAPSHOT, which carries the fix for cn=changelog searches failing when aliases are dereferenced (OpenDJ #737); the sync tests read that change log over JNDI, which dereferences aliases by default. Update the expectations that had drifted while the tests were skipped: the server is OpenDJ rather than OpenDS/Sun DSEE, useBlocks defaults to false so searches over the size limit have to ask for blocks, add maps to CREATE and modify/modrdn to UPDATE since the ICF 1.4 upgrade, an add is attributed to creatorsName rather than modifiersName, sync() hands its token back through a SyncTokenResultsHandler, __SERVER_INFO__ is not an LDAP object class, and OpenDJ computes VLV offsets exactly so the Sun DSEE overlap workaround cannot be exercised. testSyncNotSupported becomes testSyncSupported: OpenDJ serves the change log, so the connector reports sync as supported, now proven end to end. Also fix BlindTrustManager.getAcceptedIssuers() returning null, which aborts the TLS handshake once the provider is installed JVM-wide, and drop the reference to a non-existent testng.xml suite file. No product code is changed.
vharseko
force-pushed
the
ldap-connector-tests-opendj
branch
from
July 16, 2026 15:01
01c280c to
d263bd4
Compare
maximthomas
approved these changes
Jul 17, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
The LDAP connector's tests never ran: surefire had
skip=truesince theForgeRock era, and
LdapConnectorTestBaseexpected a pre-built OpenDSinstance on the test classpath that is no longer in the repository. This
sets the instance up at run time from the OpenDJ distribution archive, so
159 tests now run (up from none) and
mvn verifyon the module is green.No product code is changed — only tests, test resources, and pom wiring.
How the embedded instance is built
LdapConnectorTestBasenow, once per JVM:opendj-server-legacy:slimdistribution archive (a new test-scoped dependency), on run-time-picked
free ports so a directory server already on 2389/2636 does not clash.
test-config.ldif(password policies, a VLV index, replicationfor the external change log, the ACIs the tests need) before importing,
so entries are accepted and indexes populated.
data.ldifplus 2000 Big Company accounts generated by MakeLDIFfrom
bigcompany.template.test that asks for a server restart — building the instance once is far
too slow to repeat per test.
SunDSTestBasenow drives the same embedded OpenDJ instead of an externalSun DSEE, so the change-log sync and VLV tests run too.
Dependency note
This bumps
opendj.versionto 5.1.2-SNAPSHOT, which carries the fix forOpenDJ #737
(cn=changelog searches failing when aliases are dereferenced — the sync
tests read the change log over JNDI, which dereferences aliases by default).
The version goes through a single
opendj.versionproperty; it should bemoved to the released 5.1.2 once that is out.
Stale expectations fixed along the way
The tests had drifted during the years they were skipped:
useBlocksdefaults tofalse, so searches past the size limit must askfor blocks
add→CREATE,modify/modrdn→UPDATEsince the ICF 1.4 upgradecreatorsName, notmodifiersNamesync()returns its token through aSyncTokenResultsHandler__SERVER_INFO__is a synthetic object class with no attributescan't be exercised — that test now just checks VLV paging returns every
entry
testSyncNotSupportedbecomestestSyncSupported: OpenDJ serves thechange log, so the connector reports sync as supported, now proven
end to end by the change-log sync tests
Also fixes
BlindTrustManager.getAcceptedIssuers()returningnull, whichaborts the TLS handshake once the provider is installed JVM-wide, and drops
a reference to a non-existent
testng.xmlsuite file.Test
mvn verify -pl OpenICF-ldap-connector→ 159 run, 0 failures, 0 skipped.