Test Solr on ephemeral host ports - never touches a site Solr - #85
Open
reekitconcept wants to merge 1 commit into
Open
Test Solr on ephemeral host ports - never touches a site Solr#85reekitconcept wants to merge 1 commit into
reekitconcept wants to merge 1 commit into
Conversation
The test containers (solr-acceptance, tika-acceptance) previously
bound the fixed host ports 8983/9998 - the same port a locally
running site Solr uses, so tests either clobbered its index or could
not start. The compose mappings are now parameterized
(${SOLR_ACCEPTANCE_PORT:-8983}) and pytest sets them to 0, so every
test session gets ephemeral ports; manual/acceptance use keeps the
fixed defaults. The Plone test fixture points collective.solr.port at
the dynamic port (applied outside registry_config so overrides cannot
lose it). Verified: with a site Solr running on 8983, the suite runs
on an ephemeral port and the site index stays untouched.
reekitconcept
force-pushed
the
gh-83/solr-test-port-isolation
branch
from
July 12, 2026 20:58
2391a03 to
03be844
Compare
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.
Fixes #83.
The test containers (solr-acceptance, tika-acceptance) bound the fixed host ports 8983/9998 — the same port a locally running site Solr uses — so the tests either clobbered its index (healed only by a full reindex) or could not start at all.
The compose mappings are now parameterized (
${SOLR_ACCEPTANCE_PORT:-8983}:8983) and pytest sets them to0, so every test session gets ephemeral host ports; manual/acceptance use keeps the fixed defaults. The Plone test fixture pointscollective.solr.portat the dynamic port (applied outsideregistry_config, so module-level overrides cannot lose it).Verified: with a site Solr running on 8983 holding a marker document, the suite ran on an ephemeral port (55001) and the marker survived untouched — dev site and test suite can now run at the same time.