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 000000000000..207602713a4b --- /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 cd3dced45cff..24d02a389cf4 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 void testClearbox() throws Exception { } @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 48d4855c1d20..c56f957da10f 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.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.apache.CloudLegacySolrClient; import org.apache.solr.client.solrj.apache.HttpSolrClient; @@ -36,6 +37,7 @@ 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 aa08e8717228..caea6e59015e 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.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.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 8f49afba9701..539461360e96 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.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.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 b2d307aa8521..5eae4dca5d3b 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.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.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 ce003c19fb72..eaab53365cf0 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.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; @@ -53,6 +54,7 @@ * 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 f4e4572ec7c2..2faac4067541 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 @@ -109,30 +109,6 @@ private void prepareIndexDocs() throws Exception { 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; @@ -146,168 +122,176 @@ protected String getShardsString() { } /** - * 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, and highlighting. 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^2 OR 3^1 OR 6^2 OR 5^1)"}}, - "lexical2": {"lucene": {"query": "id:(4^1 OR 5^2 OR 7^3 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^2 OR 3^1 OR 6^2 OR 5^1)"}}, + "lexical2": {"lucene": {"query": "id:(4^1 OR 5^2 OR 7^3 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^2 OR 3^1 OR 6^2 OR 5^1)"}}, - "lexical2": {"lucene": {"query": "id:(4^1 OR 5^2 OR 7^3 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^2 OR 3^1 OR 6^2 OR 5^1)"}}, + "lexical2": {"lucene": {"query": "id:(4^1 OR 5^2 OR 7^3 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^2 OR 3^1 OR 6^2 OR 5^1)"}}, - "lexical2": {"lucene": {"query": "id:(4^1 OR 5^2 OR 7^3 OR 10^2)"}} - }, - "fields": ["id", "score", "title"], - "params": {"combiner": true, "combiner.query": ["lexical1", "lexical2"]} - }"""; - QueryResponse rsp = query(CommonParams.JSON, jsonQueryAll, CommonParams.QT, "/search"); + // Pagination: no limit (all results) + rsp = + query( + CommonParams.JSON, + """ + { + "queries": { + "lexical1": {"lucene": {"query": "id:(2^2 OR 3^1 OR 6^2 OR 5^1)"}}, + "lexical2": {"lucene": {"query": "id:(4^1 OR 5^2 OR 7^3 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 jsonQueryLimit4 = - """ - { - "queries": { - "lexical1": {"lucene": {"query": "id:(2^2 OR 3^1 OR 6^2 OR 5^1)"}}, - "lexical2": {"lucene": {"query": "id:(4^1 OR 5^2 OR 7^3 OR 10^2)"}} - }, - "limit": 4, - "fields": ["id", "score", "title"], - "params": {"combiner": true, "combiner.query": ["lexical1", "lexical2"]} - }"""; - rsp = query(CommonParams.JSON, jsonQueryLimit4, CommonParams.QT, "/search"); + + // Pagination: limit 4 + rsp = + query( + CommonParams.JSON, + """ + { + "queries": { + "lexical1": {"lucene": {"query": "id:(2^2 OR 3^1 OR 6^2 OR 5^1)"}}, + "lexical2": {"lucene": {"query": "id:(4^1 OR 5^2 OR 7^3 OR 10^2)"}} + }, + "limit": 4, + "fields": ["id", "score", "title"], + "params": {"combiner": true, "combiner.query": ["lexical1", "lexical2"]} + }""", + CommonParams.QT, + "/search"); assertFieldValues(rsp.getResults(), id, "5", "7", "2", "6"); - String jsonQueryPage = - """ - { - "queries": { - "lexical1": {"lucene": {"query": "id:(2^2 OR 3^1 OR 6^2 OR 5^1)"}}, - "lexical2": {"lucene": {"query": "id:(4^1 OR 5^2 OR 7^3 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^2 OR 3^1 OR 6^2 OR 5^1)"}}, + "lexical2": {"lucene": {"query": "id:(4^1 OR 5^2 OR 7^3 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^2 OR 3^1 OR 6^2 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^2 OR 3^1 OR 6^2 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^2 OR 3^1 OR 6^2 OR 5^1)"}}, - "lexical2": {"lucene": {"query": "id:(4^1 OR 5^2 OR 7^3 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^2 OR 3^1 OR 6^2 OR 5^1)"}}, + "lexical2": {"lucene": {"query": "id:(4^1 OR 5^2 OR 7^3 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()); 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 000000000000..25d7b74582fa --- /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 0d7704129528..4a22552fb633 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.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 d5e23623bfa4..19ee80f37006 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 void testRptWithGeometryGeo3dS2Field() throws Exception { } @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 000000000000..2c12370df081 --- /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 000000000000..4c138ecc680d --- /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 6f48e473bcab..028486496df9 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 @@ private NamedList getHmObj(QueryResponse response) { } @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 e42ac3844a39..797080454b5a 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.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.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 d955da11e1eb..e332a49931b0 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.slf4j.Logger; import org.slf4j.LoggerFactory; +@LuceneTestCase.Nightly @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 c35dbc17ab0e..28062aea557c 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 software.amazon.awssdk.regions.Region; // Backups do checksum validation against a footer value not present in 'SimpleText' +@LuceneTestCase.Nightly @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 386631c2e7d3..d301fc2f5119 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.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.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 e996c111a464..1bd299676577 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.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.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;"