Add CI smoke tests for the addrate/authrate/modrate/searchrate tools#658
Open
vharseko wants to merge 2 commits into
Open
Add CI smoke tests for the addrate/authrate/modrate/searchrate tools#658vharseko wants to merge 2 commits into
vharseko wants to merge 2 commits into
Conversation
The four LDAP load-testing tools shipped in opendj-ldap-toolkit are built
and packaged on every CI run but were never executed, so a regression in
their launcher scripts, classpath, or argument parsing could ship undetected.
Run each tool against the freshly set-up server (LDAPS 1636, --trustAll) in
the "Test on Unix" and "Test on Windows" steps, right after the existing
5000-user verification while the server is still online:
- searchrate: subtree search by random uid=user.N
- authrate: direct binds as the sample users (userPassword=password)
- modrate: description replace on random users
- addrate: add/delete with a small inline MakeLDIF template
(collision-free uid=addrate.N, FIFO delete + purge on exit
so the sample-user count is preserved)
Concurrency is via -c connections with -t 1 (multi-thread mode would require
--noRebind); authrate takes no -t. Pass/fail is by exit code: Unix relies on
set -eo pipefail, Windows adds explicit $LASTEXITCODE checks since the step
runs in PowerShell.
maximthomas
approved these changes
Jun 24, 2026
…output in CI
The searchrate/authrate/modrate/addrate .bat launchers delegated to
_client-script.bat via "call ... %*". CALL performs an extra percent-expansion
pass that strips the lone '%' from a Java format token, so on Windows "%d" was
turned into "d" before reaching the JVM. As a result the rate tools received
"uid=user.d" instead of a generated number: every bind/modify failed, searches
matched nothing, and modrate ran unbounded until the runner exhausted its
ephemeral ports ("Connect Error: Address already in use"). Chain to
_client-script.bat without CALL so "%*" is expanded only once and "%d" reaches
the tool intact. Only the four rate tools are affected (they are the only ones
passing Java format strings via -g); the shared launcher is untouched.
CI rate-tool smoke tests (.github/workflows/build.yml):
- drop -S so all four tools print the bordered table instead of CSV;
- use a plain "%d" on both Unix and Windows (the launcher fix removes the need
for the fragile "%%d" escaping);
- remove the spaces from the modrate modification string so the trailing
argument survives batch re-parsing;
- print an echo / Write-Host label before each tool so the log clearly
delimits each block.
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.
Summary
Adds CI smoke tests for the four LDAP load-testing tools shipped in
opendj-ldap-toolkit—addrate,authrate,modrate, andsearchrate. These tools are built and packaged into the server distribution on every CI run but were never executed, so a regression in their launcher scripts, classpath, argument parsing, or connection handling could ship undetected.What changed
Both the Test on Unix and Test on Windows steps in
.github/workflows/build.ymlnow run each tool against the freshly set-up server, right after the existing 5000-user verification while the server is still online (LDAPS on port 1636,--trustAll):searchrateuid=user.NauthrateuserPassword=password)modratedescriptionreplace on random usersaddrateaddrateuses an inline, collision-free template (uid=addrate.N, no external resource files) with-C fifodelete + purge-on-exit, so the sample-user count is left unchanged for the steps that follow.Design notes
--trustAll, matching the surroundingldapsearchchecks.-c 4 -t 1(multi-thread-per-connection mode would require--noRebind);authratedoes not accept-t.-m 2000so the tools exit deterministically.set -eo pipefail; the Windows step runs in PowerShell, so each command has an explicit$LASTEXITCODEcheck.Testing
addrateparses its template successfully (each reaches the connection stage).