This is an automated email from the ASF dual-hosted git repository.

noble pushed a commit to branch ishan/upgrade-to-lucene-10
in repository https://gitbox.apache.org/repos/asf/solr.git


The following commit(s) were added to refs/heads/ishan/upgrade-to-lucene-10 by 
this push:
     new 6224d6aaa4b Fixed syntax errors
6224d6aaa4b is described below

commit 6224d6aaa4bd1041fb856025925329fa65e936b3
Author: noblepaul <[email protected]>
AuthorDate: Thu Jan 16 15:14:24 2025 +0530

    Fixed syntax errors
---
 .../src/test/org/apache/solr/TestHighlightDedupGrouping.java   |  4 +---
 .../org/apache/solr/handler/TestReplicationHandlerBackup.java  |  2 +-
 .../test/org/apache/solr/handler/TestSnapshotCoreBackup.java   |  2 +-
 .../test/org/apache/solr/handler/TestStressThreadBackup.java   |  3 ++-
 .../solr/handler/component/QueryElevationComponentTest.java    | 10 +++++-----
 .../test/org/apache/solr/handler/tagger/TaggerTestCase.java    |  4 +++-
 6 files changed, 13 insertions(+), 12 deletions(-)

diff --git a/solr/core/src/test/org/apache/solr/TestHighlightDedupGrouping.java 
b/solr/core/src/test/org/apache/solr/TestHighlightDedupGrouping.java
index fa828e51370..f94d432bd17 100644
--- a/solr/core/src/test/org/apache/solr/TestHighlightDedupGrouping.java
+++ b/solr/core/src/test/org/apache/solr/TestHighlightDedupGrouping.java
@@ -17,7 +17,6 @@
 package org.apache.solr;
 
 import java.io.IOException;
-import org.apache.lucene.search.TimeLimitingCollector;
 import org.apache.lucene.tests.util.TestUtil;
 import org.apache.solr.client.solrj.SolrServerException;
 import org.apache.solr.client.solrj.response.QueryResponse;
@@ -37,8 +36,7 @@ public class TestHighlightDedupGrouping extends 
BaseDistributedSearchTestCase {
 
   @AfterClass
   public static void afterClass() throws Exception {
-    TimeLimitingCollector.getGlobalTimerThread().stopTimer();
-    TimeLimitingCollector.getGlobalTimerThread().join();
+
   }
 
   @Test
diff --git 
a/solr/core/src/test/org/apache/solr/handler/TestReplicationHandlerBackup.java 
b/solr/core/src/test/org/apache/solr/handler/TestReplicationHandlerBackup.java
index 83990058abc..e527392089d 100644
--- 
a/solr/core/src/test/org/apache/solr/handler/TestReplicationHandlerBackup.java
+++ 
b/solr/core/src/test/org/apache/solr/handler/TestReplicationHandlerBackup.java
@@ -150,7 +150,7 @@ public class TestReplicationHandlerBackup extends 
SolrJettyTestBase {
         IndexReader reader = DirectoryReader.open(dir)) {
       IndexSearcher searcher = new IndexSearcher(reader);
       TopDocs hits = searcher.search(new MatchAllDocsQuery(), 1);
-      assertEquals(nDocs, hits.totalHits.value);
+      assertEquals(nDocs, hits.totalHits.value());
     }
   }
 
diff --git 
a/solr/core/src/test/org/apache/solr/handler/TestSnapshotCoreBackup.java 
b/solr/core/src/test/org/apache/solr/handler/TestSnapshotCoreBackup.java
index 43cda66938d..0feda9ff662 100644
--- a/solr/core/src/test/org/apache/solr/handler/TestSnapshotCoreBackup.java
+++ b/solr/core/src/test/org/apache/solr/handler/TestSnapshotCoreBackup.java
@@ -454,7 +454,7 @@ public class TestSnapshotCoreBackup extends SolrTestCaseJ4 {
           new File(backup, expectedSegmentsFileName).exists());
     }
     try (Directory dir = FSDirectory.open(backup.toPath())) {
-      TestUtil.checkIndex(dir, true, true, true, null);
+      TestUtil.checkIndex(dir, 0, true, true, null);
       try (DirectoryReader r = DirectoryReader.open(dir)) {
         assertEquals("numDocs in " + backup, numDocs, r.numDocs());
         if (null != expectedSegmentsFileName) {
diff --git 
a/solr/core/src/test/org/apache/solr/handler/TestStressThreadBackup.java 
b/solr/core/src/test/org/apache/solr/handler/TestStressThreadBackup.java
index 1817361d508..1fb7d8e855e 100644
--- a/solr/core/src/test/org/apache/solr/handler/TestStressThreadBackup.java
+++ b/solr/core/src/test/org/apache/solr/handler/TestStressThreadBackup.java
@@ -331,7 +331,8 @@ public class TestStressThreadBackup extends 
SolrCloudTestCase {
     final int numRealDocsExpected = Integer.parseInt(m.group());
 
     try (Directory dir = FSDirectory.open(backup.toPath())) {
-      TestUtil.checkIndex(dir, true, true, true, null);
+      //TBD
+      TestUtil.checkIndex(dir,0, true, true, null);
       try (DirectoryReader r = DirectoryReader.open(dir)) {
         assertEquals(
             "num real docs in " + backup,
diff --git 
a/solr/core/src/test/org/apache/solr/handler/component/QueryElevationComponentTest.java
 
b/solr/core/src/test/org/apache/solr/handler/component/QueryElevationComponentTest.java
index bc28036665e..ac664010c78 100644
--- 
a/solr/core/src/test/org/apache/solr/handler/component/QueryElevationComponentTest.java
+++ 
b/solr/core/src/test/org/apache/solr/handler/component/QueryElevationComponentTest.java
@@ -573,7 +573,7 @@ public class QueryElevationComponentTest extends 
SolrTestCaseJ4 {
           assertEquals(2, booleanQuery.clauses().size());
           // the first clause is the original query, which is a WrappedQuery 
because the cache=false
           // local param was provided; the WrappedQuery doesn't cache; it 
contains a TermQuery
-          Query firstClause = booleanQuery.clauses().get(0).getQuery();
+          Query firstClause = booleanQuery.clauses().get(0).query();
           assertTrue(firstClause instanceof WrappedQuery);
           assertFalse(((WrappedQuery) firstClause).getCache());
           assertTrue(((WrappedQuery) firstClause).getWrappedQuery() instanceof 
TermQuery);
@@ -590,7 +590,7 @@ public class QueryElevationComponentTest extends 
SolrTestCaseJ4 {
           // the first clause is a FilterQuery that contains the original query
           // (ElevateComponent introduces this FilterQuery to make sure the 
original query consults
           // the cache)
-          Query firstClause = booleanQuery.clauses().get(0).getQuery();
+          Query firstClause = booleanQuery.clauses().get(0).query();
           assertTrue(firstClause instanceof FilterQuery);
           FilterQuery filterQuery = (FilterQuery) firstClause;
           // the first clause is the original query, which is a WrappedQuery 
because the cache=false
@@ -610,7 +610,7 @@ public class QueryElevationComponentTest extends 
SolrTestCaseJ4 {
           BooleanQuery booleanQuery = (BooleanQuery) ((WrappedQuery) 
filters[5]).getWrappedQuery();
           assertEquals(2, booleanQuery.clauses().size());
           // the first clause is a FilterQuery that contains the original query
-          Query firstClause = booleanQuery.clauses().get(0).getQuery();
+          Query firstClause = booleanQuery.clauses().get(0).query();
           assertTrue(firstClause instanceof FilterQuery);
           FilterQuery filterQuery = (FilterQuery) firstClause;
           // the original query is a TermQuery
@@ -626,7 +626,7 @@ public class QueryElevationComponentTest extends 
SolrTestCaseJ4 {
           BooleanQuery booleanQuery = (BooleanQuery) ((WrappedQuery) 
filters[6]).getWrappedQuery();
           assertEquals(2, booleanQuery.clauses().size());
           // the first clause is the original query, which is a FilterQuery 
containing a TermQuery
-          Query firstClause = booleanQuery.clauses().get(0).getQuery();
+          Query firstClause = booleanQuery.clauses().get(0).query();
           assertTrue(firstClause instanceof FilterQuery);
           FilterQuery filterQuery = (FilterQuery) firstClause;
           assertTrue(filterQuery.getQuery() instanceof TermQuery);
@@ -641,7 +641,7 @@ public class QueryElevationComponentTest extends 
SolrTestCaseJ4 {
           BooleanQuery booleanQuery = (BooleanQuery) ((WrappedQuery) 
filters[7]).getWrappedQuery();
           assertEquals(2, booleanQuery.clauses().size());
           // the first clause is the original query, which is a FilterQuery 
containing a TermQuery
-          Query firstClause = booleanQuery.clauses().get(0).getQuery();
+          Query firstClause = booleanQuery.clauses().get(0).query();
           assertTrue(firstClause instanceof FilterQuery);
           FilterQuery filterQuery = (FilterQuery) firstClause;
           assertTrue(filterQuery.getQuery() instanceof TermQuery);
diff --git 
a/solr/core/src/test/org/apache/solr/handler/tagger/TaggerTestCase.java 
b/solr/core/src/test/org/apache/solr/handler/tagger/TaggerTestCase.java
index da0a8d753f9..06c75e8a305 100644
--- a/solr/core/src/test/org/apache/solr/handler/tagger/TaggerTestCase.java
+++ b/solr/core/src/test/org/apache/solr/handler/tagger/TaggerTestCase.java
@@ -45,6 +45,7 @@ import org.apache.solr.request.SolrQueryRequestBase;
 import org.apache.solr.response.SolrQueryResponse;
 import org.apache.solr.search.DocIterator;
 import org.apache.solr.search.DocList;
+import org.apache.solr.search.SolrDocumentFetcher;
 import org.apache.solr.search.SolrIndexSearcher;
 import org.junit.Rule;
 import org.junit.rules.TestWatcher;
@@ -139,11 +140,12 @@ public abstract class TaggerTestCase extends 
SolrTestCaseJ4 {
     NamedList<?> rspValues = rsp.getValues();
     Map<String, String> matchingNames = new HashMap<>();
     SolrIndexSearcher searcher = req.getSearcher();
+    SolrDocumentFetcher docFetcher = searcher.getDocFetcher();
     DocList docList = (DocList) rspValues.get("response");
     DocIterator iter = docList.iterator();
     while (iter.hasNext()) {
       int docId = iter.next();
-      Document doc = searcher.doc(docId);
+      Document doc = docFetcher.doc(docId);
       String id = doc.getField("id").stringValue();
       String name = lookupByName(doc.get("name"));
       assertEquals("looking for " + name, NAMES.indexOf(name) + "", id);

Reply via email to