This is an automated email from the ASF dual-hosted git repository.
janhoy pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/solr.git
The following commit(s) were added to refs/heads/main by this push:
new cecf2d0252a Reduce regular CI test suite runtime (#4495)
cecf2d0252a is described below
commit cecf2d0252a9d5420cee36d93e90c63c6d514d48
Author: Jan Høydahl <[email protected]>
AuthorDate: Wed Aug 5 11:48:16 2026 +0200
Reduce regular CI test suite runtime (#4495)
---
.../CloudExitableDirectoryReaderNightlyTest.java | 36 ++
.../cloud/CloudExitableDirectoryReaderTest.java | 2 +-
.../test/org/apache/solr/cloud/RecoveryZkTest.java | 2 +
.../org/apache/solr/cloud/RollingRestartTest.java | 2 +
.../test/org/apache/solr/cloud/SyncSliceTest.java | 2 +
.../org/apache/solr/cloud/TestPullReplica.java | 2 +
.../apache/solr/cloud/UnloadDistributedZkTest.java | 2 +
.../DistributedCombinedQueryComponentTest.java | 408 ++++++++++-----------
.../tagger/RandomizedTaggerNightlyTest.java | 25 ++
.../solr/handler/tagger/RandomizedTaggerTest.java | 2 +-
.../org/apache/solr/search/TestSolr4Spatial2.java | 2 +-
.../solr/search/TestSolr4Spatial2Nightly.java | 36 ++
.../facet/SpatialHeatmapFacetsNightlyTest.java | 36 ++
.../search/facet/SpatialHeatmapFacetsTest.java | 2 +-
.../manager/SolrAndKafkaIntegrationTest.java | 2 +
.../apache/solr/gcs/GCSIncrementalBackupTest.java | 1 +
.../apache/solr/s3/S3IncrementalBackupTest.java | 1 +
.../client/solrj/io/stream/BadClusterTest.java | 2 +
.../cloud/PerReplicaStatesIntegrationTest.java | 2 +
19 files changed, 349 insertions(+), 218 deletions(-)
diff --git
a/solr/core/src/test/org/apache/solr/cloud/CloudExitableDirectoryReaderNightlyTest.java
b/solr/core/src/test/org/apache/solr/cloud/CloudExitableDirectoryReaderNightlyTest.java
new file mode 100644
index 00000000000..207602713a4
--- /dev/null
+++
b/solr/core/src/test/org/apache/solr/cloud/CloudExitableDirectoryReaderNightlyTest.java
@@ -0,0 +1,36 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.solr.cloud;
+
+import com.carrotsearch.randomizedtesting.annotations.Repeat;
+import org.apache.lucene.tests.util.LuceneTestCase.Nightly;
+import org.junit.Test;
+
+/**
+ * Nightly variant of {@link CloudExitableDirectoryReaderTest} that runs
{@code testCreepThenBite}
+ * the full 5 iterations.
+ */
+@Nightly
+public class CloudExitableDirectoryReaderNightlyTest extends
CloudExitableDirectoryReaderTest {
+
+ @Test
+ @Repeat(iterations = 5)
+ @Override
+ public void testCreepThenBite() throws Exception {
+ super.testCreepThenBite();
+ }
+}
diff --git
a/solr/core/src/test/org/apache/solr/cloud/CloudExitableDirectoryReaderTest.java
b/solr/core/src/test/org/apache/solr/cloud/CloudExitableDirectoryReaderTest.java
index cd3dced45cf..24d02a389cf 100644
---
a/solr/core/src/test/org/apache/solr/cloud/CloudExitableDirectoryReaderTest.java
+++
b/solr/core/src/test/org/apache/solr/cloud/CloudExitableDirectoryReaderTest.java
@@ -295,7 +295,7 @@ public class CloudExitableDirectoryReaderTest extends
SolrCloudTestCase {
}
@Test
- @Repeat(iterations = 5)
+ @Repeat(iterations = 1)
public void testCreepThenBite() throws Exception {
int creep = 100;
ModifiableSolrParams params = params("q", "{!cache=false}name:a*");
diff --git a/solr/core/src/test/org/apache/solr/cloud/RecoveryZkTest.java
b/solr/core/src/test/org/apache/solr/cloud/RecoveryZkTest.java
index 24383d8d317..f30bbcb6cdb 100644
--- a/solr/core/src/test/org/apache/solr/cloud/RecoveryZkTest.java
+++ b/solr/core/src/test/org/apache/solr/cloud/RecoveryZkTest.java
@@ -20,6 +20,7 @@ import java.lang.invoke.MethodHandles;
import java.util.ArrayList;
import java.util.List;
import java.util.concurrent.TimeUnit;
+import org.apache.lucene.tests.util.LuceneTestCase.Nightly;
import org.apache.solr.client.solrj.SolrClient;
import org.apache.solr.client.solrj.request.CollectionAdminRequest;
import org.apache.solr.client.solrj.request.UpdateRequest;
@@ -33,6 +34,7 @@ import org.junit.Test;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
+@Nightly
public class RecoveryZkTest extends SolrCloudTestCase {
private static final Logger log =
LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());
diff --git a/solr/core/src/test/org/apache/solr/cloud/RollingRestartTest.java
b/solr/core/src/test/org/apache/solr/cloud/RollingRestartTest.java
index aa08e871722..caea6e59015 100644
--- a/solr/core/src/test/org/apache/solr/cloud/RollingRestartTest.java
+++ b/solr/core/src/test/org/apache/solr/cloud/RollingRestartTest.java
@@ -20,6 +20,7 @@ import java.lang.invoke.MethodHandles;
import java.util.ArrayList;
import java.util.List;
import java.util.concurrent.TimeUnit;
+import org.apache.lucene.tests.util.LuceneTestCase.Nightly;
import org.apache.solr.client.solrj.request.CollectionAdminRequest;
import org.apache.solr.common.cloud.SolrZkClient;
import org.apache.solr.common.cloud.ZkStateReader;
@@ -28,6 +29,7 @@ import org.junit.Test;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
+@Nightly
public class RollingRestartTest extends AbstractFullDistribZkTestBase {
private static final Logger log =
LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());
diff --git a/solr/core/src/test/org/apache/solr/cloud/SyncSliceTest.java
b/solr/core/src/test/org/apache/solr/cloud/SyncSliceTest.java
index 65f2959dd96..b67a07cb93b 100644
--- a/solr/core/src/test/org/apache/solr/cloud/SyncSliceTest.java
+++ b/solr/core/src/test/org/apache/solr/cloud/SyncSliceTest.java
@@ -26,6 +26,7 @@ import java.util.Set;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.TimeoutException;
import java.util.stream.Collectors;
+import org.apache.lucene.tests.util.LuceneTestCase.Nightly;
import org.apache.solr.client.solrj.SolrClient;
import org.apache.solr.client.solrj.SolrRequest;
import org.apache.solr.client.solrj.SolrServerException;
@@ -44,6 +45,7 @@ import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
/** Test sync phase that occurs when Leader goes down and a new Leader is
elected. */
+@Nightly
@LogLevel("org.apache.solr.update.processor.DistributedZkUpdateProcessor=WARN")
public class SyncSliceTest extends AbstractFullDistribZkTestBase {
private static final Logger log =
LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());
diff --git a/solr/core/src/test/org/apache/solr/cloud/TestPullReplica.java
b/solr/core/src/test/org/apache/solr/cloud/TestPullReplica.java
index c1bece3037d..331b2b7e9f2 100644
--- a/solr/core/src/test/org/apache/solr/cloud/TestPullReplica.java
+++ b/solr/core/src/test/org/apache/solr/cloud/TestPullReplica.java
@@ -33,6 +33,7 @@ import java.util.Objects;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.TimeoutException;
import java.util.stream.Collectors;
+import org.apache.lucene.tests.util.LuceneTestCase.Nightly;
import org.apache.solr.client.solrj.SolrClient;
import org.apache.solr.client.solrj.SolrServerException;
import org.apache.solr.client.solrj.request.CollectionAdminRequest;
@@ -67,6 +68,7 @@ import org.junit.Test;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
+@Nightly
@LogLevel(
"org.apache.solr.handler.ReplicationHandler=DEBUG;org.apache.solr.handler.IndexFetcher=DEBUG")
public class TestPullReplica extends SolrCloudTestCase {
diff --git
a/solr/core/src/test/org/apache/solr/cloud/UnloadDistributedZkTest.java
b/solr/core/src/test/org/apache/solr/cloud/UnloadDistributedZkTest.java
index 093470a2bb9..fcbc8b23ad1 100644
--- a/solr/core/src/test/org/apache/solr/cloud/UnloadDistributedZkTest.java
+++ b/solr/core/src/test/org/apache/solr/cloud/UnloadDistributedZkTest.java
@@ -27,6 +27,7 @@ import java.util.concurrent.SynchronousQueue;
import java.util.concurrent.ThreadPoolExecutor;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.TimeoutException;
+import org.apache.lucene.tests.util.LuceneTestCase.Nightly;
import org.apache.solr.SolrTestCaseJ4.SuppressSSL;
import org.apache.solr.client.solrj.SolrClient;
import org.apache.solr.client.solrj.SolrServerException;
@@ -51,6 +52,7 @@ import org.slf4j.LoggerFactory;
* This test simply does a bunch of basic things in solrcloud mode and asserts
things work as
* expected.
*/
+@Nightly
@SuppressSSL(bugUrl = "https://issues.apache.org/jira/browse/SOLR-5776")
public class UnloadDistributedZkTest extends AbstractFullDistribZkTestBase {
private static final Logger log =
LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());
diff --git
a/solr/core/src/test/org/apache/solr/handler/component/DistributedCombinedQueryComponentTest.java
b/solr/core/src/test/org/apache/solr/handler/component/DistributedCombinedQueryComponentTest.java
index 50196cae1bc..55f2a87a723 100644
---
a/solr/core/src/test/org/apache/solr/handler/component/DistributedCombinedQueryComponentTest.java
+++
b/solr/core/src/test/org/apache/solr/handler/component/DistributedCombinedQueryComponentTest.java
@@ -104,30 +104,6 @@ public class DistributedCombinedQueryComponentTest extends
BaseDistributedSearch
commit();
}
- /**
- * Tests a single lexical query against the Solr server using both combiner
methods.
- *
- * @throws Exception if any exception occurs during the test execution
- */
- @Test
- @ShardsFixed(num = 2)
- public void testSingleLexicalQuery() throws Exception {
- prepareIndexDocs();
- String jsonQuery =
- """
- {
- "queries": {
- "lexical1": {"lucene": {"query": "id:2^=10"}}
- },
- "limit": 5,
- "fields": ["id", "score", "title"],
- "params": {"combiner": true, "combiner.query": ["lexical1"]}
- }""";
- QueryResponse rsp = query(CommonParams.JSON, jsonQuery, CommonParams.QT,
"/search");
- assertEquals(1, rsp.getResults().size());
- assertFieldValues(rsp.getResults(), id, "2");
- }
-
@Override
protected String getShardsString() {
if (deadServers == null) return shards;
@@ -141,184 +117,194 @@ public class DistributedCombinedQueryComponentTest
extends BaseDistributedSearch
}
/**
- * Tests multiple lexical queries using the distributed solr client.
- *
- * @throws Exception if any error occurs during the test execution
+ * Tests combined query functionality: single and multiple lexical queries,
sorting, pagination,
+ * faceting, highlighting and elevation. Merged into one test for efficiency.
*/
@Test
@ShardsFixed(num = 2)
- public void testMultipleLexicalQuery() throws Exception {
+ public void testCombinedQueries() throws Exception {
prepareIndexDocs();
- String jsonQuery =
- """
- {
- "queries": {
- "lexical1": {"lucene": {"query": "id:(2^=4 OR 3^=2 OR 6^=3 OR
5^=1)"}},
- "lexical2": {"lucene": {"query": "id:(4^=1 OR 5^=3 OR 7^=4 OR
10^=2)"}}
- },
- "limit": 5,
- "fields": ["id", "score", "title"],
- "params": {"combiner": true, "combiner.query": ["lexical1",
"lexical2"]}
- }""";
- QueryResponse rsp = query(CommonParams.JSON, jsonQuery, CommonParams.QT,
"/search");
+
+ // Single lexical query
+ QueryResponse rsp =
+ query(
+ CommonParams.JSON,
+ """
+ {
+ "queries": {
+ "lexical1": {"lucene": {"query": "id:2^=10"}}
+ },
+ "limit": 5,
+ "fields": ["id", "score", "title"],
+ "params": {"combiner": true, "combiner.query": ["lexical1"]}
+ }""",
+ CommonParams.QT,
+ "/search");
+ assertEquals(1, rsp.getResults().size());
+ assertFieldValues(rsp.getResults(), id, "2");
+
+ // Multiple lexical queries
+ rsp =
+ query(
+ CommonParams.JSON,
+ """
+ {
+ "queries": {
+ "lexical1": {"lucene": {"query": "id:(2^=4 OR 3^=2 OR 6^=3 OR
5^=1)"}},
+ "lexical2": {"lucene": {"query": "id:(4^=1 OR 5^=3 OR 7^=4 OR
10^=2)"}}
+ },
+ "limit": 5,
+ "fields": ["id", "score", "title"],
+ "params": {"combiner": true, "combiner.query": ["lexical1",
"lexical2"]}
+ }""",
+ CommonParams.QT,
+ "/search");
assertEquals(5, rsp.getResults().size());
assertFieldValues(rsp.getResults(), id, "5", "7", "2", "6", "3");
- }
- /**
- * Test multiple query execution with sort.
- *
- * @throws Exception the exception
- */
- @Test
- @ShardsFixed(num = 2)
- public void testMultipleQueryWithSort() throws Exception {
- prepareIndexDocs();
- String jsonQuery =
- """
- {
- "queries": {
- "lexical1": {"lucene": {"query": "id:(2^=4 OR 3^=2 OR 6^=3 OR
5^=1)"}},
- "lexical2": {"lucene": {"query": "id:(4^=1 OR 5^=3 OR 7^=4 OR
10^=2)"}}
- },
- "limit": 5,
- "sort": "mod3_idv desc, score desc",
- "fields": ["id", "score", "title"],
- "params": {"combiner": true, "combiner.query": ["lexical1",
"lexical2"]}
- }""";
- QueryResponse rsp = query(CommonParams.JSON, jsonQuery, CommonParams.QT,
"/search");
+ // Multiple queries with sort
+ rsp =
+ query(
+ CommonParams.JSON,
+ """
+ {
+ "queries": {
+ "lexical1": {"lucene": {"query": "id:(2^=4 OR 3^=2 OR 6^=3 OR
5^=1)"}},
+ "lexical2": {"lucene": {"query": "id:(4^=1 OR 5^=3 OR 7^=4 OR
10^=2)"}}
+ },
+ "limit": 5,
+ "sort": "mod3_idv desc, score desc",
+ "fields": ["id", "score", "title"],
+ "params": {"combiner": true, "combiner.query": ["lexical1",
"lexical2"]}
+ }""",
+ CommonParams.QT,
+ "/search");
assertEquals(5, rsp.getResults().size());
assertFieldValues(rsp.getResults(), id, "5", "2", "7", "10", "4");
- }
- /**
- * Tests the hybrid query functionality of the system with various setting
of pagination.
- *
- * @throws Exception if any unexpected error occurs during the test
execution.
- */
- @Test
- @ShardsFixed(num = 2)
- public void testHybridQueryWithPagination() throws Exception {
- prepareIndexDocs();
- String jsonQueryAll =
- """
- {
- "queries": {
- "lexical1": {"lucene": {"query": "id:(2^=4 OR 3^=2 OR 6^=3 OR
5^=1)"}},
- "lexical2": {"lucene": {"query": "id:(4^=1 OR 5^=3 OR 7^=4 OR
10^=2)"}}
- },
- "fields": ["id", "score", "title"],
- "params": {"combiner": true, "combiner.query": ["lexical1",
"lexical2"]}
- }""";
- QueryResponse rsp = query(CommonParams.JSON, jsonQueryAll,
CommonParams.QT, "/search");
- // ideal ordering
+ // Pagination: no limit (all results), ideal ordering
+ rsp =
+ query(
+ CommonParams.JSON,
+ """
+ {
+ "queries": {
+ "lexical1": {"lucene": {"query": "id:(2^=4 OR 3^=2 OR 6^=3 OR
5^=1)"}},
+ "lexical2": {"lucene": {"query": "id:(4^=1 OR 5^=3 OR 7^=4 OR
10^=2)"}}
+ },
+ "fields": ["id", "score", "title"],
+ "params": {"combiner": true, "combiner.query": ["lexical1",
"lexical2"]}
+ }""",
+ CommonParams.QT,
+ "/search");
assertFieldValues(rsp.getResults(), id, "5", "7", "2", "6", "3", "10",
"4");
- String jsonQueryLimit1 =
- """
- {
- "queries": {
- "lexical1": {"lucene": {"query": "id:(2^=4 OR 3^=2 OR 6^=3 OR
5^=1)"}},
- "lexical2": {"lucene": {"query": "id:(4^=1 OR 5^=3 OR 7^=4 OR
10^=2)"}}
- },
- "limit": 1,
- "fields": ["id", "score", "title"],
- "params": {"combiner": true, "combiner.query": ["lexical1",
"lexical2"]}
- }""";
- rsp = query(CommonParams.JSON, jsonQueryLimit1, CommonParams.QT,
"/search");
- // assert proper ordering due to presence of shards.rows
+
+ // Pagination: limit 1 without shards.rows gives non-ideal ordering
+ rsp =
+ query(
+ CommonParams.JSON,
+ """
+ {
+ "queries": {
+ "lexical1": {"lucene": {"query": "id:(2^=4 OR 3^=2 OR 6^=3 OR
5^=1)"}},
+ "lexical2": {"lucene": {"query": "id:(4^=1 OR 5^=3 OR 7^=4 OR
10^=2)"}}
+ },
+ "limit": 1,
+ "fields": ["id", "score", "title"],
+ "params": {"combiner": true, "combiner.query": ["lexical1",
"lexical2"]}
+ }""",
+ CommonParams.QT,
+ "/search");
assertFieldValues(rsp.getResults(), id, "7");
- String jsonQueryWithShardRows =
- """
- {
- "queries": {
- "lexical1": {"lucene": {"query": "id:(2^=4 OR 3^=2 OR 6^=3 OR
5^=1)"}},
- "lexical2": {"lucene": {"query": "id:(4^=1 OR 5^=3 OR 7^=4 OR
10^=2)"}}
- },
- "limit": 1,
- "fields": ["id", "score", "title"],
- "params": {"combiner": true, "combiner.query": ["lexical1",
"lexical2"], "shards.rows": 10}
- }""";
- rsp = query(CommonParams.JSON, jsonQueryWithShardRows, CommonParams.QT,
"/search");
+
+ // Pagination: limit 1 with shards.rows gives ideal ordering
+ rsp =
+ query(
+ CommonParams.JSON,
+ """
+ {
+ "queries": {
+ "lexical1": {"lucene": {"query": "id:(2^=4 OR 3^=2 OR 6^=3 OR
5^=1)"}},
+ "lexical2": {"lucene": {"query": "id:(4^=1 OR 5^=3 OR 7^=4 OR
10^=2)"}}
+ },
+ "limit": 1,
+ "fields": ["id", "score", "title"],
+ "params": {"combiner": true, "combiner.query": ["lexical1",
"lexical2"], "shards.rows": 10}
+ }""",
+ CommonParams.QT,
+ "/search");
assertFieldValues(rsp.getResults(), id, "5");
- // assert improper ordering due to lack of shards.rows
- String jsonQueryPage =
- """
- {
- "queries": {
- "lexical1": {"lucene": {"query": "id:(2^=4 OR 3^=2 OR 6^=3 OR
5^=1)"}},
- "lexical2": {"lucene": {"query": "id:(4^=1 OR 5^=3 OR 7^=4 OR
10^=2)"}}
- },
- "limit": 4,
- "offset": 3,
- "fields": ["id", "score", "title"],
- "params": {"combiner": true, "combiner.query": ["lexical1",
"lexical2"]}
- }""";
- rsp = query(CommonParams.JSON, jsonQueryPage, CommonParams.QT, "/search");
+
+ // Pagination: limit 4, offset 3
+ rsp =
+ query(
+ CommonParams.JSON,
+ """
+ {
+ "queries": {
+ "lexical1": {"lucene": {"query": "id:(2^=4 OR 3^=2 OR 6^=3 OR
5^=1)"}},
+ "lexical2": {"lucene": {"query": "id:(4^=1 OR 5^=3 OR 7^=4 OR
10^=2)"}}
+ },
+ "limit": 4,
+ "offset": 3,
+ "fields": ["id", "score", "title"],
+ "params": {"combiner": true, "combiner.query": ["lexical1",
"lexical2"]}
+ }""",
+ CommonParams.QT,
+ "/search");
assertEquals(4, rsp.getResults().size());
assertFieldValues(rsp.getResults(), id, "6", "3", "10", "4");
- }
- /**
- * Tests the single query functionality with faceting only.
- *
- * @throws Exception if any unexpected error occurs during the test
execution.
- */
- @Test
- @ShardsFixed(num = 2)
- public void testQueryWithFaceting() throws Exception {
- prepareIndexDocs();
- String jsonQuery =
- """
- {
- "queries": {
- "lexical": {"lucene": {"query": "id:(2^=4 OR 3^=2 OR 6^=3 OR
5^=1)"}}
- },
- "limit": 3,
- "offset": 1,
- "fields": ["id", "score", "title"],
- "params": {
- "combiner": true,
- "facet": true,
- "facet.field": "mod3_idv",
- "facet.mincount": 1,
- "combiner.query": ["lexical"]
- }
- }""";
- QueryResponse rsp = query(CommonParams.JSON, jsonQuery, CommonParams.QT,
"/search");
+ // Faceting
+ rsp =
+ query(
+ CommonParams.JSON,
+ """
+ {
+ "queries": {
+ "lexical": {"lucene": {"query": "id:(2^=4 OR 3^=2 OR 6^=3 OR
5^=1)"}}
+ },
+ "limit": 3,
+ "offset": 1,
+ "fields": ["id", "score", "title"],
+ "params": {
+ "combiner": true,
+ "facet": true,
+ "facet.field": "mod3_idv",
+ "facet.mincount": 1,
+ "combiner.query": ["lexical"]
+ }
+ }""",
+ CommonParams.QT,
+ "/search");
assertEquals(3, rsp.getResults().size());
assertEquals(4, rsp.getResults().getNumFound());
assertEquals("[0 (2), 2 (2)]",
rsp.getFacetFields().getFirst().getValues().toString());
- }
- /**
- * Tests the combined query feature with faceting and highlighting.
- *
- * @throws Exception if any unexpected error occurs during the test
execution.
- */
- @Test
- @ShardsFixed(num = 2)
- public void testQueriesWithFacetAndHighlights() throws Exception {
- prepareIndexDocs();
- String jsonQuery =
- """
- {
- "queries": {
- "lexical1": {"lucene": {"query": "id:(2^=4 OR 3^=2 OR 6^=3 OR
5^=1)"}},
- "lexical2": {"lucene": {"query": "id:(4^=1 OR 5^=3 OR 7^=4 OR
10^=2)"}}
- },
- "limit": 4,
- "fields": ["id", "score", "title"],
- "params": {
- "combiner": true,
- "facet": true,
- "facet.field": "mod3_idv",
- "combiner.query": ["lexical1", "lexical2"],
- "hl": true,
- "hl.fl": "title",
- "hl.q": "test doc"
- }
- }""";
- QueryResponse rsp = query(CommonParams.JSON, jsonQuery, CommonParams.QT,
"/search");
+ // Faceting + highlighting
+ rsp =
+ query(
+ CommonParams.JSON,
+ """
+ {
+ "queries": {
+ "lexical1": {"lucene": {"query": "id:(2^=4 OR 3^=2 OR 6^=3 OR
5^=1)"}},
+ "lexical2": {"lucene": {"query": "id:(4^=1 OR 5^=3 OR 7^=4 OR
10^=2)"}}
+ },
+ "limit": 4,
+ "fields": ["id", "score", "title"],
+ "params": {
+ "combiner": true,
+ "facet": true,
+ "facet.field": "mod3_idv",
+ "combiner.query": ["lexical1", "lexical2"],
+ "hl": true,
+ "hl.fl": "title",
+ "hl.q": "test doc"
+ }
+ }""",
+ CommonParams.QT,
+ "/search");
assertEquals(4, rsp.getResults().size());
assertFieldValues(rsp.getResults(), id, "5", "7", "2", "6");
assertEquals("mod3_idv", rsp.getFacetFields().getFirst().getName());
@@ -330,40 +316,34 @@ public class DistributedCombinedQueryComponentTest
extends BaseDistributedSearch
assertEquals(
"title <em>test</em> for <em>doc</em> 5",
rsp.getHighlighting().get("5").get("title").getFirst());
- }
- /**
- * Tests the combined query feature with faceting, highlighting and
elevation with debug.
- *
- * @throws Exception if any unexpected error occurs during the test
execution.
- */
- @Test
- @ShardsFixed(num = 2)
- public void testElevatedQueriesWithFacetAndHighlights() throws Exception {
- prepareIndexDocs();
- String jsonQuery =
- """
- {
- "queries": {
- "lexical1": {"lucene": {"query": "id:(2^=2 OR 3^=1 OR 6^=2 OR
1^=3)"}},
- "lexical2": {"lucene": {"query": "id:(4^=1 OR 1^=2 OR 7^=3 OR
10^=2)"}}
- },
- "limit": 4,
- "fields": ["id", "score", "title"],
- "params": {
- "combiner": true,
- "elevateIds": "10,6",
- "combiner.query": ["lexical1", "lexical2"],
- "facet": true,
- "facet.field": "mod3_idv",
- "hl": true,
- "hl.fl": "title",
- "hl.q": "test doc",
- "debug": "true"
- }
- }""";
+ // Elevation with faceting, highlighting and debug
handle.put("debug", SKIP);
- QueryResponse rsp = query(CommonParams.JSON, jsonQuery, CommonParams.QT,
"/search-elevate");
+ rsp =
+ query(
+ CommonParams.JSON,
+ """
+ {
+ "queries": {
+ "lexical1": {"lucene": {"query": "id:(2^=2 OR 3^=1 OR 6^=2 OR
1^=3)"}},
+ "lexical2": {"lucene": {"query": "id:(4^=1 OR 1^=2 OR 7^=3 OR
10^=2)"}}
+ },
+ "limit": 4,
+ "fields": ["id", "score", "title"],
+ "params": {
+ "combiner": true,
+ "elevateIds": "10,6",
+ "combiner.query": ["lexical1", "lexical2"],
+ "facet": true,
+ "facet.field": "mod3_idv",
+ "hl": true,
+ "hl.fl": "title",
+ "hl.q": "test doc",
+ "debug": "true"
+ }
+ }""",
+ CommonParams.QT,
+ "/search-elevate");
assertEquals(4, rsp.getResults().size());
assertFieldValues(rsp.getResults(), id, "10", "6", "1", "7");
assertEquals("mod3_idv", rsp.getFacetFields().getFirst().getName());
diff --git
a/solr/core/src/test/org/apache/solr/handler/tagger/RandomizedTaggerNightlyTest.java
b/solr/core/src/test/org/apache/solr/handler/tagger/RandomizedTaggerNightlyTest.java
new file mode 100644
index 00000000000..25d7b74582f
--- /dev/null
+++
b/solr/core/src/test/org/apache/solr/handler/tagger/RandomizedTaggerNightlyTest.java
@@ -0,0 +1,25 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.solr.handler.tagger;
+
+import com.carrotsearch.randomizedtesting.annotations.Repeat;
+import org.apache.lucene.tests.util.LuceneTestCase.Nightly;
+
+/** Nightly variant of {@link RandomizedTaggerTest} that runs the full 10
iterations. */
+@Nightly
+@Repeat(iterations = 10)
+public class RandomizedTaggerNightlyTest extends RandomizedTaggerTest {}
diff --git
a/solr/core/src/test/org/apache/solr/handler/tagger/RandomizedTaggerTest.java
b/solr/core/src/test/org/apache/solr/handler/tagger/RandomizedTaggerTest.java
index 0d770412952..4a22552fb63 100644
---
a/solr/core/src/test/org/apache/solr/handler/tagger/RandomizedTaggerTest.java
+++
b/solr/core/src/test/org/apache/solr/handler/tagger/RandomizedTaggerTest.java
@@ -36,7 +36,7 @@ import org.junit.BeforeClass;
import org.junit.Test;
/** Randomly generate taggable text and verify via simple tag algorithm. */
-@Repeat(iterations = 10)
+@Repeat(iterations = 1)
public class RandomizedTaggerTest extends TaggerTestCase {
@BeforeClass
diff --git a/solr/core/src/test/org/apache/solr/search/TestSolr4Spatial2.java
b/solr/core/src/test/org/apache/solr/search/TestSolr4Spatial2.java
index d5e23623bfa..19ee80f3700 100644
--- a/solr/core/src/test/org/apache/solr/search/TestSolr4Spatial2.java
+++ b/solr/core/src/test/org/apache/solr/search/TestSolr4Spatial2.java
@@ -180,7 +180,7 @@ public class TestSolr4Spatial2 extends SolrTestCaseJ4 {
}
@Test
- @Repeat(iterations = 10)
+ @Repeat(iterations = 1)
public void testLLPDecodeIsStableAndPrecise() throws Exception {
// test that LatLonPointSpatialField decode of docValue will round-trip
(re-index then
// re-decode) to the same value
diff --git
a/solr/core/src/test/org/apache/solr/search/TestSolr4Spatial2Nightly.java
b/solr/core/src/test/org/apache/solr/search/TestSolr4Spatial2Nightly.java
new file mode 100644
index 00000000000..2c12370df08
--- /dev/null
+++ b/solr/core/src/test/org/apache/solr/search/TestSolr4Spatial2Nightly.java
@@ -0,0 +1,36 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.solr.search;
+
+import com.carrotsearch.randomizedtesting.annotations.Repeat;
+import org.apache.lucene.tests.util.LuceneTestCase.Nightly;
+import org.junit.Test;
+
+/**
+ * Nightly variant of {@link TestSolr4Spatial2} that runs {@code
testLLPDecodeIsStableAndPrecise}
+ * the full 10 iterations.
+ */
+@Nightly
+public class TestSolr4Spatial2Nightly extends TestSolr4Spatial2 {
+
+ @Test
+ @Repeat(iterations = 10)
+ @Override
+ public void testLLPDecodeIsStableAndPrecise() throws Exception {
+ super.testLLPDecodeIsStableAndPrecise();
+ }
+}
diff --git
a/solr/core/src/test/org/apache/solr/search/facet/SpatialHeatmapFacetsNightlyTest.java
b/solr/core/src/test/org/apache/solr/search/facet/SpatialHeatmapFacetsNightlyTest.java
new file mode 100644
index 00000000000..4c138ecc680
--- /dev/null
+++
b/solr/core/src/test/org/apache/solr/search/facet/SpatialHeatmapFacetsNightlyTest.java
@@ -0,0 +1,36 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.solr.search.facet;
+
+import com.carrotsearch.randomizedtesting.annotations.Repeat;
+import org.apache.lucene.tests.util.LuceneTestCase.Nightly;
+import org.junit.Test;
+
+/**
+ * Nightly variant of {@link SpatialHeatmapFacetsTest} that runs {@code
testPng} the full 3
+ * iterations.
+ */
+@Nightly
+public class SpatialHeatmapFacetsNightlyTest extends SpatialHeatmapFacetsTest {
+
+ @Test
+ @Repeat(iterations = 3)
+ @Override
+ public void testPng() {
+ super.testPng();
+ }
+}
diff --git
a/solr/core/src/test/org/apache/solr/search/facet/SpatialHeatmapFacetsTest.java
b/solr/core/src/test/org/apache/solr/search/facet/SpatialHeatmapFacetsTest.java
index 6f48e473bca..028486496df 100644
---
a/solr/core/src/test/org/apache/solr/search/facet/SpatialHeatmapFacetsTest.java
+++
b/solr/core/src/test/org/apache/solr/search/facet/SpatialHeatmapFacetsTest.java
@@ -516,7 +516,7 @@ public class SpatialHeatmapFacetsTest extends
BaseDistributedSearchTestCase {
}
@Test
- @Repeat(iterations = 3)
+ @Repeat(iterations = 1)
public void testPng() {
// We test via round-trip randomized data:
diff --git
a/solr/cross-dc-manager/src/test/org/apache/solr/crossdc/manager/SolrAndKafkaIntegrationTest.java
b/solr/cross-dc-manager/src/test/org/apache/solr/crossdc/manager/SolrAndKafkaIntegrationTest.java
index e42ac3844a3..797080454b5 100644
---
a/solr/cross-dc-manager/src/test/org/apache/solr/crossdc/manager/SolrAndKafkaIntegrationTest.java
+++
b/solr/cross-dc-manager/src/test/org/apache/solr/crossdc/manager/SolrAndKafkaIntegrationTest.java
@@ -52,6 +52,7 @@ import org.apache.kafka.clients.producer.Producer;
import org.apache.kafka.clients.producer.ProducerRecord;
import org.apache.kafka.common.serialization.StringSerializer;
import org.apache.kafka.streams.integration.utils.EmbeddedKafkaCluster;
+import org.apache.lucene.tests.util.LuceneTestCase.Nightly;
import org.apache.lucene.tests.util.QuickPatchThreadsFilter;
import org.apache.solr.SolrIgnoredThreadsFilter;
import org.apache.solr.client.solrj.SolrClient;
@@ -93,6 +94,7 @@ import org.noggit.ObjectBuilder;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
+@Nightly
@ThreadLeakFilters(
filters = {
SolrIgnoredThreadsFilter.class,
diff --git
a/solr/modules/gcs-repository/src/test/org/apache/solr/gcs/GCSIncrementalBackupTest.java
b/solr/modules/gcs-repository/src/test/org/apache/solr/gcs/GCSIncrementalBackupTest.java
index 62b9b8e7717..d08a019ba1c 100644
---
a/solr/modules/gcs-repository/src/test/org/apache/solr/gcs/GCSIncrementalBackupTest.java
+++
b/solr/modules/gcs-repository/src/test/org/apache/solr/gcs/GCSIncrementalBackupTest.java
@@ -26,6 +26,7 @@ import org.junit.BeforeClass;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
[email protected]
@ThreadLeakLingering(linger = 10)
@LuceneTestCase.SuppressCodecs({
"SimpleText"
diff --git
a/solr/modules/s3-repository/src/test/org/apache/solr/s3/S3IncrementalBackupTest.java
b/solr/modules/s3-repository/src/test/org/apache/solr/s3/S3IncrementalBackupTest.java
index 8cebe4a80a5..a0f1d1111a7 100644
---
a/solr/modules/s3-repository/src/test/org/apache/solr/s3/S3IncrementalBackupTest.java
+++
b/solr/modules/s3-repository/src/test/org/apache/solr/s3/S3IncrementalBackupTest.java
@@ -30,6 +30,7 @@ import org.slf4j.LoggerFactory;
import software.amazon.awssdk.regions.Region;
// Backups do checksum validation against a footer value not present in
'SimpleText'
[email protected]
@LuceneTestCase.SuppressCodecs({"SimpleText"})
@ThreadLeakLingering(linger = 10)
@LogLevel(
diff --git
a/solr/solrj-streaming/src/test/org/apache/solr/client/solrj/io/stream/BadClusterTest.java
b/solr/solrj-streaming/src/test/org/apache/solr/client/solrj/io/stream/BadClusterTest.java
index 386631c2e7d..d301fc2f511 100644
---
a/solr/solrj-streaming/src/test/org/apache/solr/client/solrj/io/stream/BadClusterTest.java
+++
b/solr/solrj-streaming/src/test/org/apache/solr/client/solrj/io/stream/BadClusterTest.java
@@ -21,6 +21,7 @@ import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.concurrent.TimeoutException;
+import org.apache.lucene.tests.util.LuceneTestCase.Nightly;
import org.apache.solr.SolrTestCaseJ4;
import org.apache.solr.client.solrj.impl.CloudSolrClient;
import org.apache.solr.client.solrj.io.Tuple;
@@ -38,6 +39,7 @@ import org.junit.BeforeClass;
import org.junit.Test;
/** Tests behaviors of CloudSolrStream when the cluster is behaving badly. */
+@Nightly
@SolrTestCaseJ4.SuppressSSL
public class BadClusterTest extends SolrCloudTestCase {
diff --git
a/solr/solrj/src/test/org/apache/solr/common/cloud/PerReplicaStatesIntegrationTest.java
b/solr/solrj/src/test/org/apache/solr/common/cloud/PerReplicaStatesIntegrationTest.java
index e996c111a46..1bd29967657 100644
---
a/solr/solrj/src/test/org/apache/solr/common/cloud/PerReplicaStatesIntegrationTest.java
+++
b/solr/solrj/src/test/org/apache/solr/common/cloud/PerReplicaStatesIntegrationTest.java
@@ -24,6 +24,7 @@ import java.lang.invoke.MethodHandles;
import java.util.Map;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.atomic.AtomicBoolean;
+import org.apache.lucene.tests.util.LuceneTestCase.Nightly;
import org.apache.solr.client.solrj.SolrClient;
import org.apache.solr.client.solrj.request.CollectionAdminRequest;
import org.apache.solr.client.solrj.request.V2Request;
@@ -40,6 +41,7 @@ import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
/** This test would be faster if we simulated the zk state instead. */
+@Nightly
@LogLevel(
"org.apache.solr.common.cloud.ZkStateReader=DEBUG;"
+ "org.apache.solr.cloud.overseer.ZkStateWriter=DEBUG;"