Add BATS test for bootstrap_confdir and collection.configName system properties#12
Closed
Add BATS test for bootstrap_confdir and collection.configName system properties#12
Conversation
…properties Co-authored-by: epugh <22395+epugh@users.noreply.github.com>
…ducts configset Co-authored-by: epugh <22395+epugh@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] I would like a BATS test added to test_start_solr.bats that verifies the two system variables bootstrap_confdir and bootstrap_conf work. They are used to upload a config that Solr has but that which
isn't uploaded by default (and only _default is by d...
Add BATS test for bootstrap_confdir and collection.configName system properties
Aug 26, 2025
…9-bc8a-4146-b0e1-f2e206772f13
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.
This PR adds a new BATS integration test to verify the functionality of the
bootstrap_confdirandcollection.configNamesystem properties that enable uploading custom configsets during Solr startup.Background
Solr supports bootstrapping configsets at startup using system properties:
bootstrap_confdir: Specifies a directory of configuration files to uploadcollection.configName: Names the uploaded configset (defaults to "configuration1")By default, only the
_defaultconfigset is uploaded. These properties allow users to upload additional configsets likesample_techproducts_configsduring startup without manual intervention.Changes
Added a new test
bootstrap configset using bootstrap_confdir and collection.configNametosolr/packaging/test/test_start_solr.batsthat:sample_techproducts_configs/confdirectory is present-Dbootstrap_confdirpointing to the techproducts config directory and-Dcollection.configName=techproductsto name itconfig_existshelper to verify the "techproducts" configset was uploaded to ZooKeeperTest Validation
The test follows established patterns from existing BATS tests:
SOLR_TIPenvironment variable for path resolutionsolr start→solr assert --started→ verificationconfig_existshelper function (similar totest_zk.bats)sleep 1to allow upload completionUsage Example
When the test runs, it effectively executes:
solr start -Dbootstrap_confdir="/path/to/solr/server/solr/configsets/sample_techproducts_configs/conf" -Dcollection.configName=techproductsThis uploads the techproducts configuration as a configset named "techproducts" that can be used for creating collections.
The test can be run with:
./gradlew :solr:packaging:integrationTests --tests "test_start_solr.bats"Warning
Firewall rules blocked me from connecting to one or more addresses (expand for details)
I tried to connect to the following addresses, but was blocked by firewall rules:
dl.google.com/usr/lib/jvm/temurin-21-jdk-amd64/bin/java -XX:ReservedCodeCacheSize=256m -XX:TieredStopAtLevel=1 -XX:+UseParallelGC -XX:ActiveProcessorCount=1 --add-exports jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED --add-exports jdk.compiler/com.sun.tools.javac.file=ALL-UNNAMED --add-exports jdk.compiler/com.sun.tools.javac.parser=ALL-UNNAMED --add-exports jdk.compiler/com.sun.tools.javac.tree=ALL-UNNAMED --add-exports jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED --add-opens=java.base/java.util=ALL-UNNAMED --add-opens=java.base/java.lang=ALL-UNNAMED --add-opens=java.base/java.lang.invoke=ALL-UNNAMED --add-opens=java.prefs/java.util.prefs=ALL-UNNAMED --add-exports=jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED --add-exports=jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED --add-opens=java.base/java.nio.charset=ALL-UNNAMED --add-opens=java.base/java.net=ALL-UNNAMED --add-opens=java.base/java.util.concurrent.atomic=ALL-UNNAMED -Xmx2g -Dfile.encoding=UTF-8 -Djava.io.tmpdir=/home/REDACTED/work/solr/solr/.gradle/tmp -Duser.country -Duser.language=en -Duser.variant -cp /home/REDACTED/.gradle/wrapper/dists/gradle-8.10-bin/deqhafrv1ntovfmgh0nh3npr9/gradle-8.10/lib/gradle-daemon-main-8.10.jar -javaagent:/home/REDACTED/.gradle/wrapper/dists/gradle-8.10-bin/deqhafrv1ntovfmgh0nh3npr9/gradle-8.10/lib/agents/gradle-instrumentation-agent-8.10.jar org.gradle.launcher.daemon.bootstrap.GradleDaemon 8.10(dns block)If you need me to access, download, or install something from one of these locations, you can either:
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.