Repository navigation
SOLR-18642 Replace BATS with CATS - #5323
Merged
Merged
Conversation
Introduces org.apache.solr.shell in solr/test-framework: a Java harness for
driving Solr's start scripts the way the BATS suites do, with run/status/output,
reusable helpers and automatic cleanup, from one test source that can target
bin/solr under bash and bin\solr.cmd under cmd.exe.
Library (solr/test-framework/src/java/org/apache/solr/shell):
- SolrShellTestCase extends SolrTestCase. Class and method scopes mirror BATS
setup_file and setup; failures snapshot SOLR_HOME plus a command transcript.
- exec: Shell (bash real, cmd a stub), ShellExecutor with file-based I/O and
timeouts, CommandResult with BATS-shaped fluent assertions, ProcessKill.
- env: HarnessEnv resolves per-class directories and a port block; PortBlocks
claims blocks under a file lock so forks cannot overlap.
- session: CliSession holds env, cwd, shell and timeouts, and tracks which
nodes it started via SOLR_PID_DIR so it stops exactly those.
Suites live in solr/packaging/src/test next to the .bats files they port from,
and run via a new 'shellTests' task in both projects. Opt-in by task name like
integrationTests, so no normal build runs them. Classes run in parallel forks,
each with its own SOLR_HOME, SOLR_PID_DIR and ports.
SolrProcessManager gains an optional solr.process.scan.marker. Node discovery is
host-wide by nature, so a test asserting on the set of running nodes also sees a
developer's own Solr or a second suite on the same CI box. When the property is
set, only nodes whose command line carries the marker are discovered; unset, the
default, behaviour is unchanged. The harness sets a per-class marker and starts
its nodes with it via SOLR_OPTS_INTERNAL.
- Reap leaked nodes before wiping the output directory, and run the pre-flight pid check before the SOLR_HOME wipe. SOLR_PID_DIR lives inside SOLR_HOME, so wiping first deleted the only record of a node a hard-killed run left behind, making both the kill path dead code and the orphan unreapable. - Treat a pid file whose process is gone as litter, not a leak. Only a live process means the class failed to clean up. - Consolidate the solr-<port>.pid convention into PidFile, which both the session and the base class were duplicating. - Drop the redundant 'stop --all' before close() at class teardown; it walks the same per-class pid dir, so every node was stopped twice. - Use Lucene's IOUtils.rm instead of a hand-rolled recursive delete. - Decode truncated output leniently; the 10MB cut lands mid-character. - Remove the closed-flag toggling in cleanup, the dead branch in envDiff, and unused patterns and imports.
Three changes from a holistic review of the harness.
Assertions now resolve ${NAME} the same way command lines do. Previously
a line ported from BATS kept working but its assertion did not, and
assert_output --partial "running on port ${SOLR_PORT}" silently looked
for that literal text. Variable handling moves to a shared
exec/Variables, and CommandResult carries the session environment in
place of its picocli flag, which is now derived from it.
Removes @GlobalProcessScope, ProcessScopeLock and SolrProcesses. They
coordinated this run's own forks so that a class could assert on the
host-wide process list, which solr.process.scan.marker now does
properly, on any machine and without serialising anything. They had no
callers left, and the exclusive path was never exercised.
Extracts the Solr-aware helpers out of CliSession into SolrCliHelpers:
collections, config sets, HTTP, log dumps. CliSession keeps environments,
working directories, running commands and cleanup. Tests are unaffected,
reaching them through the same inherited shorthands.
bin/solr dispatches to commons-cli or picocli depending on SOLR_PICOCLI, and the two do not phrase every usage and error message identically, so a test asserting on wording may hold for only one of them. - @EnabledOnCli(Cli.PICOCLI | Cli.COMMONS_CLI) skips a test, or a class, on the other implementation, mirroring @EnabledOnShell. Where only a word differs, CommandResult.assertOutputForCli already keeps one test covering both, which is preferable to skipping half the coverage. - HarnessEnv.cli() is the one place the default is encoded, tracking SolrCLI.main. It flips when that flips. - New deprecated shellTestsCommonsCli task runs the suites against commons-cli, with its own output directory so the two variants do not share SOLR_HOMEs or the port-block counter. To be deleted along with commons-cli in Solr 11. The shellTests configuration is factored into configureShellTestTask, mirroring configureBatsTask next to it.
The harness was parsing SOLR_PID_DIR itself to learn which nodes it had started. SolrProcessManager already does that, and does it better: it knows bin/solr writes solr-<port>.pid holding a PID into SOLR_PID_DIR while bin/solr.cmd writes solr-<port>.port holding a port into %SOLR_TIP%\bin, it resolves either to a PID, and it also finds a node started in the foreground, which writes no file at all. solr-core is already an api dependency of solr-test-framework, so the harness can simply ask it. Scoping comes from the solr.process.scan.marker added earlier: the harness sets it on itself and gets back exactly its own nodes, so the same code path serves both platforms. - New exec/SolrNodes wraps the marker plumbing. MARKER_PREFIX finds the harness' nodes from any run, a full marker finds one scope's. - Deletes exec/PidFile and the Windows-specific pid-file handling it had grown: the file-format difference is not the harness' concern. - Ownership, pre-flight and post-flight all read the process list, each filtered to the class's own port block, which is what keeps them from touching a sibling class's nodes where the underlying record is shared. - Windows still runs one class at a time, but for a narrower reason: bin/solr.cmd implements 'stop --all' over %SOLR_TIP%\bin, so a test calling it would reach a sibling's nodes.
Was a placeholder that wrapped every argument in double quotes and doubled any inner ones. Double quotes do protect & | < > ^ ( ) from cmd's parser, and ! is literal since these scripts never enable delayed expansion. % is the exception: it is expanded even inside double quotes, and a literal one in a batch file is written %%, which a URL carrying an escape like %20 needs. Arguments with none of those characters are now left unquoted. An embedded double quote is refused outright. cmd has no escape for one that survives both its own quote counting and the target program's parser, so the old doubling produced a command that ran but could mean something else. script(bashBody, cmdBody) is the way out for those.
Driven by the first real run on a Windows ARM64 VM, where 10 of the packaging suites' tests ran and one failed. - Decode command output leniently instead of strictly. The failure was a MalformedInputException from Files.readString: bin/solr.cmd output comes back in the console code page, not the chcp 65001 the harness asks for. Nothing guarantees a command's bytes are UTF-8 on any platform, so a replacement character beats losing the test's result. - Implement multi-line cmd scripts. 'call' takes a single command, so a multi-line body - the whole point of script(bash, cmd) - was silently truncated to its first line. - Un-gate the harness' own unit tests from bash. They now run on whichever shell the platform uses, which is the only thing that covers Shell.CMD at all; the few genuinely bash-shaped cases carry @EnabledOnShell, and five new tests cover cmd quoting, percent escaping, the double-quote refusal, multi-line scripts and the case-insensitive environment. - Extract ShellGate so @EnabledOnShell works on a test that drives the harness without needing a distribution, not just on SolrShellTestCase. - Run those unit tests as part of 'check'. They need no distribution and take seconds, and without them a harness regression would only surface in the slow suites. Orphan reaping no longer reads pid files anywhere. The marker now identifies the Gradle task and checkout rather than just the scope, so a run can recognise and kill a node an earlier run of the same task left behind, while leaving another suite's or another checkout's alone. That removes the Groovy pid-file walk from the build, which only ever worked on Unix because the two scripts disagree about the file.
The test round-tripped each argument through a batch variable, which cannot test quoting: cmd expands %VAR% and then re-parses the result, so ARG=a&b turned 'echo %ARG%' into an echo followed by running 'b'. Exit 9009 on Windows. It now passes the argument as argv, which is the path the quoting is actually on, and checks the characters survive rather than an exact match, since cmd's echo prints the quotes quoting adds. Also drops two comments that described cmd.exe support as a placeholder not exercised by CI, which it no longer is.
Ports test_zk.bats to SolrShellZkTest, kept close enough to the original
to compare line by line. Three things differ: files are created with a
new touch() helper rather than the shell's, which cmd.exe lacks; curl
becomes the harness' http() helper; and the symlink test works on a copy
of the config set rather than mutating the distribution, which every
test class shares.
bin/solr.cmd now honours SOLR_PID_DIR, defaulting to %SOLR_TIP%\bin. It
was the only one of the three implementations of this convention not to:
bin/solr has ':"${SOLR_PID_DIR:=$SOLR_TIP/bin}"' and
SolrProcessManager reads solr.pid.dir with the same default, while
solr.cmd hardcoded the directory in five places. The default keeps it
byte-for-byte compatible for anyone not setting the variable. Carries a
TODO to split it into its own JIRA once the harness has been shown to
the community. With it, 'stop --all' is scoped per class on Windows too,
so the Windows fork cap is gone and classes run in parallel there.
Shell.CMD.quote now refuses a caret as it already refused a double
quote. 'call' re-parses its line, so an argument containing ^ arrived
doubled - "a^b" came back as "a^^b" on Windows. Refused rather than
silently mangled, with script(bashBody, cmdBody) as the way to pass one.
Adds CliSession.unset(), which the ported 'env var ZK_HOST is honored'
test needs: bin/solr checks whether SOLR_PORT is set at all, so the test
needs the variable absent rather than empty.
Replaces the \" escaping and %s/%d formatting in the suites with text
blocks and harness-resolved values.
- A session now starts in its own work directory rather than the shared
TEST_OUTPUT_DIR, so a relative path in a command means something per
scope. That alone removed every cd() and most of the path plumbing:
'solr zk cp zk:/ -r "recursive_download/"' needs no Java variable.
- bind(name, value) supplies a value for {{name}} in a command line or
an assertion, for the cases that genuinely come from Java. Unlike
env() it is not exported to the command's environment, which is why
the double-brace spelling suits it: ${NAME} reads as the environment
variable, {{NAME}} as the value the harness puts here.
- Assertions take ${SOLR_PORT} instead of String.valueOf(ports().solr()).
- touch() creates a file relative to the session's cwd, since cmd.exe
has no touch.
- WORK_DIR is exposed as a variable for the cases wanting it by name.
run() now rejects a line containing a newline, pointing at script().
A text block makes that easy to write by accident, and it would change
cmd.exe behaviour silently: Shell.CMD drops the 'call' for a multi-line
body, and without 'call' a batch file invoking solr.cmd never returns.
Removes run()'s format varargs and the bind() added earlier today. Each
was down to a single caller, and bind()'s only real uses had already
been removed by making a session start in its own work directory.
What remains has disjoint domains:
${NAME} a value the harness knows - ports, SOLR_TIP,
WORK_DIR. Identical to what BATS wrote, which is
what keeps a port mechanical.
" " + value a value from Java. No placeholder and no binding,
so the line reads as the command it is.
run(List.of(..)) anything needing quoting. The harness quotes each
argument for the shell in use, which hardcoding
double quotes into the line does not.
Not adopted: run("... {{myPort}}", myPort), where the placeholder name
is inert. Swap two arguments and the names read as authoritative while
nothing checks them - worse than an honest %d. It would also give
{{...}} two meanings depending on whether varargs were passed.
{{NAME}} keeps exactly one job: inside script(bash, cmd), where $NAME
and %NAME% belong to the shell that owns them and a script needs its own
locals left alone.
A concatenated value containing ${...} is still scanned, since
concatenation happens before resolution. Documented, and pinned by a
test.
A failure now prints every command the test ran, each with its exit
status and output, then one line saying how the last one differed from
what was expected:
$ solr start
exit 0 in 3.1s
| Started Solr server on port 46894 (pid=1234). Happy searching!
$ solr zk upconfig -d ... -n techproducts2
exit 1 in 0.9s
| ERROR: ...
FAILED: output did not contain: Uploading
Carried by a ShellAssertionError that overrides fillInStackTrace, so no
Java frames are printed over it. For a shell test the frames are all
harness internals; the commands are the diagnosis. A malformed test - an
unknown ${NAME}, a cmd-only spelling in a cross-shell line - still
throws a plain AssertionError with its frames, since there the useful
information is which line of the test is wrong.
The transcript file gets the same shell-session shape, so the artifact
left in failure-snapshots reads the same as the console.
Timeouts and awaitOrFail report the same way.
Also renames assertOutputContains and friends, which cost 22 wrapped
continuation lines across five test files:
assertOutputContains -> assertContains
assertOutputNotContains -> assertNotContains
assertOutputMatches -> assertMatches
assertOutputNotMatches -> assertNotMatches
assertOutputEquals -> assertExact
assertOutputForCli -> assertContainsForCli
assertExact rather than assertEquals so it cannot be mistaken, in a
diff, for the static assertEquals every test class inherits from JUnit.
Twelve tests, kept close to the original including the order and the text each asserts on. Framework changes it needed: - HttpResult gains assertStatus, assertContains and assertNotContains, so a line that was 'curl ... | assert_output --partial' reads the same way a command assertion does. curl appears seventy times across the BATS suites, almost always followed by an assertion on the body. - The single-command guard moved off the argv path. A newline in an argv element is legitimate - the shell quoting handles it - and is how the original's $'id,value\nROW1,0.47' ports over. Only the string form of run() is a single command by construction. Two tests say out loud what the original relied on bash for: the stdin test needs a pipe, so it has a body per shell, which is the same reason BATS needed a helper function there; and the CSV-with-newline test is bash-only, since cmd.exe cannot express an argument containing one.
The ported stdin test passed on macOS and failed on Windows with
ERROR: Illegal character in authority at index 18: http:
because its script bodies used ${SOLR_PORT}. Inside script(bash, cmd)
the harness resolves only {{NAME}}, leaving $ to the shell that owns it
- so bash expanded it from the environment and the mistake looked fine,
while cmd.exe has no such syntax and passed it through as text.
That asymmetry is a trap rather than a nuance, so a cmd body containing
$NAME or ${NAME} is now refused outright, pointing at {{NAME}}. It is
provably dead text there: cmd.exe has no $ expansion at all. The bash
body is untouched, since a bash script's own $locals are its business.
The test now uses {{SOLR_PORT}} in both bodies, which is what that
spelling exists for.
They all live in org.apache.solr.shell, so the prefix repeated what the package already said. SolrShellZkTest -> ZkTest SolrShellPostTest -> PostTest SolrShellRoundTripTest -> RoundTripTest SolrShellTwoNodeTest -> TwoNodeTest SolrShellCleanupTest -> CleanupTest SolrShellCmdOnlyTest -> CmdOnlyTest SolrShellSessionTest -> CliSessionTest The last one becomes CliSessionTest rather than SessionTest, to name the class it mostly exercises. SolrShellTestCase keeps its name: it is the base class other modules' suites extend, where the qualified name earns its keep at the extends site - the same reason LuceneTestCase is not called TestCase.
A ported BATS line that pipes into grep, or calls awk, or quotes with single quotes, passes on bash and fails on Windows weeks later. Three changes so the harness catches that at the call site and offers the replacement: - run() rejects a line that only bash could run: a pipe, && or ;, command substitution, a leading NAME=value, single-quote quoting, a /dev or /tmp path, or a Unix-only tool as the command. Each message names what to use instead. Checked outside quoted spans, so a URL carrying & in double quotes is still fine. - The replacements now exist. CommandResult grows the output-side tools (lineCount, linesMatching, firstMatch, firstLines, lastLines, fields, countOccurrences, assertLineCount, assertContainsTimes), and the session grows the file-side ones (path, mkdirs, write, append, read, readLinesMatching, fileContains, exists, rm, copy, list) - mkdir, rm, cp, cat, ls, find, wc, head, tail, grep and awk in Java, on both platforms. - A test already restricted with @EnabledOnShell may use its shell freely: the rails step aside, since no other shell is left to break. Also drops the four scaffold suites that were only ever there to prove the harness worked (CleanupTest, CmdOnlyTest, RoundTripTest, TwoNodeTest); the ported suites cover the same ground for real. And adds shellTestsPicocli, the counterpart of integrationTestsPicocli.
Two tests, 1:1 with the original and in the same order. No node and no @BeforeClass: this suite exercises the client only.
Two tests covering 'solr assert' in user-managed and cloud mode, each starting its own node as the original did. One assertion is stronger than the original: 'assert --cloud' against a cloud node prints nothing on success, so refuting ERROR alone passed whether or not the assert ran. It now also has to exit 0.
Six tests, 1:1 with the original. The port also asserts that the mutually-exclusive connection options actually make the command fail; the original asserted only the message, which a successful run would also have printed.
Three tests, each starting its own node as the original did. One command is new: the user-managed test deletes its core at the end. BATS wiped SOLR_HOME before every test, while the harness wipes it once per class, so the core would otherwise still be on disk when the cloud-mode test's node starts and tries to discover it. Verified green with the two tests in either order.
Fourteen tests, verbatim assertion text and order. The BATS skip for 'restart' not yet being migrated becomes @EnabledOnCli(COMMONS_CLI).
Nine tests plus one cmd.exe twin. Notable adaptations: - 'timeout 2 solr stop --jvm-opts' becomes a run() with an explicit timeout, so the hang check survives without the timeout utility. - RMI_PORT=65535 becomes this class's own third port: the hardcoded value only existed to keep SOLR_PORT+10000 in range, and a port the class owns cannot collide with a concurrent class. - cat/test/curl become read(), Files.isDirectory() and http(). The stop-doesn't-hang test is split BASH/CMD because the two scripts reject --jvm-opts with different text and share no substring: bin/solr parses start and stop options in one loop, while solr.cmd jumps to :parse_stop_args and falls through to :invalid_cmd_line. Pre-existing script asymmetry, not a bug: both error promptly instead of hanging.
Six tests, 15 assertions, same order as the original. Each test gets its own collection name rather than the original's single COLL_NAME. BATS wiped SOLR_HOME per test and deleted every collection and config in teardown; the harness wipes per class, so a shared name would have let the tests that deliberately leave a config in ZooKeeper poison the ones that assert it is gone. No assertion here names a collection, so nothing is weakened, and every test is now independent of the order the runner picks.
Two tests. Both refutations of 'error' also assert the exit status now: on empty output the refutation alone would have passed even if healthcheck had done nothing. The cloud test deletes its collection, since the class shares one SOLR_HOME and the user-managed test starts a node over the same home.
Eleven tests, 20 assertions, same order as the original. - Per-test collection names, replacing the original's shared COLL_NAME plus a delete-everything teardown the harness has no equivalent of. - 'cp -r' of a config set becomes copy() into the session work directory, so the shared distribution is never mutated. - The 'configuration directory /asdf not found' assertion became a separator-agnostic regex: CreateTool echoes the value back through Path, so Windows prints a backslash. Keeps the coverage on both platforms instead of marking the test bash-only.
Three tests, nine assertions. Per-test collection names in place of the original's shared COLL_NAME, since SOLR_HOME is wiped per class here. The missing --value case also asserts the exit status now, which the original left unchecked.
Two tests, with curl replaced by the harness' http() helper against the
first and second node.
The start line gains --solr-home ${SOLR_HOME}: without it
RunExampleTool.initDirs puts the cloud example's node directories inside
${SOLR_TIP}/example, which every concurrently running class shares.
test_stream.bats passes it for the same reason.
The class is @EnabledOnShell(Shell.BASH) because RunExampleTool's
Windows branch strips every SOLR_* variable from the child node's
environment, so the example's nodes get neither the per-class
SOLR_PID_DIR nor the process-scan marker and cannot be stopped.
CMD_BUGS.md collects that and the two other bash/cmd divergences found
so far. All long-standing, all left unfixed: each wants its own JIRA.
Addressing ZooKeeper with -z makes SolrZkClient log a WARN about default ACLs, and the helper treated every line of the merged output as a child name. So deleteAllCollections() built 'solr delete -c WARN ... ' from a log line, and collectionExists()/configExists() could match one. The BATS helper this was ported from has the same flaw; it never showed because BATS discarded the delete's output. Now reads stdout alone and keeps only whitespace-free lines. Found by the test_modules.bats port.
Two tests, both cross-shell. The solr.include file is written per shell rather than the test being marked bash-only: bin/solr sources it while solr.cmd CALLs it, so cmd needs 'set "NAME=value"' and a .cmd extension. Each test deletes its collection and config at the end, a port of BATS' delete_all_collections teardown. It matters more here than elsewhere: the two tests run with different solr.modules sets, so a collection left behind is loaded by the other test's node and fails.
solr/test-framework/README.md said only that the module 'provides base classes and utility classes'. It now covers which base class to extend and why, with SolrTestCase as the default, SolrCloudTestCase for tests that genuinely need a cluster, SolrShellTestCase for the start scripts, and SolrTestCaseJ4 marked legacy. solr/packaging/README.md is new: what the module assembles, and its three test layers - the shell harness as the preferred one, the BATS suites as deprecated, and the stock test task as disabled. It folds in solr/packaging/test/README.md, which only described BATS and is now removed. solr/packaging/README.txt stays where it is: it ships inside the distribution and smokeTestRelease.py asserts it is there.
Three suites wipe SOLR_HOME per test and had to know to write the embedded ZooKeeper config back afterwards. resetSolrHome() does the wipe, the logs directory and that, so the suites say what they mean and nothing else.
killTree destroyed the descendants but only waited for the root. On Windows a grandchild still held the command's redirected output file for a moment, and the test cleanup that deleted it failed with 'being used by another process'. The wait now covers every process in the tree.
The failure of ZkTest.downconfig on the commons-cli pass left nothing in the artifact: only the picocli output directory was uploaded. The harness' own results were pointed at solr/test-framework-cats, which no longer exists since the module was folded into solr/test-framework.
'solr start' returns when the port listens, which Jetty opens before the webapp has loaded, so the _default configset the node uploads at startup can still be missing when the first command runs: SOLR-18665. BATS never saw it, since its fixed order ran downconfig ninth, behind an upconfig case that waits on /api/configsets. Methods here run in a random order, and CI drew one that put downconfig first.
Contributor
Author
|
One of the CI failures was timing related and will be fixed once #5358 merges |
Contributor
Author
|
All tests now green.
Please give any last feedback within a few days. I plan to merge within this week and then proceed with SOLR-18645 getting rid of BATS (porting any last-minute new bats tests to cats) |
# Conflicts: # gradle/testing/randomization/policies/solr-tests.policy
bin/solr restart now waits on a status probe of https://localhost, which the SNI host check rejects for this test's certificate. Fixed in apache#5368.
* test_basic_auth.bats "start succeeds when the node rejects unauthenticated requests" (SOLR-18665) to BasicAuthTest * test_zk.bats "unreachable ZooKeeper reports a connection timeout" (SOLR-18138) to ZkTest
This was referenced Nov 20, 2026
Open
Closed
dsmiley
pushed a commit
that referenced
this pull request
Nov 21, 2026
(cherry picked from commit 784fd5e)
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.
https://issues.apache.org/jira/browse/SOLR-18642
The JIRA covers what CATS is. This is how it is built and how to review it.
Layout
solr/test-framework/src/java/org/apache/solr/shell/solr/packaging/src/test/org/apache/solr/shell/.batsfilessolr/packaging/build.gradle,.github/workflows/cats-test.ymlcatsTests*tasks, and a bash + cmd.exe CI matrixSolrShellTestCaseis the base class,session/CliSessionruns commands and owns the rails,env/resolves directories and ports.How it works
SOLR_HOME,SOLR_PID_DIR, logs directory and four ports (stop atP-1000, ZooKeeper atP+1000), claimed from a counter file under aFileChannel.lock()and kept below every platform's ephemeral port floor.solr.process.scan.markersysprop thatSolrProcessManagerfilters on, which behaves identically on both platforms and survives aSOLR_HOMEwipe.${NAME}before any shell sees it (bash expands$NAME, cmd.exe wants%NAME%), failing on an unknown name instead of substituting empty. Non-portable constructs — shell operators,$(, backticks,/dev/null, ~45 Unix-only tools — fail at the call site naming the fluent method that replaces them;@EnabledOnShelllifts the rails per test.run()asserts success,runFail()a non-zero status,tryRun()nothing; making success the default found 13 sites that had been ignoring a non-zero exit.curl,jq,opensslanddockerbecame Java and Testcontainers, so no test needs an external tool or the network.FAILED:line, aSOLR_HOMEsnapshot, and pre/post-flight port checks that pin a leak on the class that caused it.Running and reviewing
catsTestsPicocli/catsTestsCommonsClipin the CLI implementation,-Pcats.tests.jvms=Nsets the fork count, and the same commands run under cmd.exe. Output and per-testtranscript.logland undersolr/packaging/build/cats-test-output*/.Reading order:
CliSessionandSolrShellTestCase, thenHarnessEnv/PortBlocksfor the isolation model, thenZkTest.javabesidetest_zk.bats. The BATS suites still pass, so the two can be compared directly.Tip
If you're on a Mac and want to test the Windows side, I've got you covered, your LLM can remote control a Win VM and do whatever you wish, see gist link.
🤖 Developed almost entirely by Claude Code. I have not yet reviewed all of it myself.