Skip to content

Conversation

Copy link

Copilot AI commented Nov 22, 2025

Description

Migrated test code from deprecated LocalSolrQueryRequest to a new test-specific SimpleSolrQueryRequest class that extends SolrQueryRequestBase.

Solution

Created SimpleSolrQueryRequest in test-framework with identical constructor signatures to LocalSolrQueryRequest:

public class SimpleSolrQueryRequest extends SolrQueryRequestBase {
  public SimpleSolrQueryRequest(SolrCore core, SolrParams args) {
    super(core, args);
  }
  
  public SimpleSolrQueryRequest(SolrCore core, NamedList<?> args) {
    super(core, args.toSolrParams());
  }
  
  // Additional constructors for convenience
}

Updated 56 files:

  • Test framework (4 files): TestHarness, SolrTestCaseJ4, UpdateProcessorTestBase
  • Core tests (42 files): Update processors, handlers, schema, search, response writers
  • Module tests (10 files): clustering, cross-dc, extraction, ltr, scripting, solrj

Production code continues using deprecated LocalSolrQueryRequest - unchanged per scope.

Tests

  • Verified compilation of all test code
  • Ran representative tests: AddBlockUpdateTest, BasicFunctionalityTest, ReplicaListTransformerTest
  • Code review and security checks passed

Checklist

  • I have reviewed the guidelines for How to Contribute and my code conforms to the standards described there to the best of my ability.
  • I have created a Jira issue and added the issue ID to my pull request title.
  • I have given Solr maintainers access to contribute to my PR branch.
  • I have developed this patch against the main branch.
  • I have run ./gradlew check.
  • I have added tests for my changes.
  • I have added documentation for the Reference Guide
  • I have added a changelog entry for my change

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:

  • metadata.google.internal
    • Triggering command: /usr/lib/jvm/temurin-21-jdk-amd64/bin/java /usr/lib/jvm/temurin-21-jdk-amd64/bin/java -Dcommon-solr.dir=/home/REDACTED/work/solr/solr/solr -Dgradle.lib.dir=/home/REDACTED/.gradle/wrapper/dists/gradle-8.10-bin/deqhafrv1ntovfmgh0nh3npr9/gradle-8.10/lib -Dgradle.user.home=/home/REDACTED/.gradle -Dgradle.worker.jar=/home/REDACTED/.gradle/caches/8.10/workerMain/gradle-worker.jar -Djava.awt.headless=true -Djava.security.egd=file:/dev/./urandom -Djava.security.manager=default -Djava.security.policy=/home/REDACTED/work/solr/solr/gradle/testing/randomization/policies/solr-tests.policy -Djava.util.logging.config.file=/home/REDACTED/work/solr/solr/gradle/testing/defaults-tests/logging.properties -Djdk.map.althashing.threshold=0 -Djetty.insecurerandom=1 -Djetty.testMode=1 -Djunit4.childvm.count=1 -Djunit4.childvm.id=0 -Dorg.gradle.internal.worker.tmpdir=/home/REDACTED/work/solr/solr/solr/core/build/tmp/test/work -DtempDir=/home/REDACTED/work/solr/solr/build/tmp/tests-tmp -Dtests.LUCENE_VERSION=10.3.1 -Dtests.asserts=true -Dtests.codec=random (dns block)
    • Triggering command: /usr/lib/jvm/temurin-21-jdk-amd64/bin/java /usr/lib/jvm/temurin-21-jdk-amd64/bin/java -Dcommon-solr.dir=/home/REDACTED/work/solr/solr/solr -Dgradle.lib.dir=/home/REDACTED/.gradle/wrapper/dists/gradle-8.10-bin/deqhafrv1ntovfmgh0nh3npr9/gradle-8.10/lib -Dgradle.user.home=/home/REDACTED/.gradle -Dgradle.worker.jar=/home/REDACTED/.gradle/caches/8.10/workerMain/gradle-worker.jar -Djava.awt.headless=true -Djava.security.egd=file:/dev/./urandom -Djava.security.manager=default -Djava.security.policy=/home/REDACTED/work/solr/solr/gradle/testing/randomization/policies/solr-tests.policy -Djava.util.logging.config.file=/home/REDACTED/work/solr/solr/gradle/testing/defaults-tests/logging.properties -Djdk.map.althashing.threshold=0 -Djetty.insecurerandom=1 -Djetty.testMode=1 -Djunit4.childvm.count=1 -Djunit4.childvm.id=0 -Dorg.gradle.internal.worker.tmpdir=/home/REDACTED/work/solr/solr/solr/solrj/build/tmp/test/work -DtempDir=/home/REDACTED/work/solr/solr/build/tmp/tests-tmp -Dtests.LUCENE_VERSION=10.3.1 -Dtests.asserts=true -Dtests.codec=random (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

Original prompt

Can you look at the various tests that use the deprecated LocalSolrQueryRequest.java and migrate it to using SolrQueryRequestBase instead?


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Copilot AI changed the title [WIP] Migrate tests from LocalSolrQueryRequest to SolrQueryRequestBase Migrate tests from deprecated LocalSolrQueryRequest to SolrQueryRequestBase Nov 22, 2025
Copilot AI requested a review from epugh November 22, 2025 17:56
Copilot finished work on behalf of epugh November 22, 2025 17:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants