Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SOLR-16304 De-annotate some slow tests #951

Merged
merged 33 commits into from Aug 2, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
510d877
SOLR-16304 De-annotate some slow tests
madrob Jul 22, 2022
ca3831c
revert accidental inclusion
madrob Jul 22, 2022
febd9e5
fix shards to speed up non-nightly test
madrob Jul 22, 2022
49907e2
more not really slow tests
madrob Jul 23, 2022
51862b9
modules
madrob Jul 25, 2022
99534d9
no slow in solrj
madrob Jul 25, 2022
7219436
tidy
madrob Jul 25, 2022
b346693
cluster can be shared in a test class
madrob Jul 25, 2022
c14d465
revert accidental extras
madrob Jul 25, 2022
5cfca07
tidy
madrob Jul 25, 2022
40dc68f
more tests
madrob Jul 25, 2022
18b7598
slow to nightly
madrob Jul 25, 2022
0818d65
update docs to remove slow
madrob Jul 25, 2022
8260f7f
fix failing test
madrob Jul 25, 2022
f761526
revert debugging
madrob Jul 26, 2022
ff3857f
chaos tests to nightly
madrob Jul 26, 2022
c8e22ea
move work to nightly
madrob Jul 28, 2022
5c899fe
./gradlew spotlessApply
cpoerschke Jul 29, 2022
f87fe8a
remove -Dtests.slow=true in comments
cpoerschke Jul 29, 2022
d6d05e5
de-annotate some slow tests that we should feel until we fix them
madrob Jul 28, 2022
9d2b4a9
share cluster
madrob Jul 28, 2022
be0e1b6
tidy
madrob Jul 28, 2022
123b9a2
speed up wait code
madrob Jul 28, 2022
4fbd147
clarify some code
madrob Jul 29, 2022
ad1326b
precommit
madrob Jul 29, 2022
19c85bf
review feedback
madrob Jul 29, 2022
e8a9acd
more work to nightlies
madrob Jul 29, 2022
68bcc04
tidy
madrob Aug 1, 2022
8116c21
randomize for less work
madrob Aug 1, 2022
1593b2c
the rest of Slow
madrob Aug 1, 2022
2515211
rewrite loops as zk.wait
madrob Aug 1, 2022
410c368
semicolon
madrob Aug 1, 2022
b2aec5a
CHANGES
madrob Aug 2, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 0 additions & 2 deletions solr/core/src/test/org/apache/solr/TestRandomDVFaceting.java
Expand Up @@ -22,7 +22,6 @@
import java.util.List;
import java.util.Map;
import java.util.Random;
import org.apache.lucene.tests.util.LuceneTestCase.Slow;
import org.apache.lucene.tests.util.TestUtil;
import org.apache.solr.common.params.ModifiableSolrParams;
import org.apache.solr.request.SolrQueryRequest;
Expand All @@ -39,7 +38,6 @@
* and compares the docvalues facet results to the indexed facet results as if it were just another
* faceting method.
*/
@Slow
@SolrTestCaseJ4.SuppressPointFields(
bugUrl = "Test explicitly compares Trie to Points, randomization defeats the point")
@SolrTestCaseJ4.SuppressSSL
Expand Down
2 changes: 0 additions & 2 deletions solr/core/src/test/org/apache/solr/TestRandomFaceting.java
Expand Up @@ -29,7 +29,6 @@
import java.util.Set;
import java.util.function.Consumer;
import java.util.regex.Pattern;
import org.apache.lucene.tests.util.LuceneTestCase.Slow;
import org.apache.lucene.tests.util.TestUtil;
import org.apache.solr.common.SolrException.ErrorCode;
import org.apache.solr.common.params.ModifiableSolrParams;
Expand All @@ -41,7 +40,6 @@
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

@Slow
public class TestRandomFaceting extends SolrTestCaseJ4 {

private static final Pattern trieFields = Pattern.compile(".*_t.");
Expand Down
Expand Up @@ -18,7 +18,6 @@

import java.util.Map;
import java.util.Set;
import org.apache.lucene.tests.util.LuceneTestCase.Slow;
import org.apache.solr.client.solrj.embedded.JettySolrRunner;
import org.apache.solr.client.solrj.request.CollectionAdminRequest;
import org.apache.solr.common.cloud.ClusterState;
Expand All @@ -30,7 +29,6 @@
import org.junit.BeforeClass;
import org.junit.Test;

@Slow
public class ClusterStateUpdateTest extends SolrCloudTestCase {

@Override
Expand Down
Expand Up @@ -42,8 +42,6 @@
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

@LuceneTestCase.Slow
@SolrTestCaseJ4.SuppressSSL
public class CollectionPropsTest extends SolrCloudTestCase {
private static final int TIMEOUT = 5000;
private String collectionName;
Expand Down
Expand Up @@ -21,7 +21,6 @@
import java.util.concurrent.Executors;
import java.util.concurrent.ScheduledExecutorService;
import java.util.concurrent.TimeoutException;
import org.apache.lucene.tests.util.LuceneTestCase.Slow;
import org.apache.solr.SolrTestCaseJ4;
import org.apache.solr.common.cloud.ConnectionManager;
import org.apache.solr.common.cloud.SolrZkClient;
Expand All @@ -35,7 +34,6 @@
import org.junit.Ignore;
import org.junit.Test;

@Slow
public class ConnectionManagerTest extends SolrTestCaseJ4 {

static final int TIMEOUT = 3000;
Expand Down
Expand Up @@ -22,7 +22,6 @@
import java.nio.file.StandardOpenOption;
import java.util.ArrayList;
import java.util.List;
import org.apache.lucene.tests.util.LuceneTestCase.Slow;
import org.apache.solr.client.solrj.SolrQuery;
import org.apache.solr.client.solrj.SolrServerException;
import org.apache.solr.client.solrj.embedded.JettySolrRunner;
Expand All @@ -38,7 +37,6 @@
import org.junit.BeforeClass;
import org.junit.Test;

@Slow
public class MissingSegmentRecoveryTest extends SolrCloudTestCase {
final String collection = getClass().getSimpleName();

Expand Down
Expand Up @@ -17,14 +17,12 @@
package org.apache.solr.cloud;

import org.apache.lucene.tests.util.LuceneTestCase.Nightly;
import org.apache.lucene.tests.util.LuceneTestCase.Slow;
import org.junit.Test;

/**
* Implementation moved to AbstractRestartWhileUpdatingTestBase because it is used by HDFS contrib
* module tests
*/
@Slow
@Nightly
public class RestartWhileUpdatingTest extends AbstractRestartWhileUpdatingTestBase {

Expand Down
26 changes: 15 additions & 11 deletions solr/core/src/test/org/apache/solr/cloud/SSLMigrationTest.java
Expand Up @@ -21,15 +21,16 @@
import java.util.Locale;
import java.util.Map;
import java.util.Properties;
import org.apache.commons.lang3.StringUtils;
import org.apache.lucene.tests.util.LuceneTestCase.AwaitsFix;
import org.apache.lucene.tests.util.LuceneTestCase.Slow;
import org.apache.solr.BaseDistributedSearchTestCase;
import org.apache.solr.SolrTestCaseJ4.SuppressSSL;
import org.apache.solr.client.solrj.SolrClient;
import org.apache.solr.client.solrj.embedded.JettyConfig;
import org.apache.solr.client.solrj.embedded.JettySolrRunner;
import org.apache.solr.client.solrj.impl.HttpClientUtil;
import org.apache.solr.client.solrj.request.QueryRequest;
import org.apache.solr.client.solrj.response.QueryResponse;
import org.apache.solr.common.cloud.DocCollection;
import org.apache.solr.common.cloud.Replica;
import org.apache.solr.common.cloud.Slice;
Expand All @@ -38,6 +39,8 @@
import org.apache.solr.common.params.MapSolrParams;
import org.apache.solr.common.params.SolrParams;
import org.apache.solr.util.SSLTestConfig;
import org.hamcrest.MatcherAssert;
import org.hamcrest.Matchers;
import org.junit.Test;

/**
Expand All @@ -49,7 +52,10 @@
@AwaitsFix(bugUrl = "https://issues.apache.org/jira/browse/SOLR-12028") // 17-Mar-2018
public class SSLMigrationTest extends AbstractFullDistribZkTestBase {
madrob marked this conversation as resolved.
Show resolved Hide resolved

private static final int NUM_REPLICAS = 2;

@Test
@BaseDistributedSearchTestCase.ShardsFixed(num = NUM_REPLICAS)
public void test() throws Exception {
// Migrate from HTTP -> HTTPS -> HTTP
assertReplicaInformation("http");
Expand Down Expand Up @@ -94,11 +100,11 @@ public void testMigrateSSL(SSLTestConfig sslConfig) throws Exception {

private void assertReplicaInformation(String urlScheme) {
List<Replica> replicas = getReplicas();
assertEquals("Wrong number of replicas found", 4, replicas.size());
assertEquals("Wrong number of replicas found", NUM_REPLICAS, replicas.size());
for (Replica replica : replicas) {
assertTrue(
MatcherAssert.assertThat(
"Replica didn't have the proper urlScheme in the ClusterState",
StringUtils.startsWith(replica.getStr(ZkStateReader.BASE_URL_PROP), urlScheme));
replica.getStr(ZkStateReader.BASE_URL_PROP), Matchers.startsWith(urlScheme));
}
}

Expand All @@ -115,12 +121,9 @@ private List<Replica> getReplicas() {
private void setUrlScheme(String value) throws Exception {
Map<String, String> m =
Map.of(
"action",
CollectionAction.CLUSTERPROP.toString().toLowerCase(Locale.ROOT),
"name",
"urlScheme",
"val",
value);
"action", CollectionAction.CLUSTERPROP.toString().toLowerCase(Locale.ROOT),
"name", "urlScheme",
"val", value);
SolrParams params = new MapSolrParams(m);
QueryRequest request = new QueryRequest(params);
request.setPath("/admin/collections");
Expand All @@ -131,7 +134,8 @@ private void setUrlScheme(String value) throws Exception {
}
// Create new SolrServer to configure new HttpClient w/ SSL config
try (SolrClient client = getLBHttpSolrClient(urls.toArray(new String[] {}))) {
client.request(request);
QueryResponse response = request.process(client);
assertEquals(0, response.getStatus());
}
}
}
Expand Up @@ -38,7 +38,6 @@
import org.slf4j.LoggerFactory;

/** Test of the MiniSolrCloudCluster functionality with authentication enabled. */
@LuceneTestCase.Slow
public class TestAuthenticationFramework extends SolrCloudTestCase {

private static final Logger log = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());
Expand Down
Expand Up @@ -24,7 +24,6 @@
import java.util.List;
import java.util.Map;
import java.util.Random;
import org.apache.lucene.tests.util.LuceneTestCase.Slow;
import org.apache.lucene.tests.util.TestUtil;
import org.apache.solr.client.solrj.SolrClient;
import org.apache.solr.client.solrj.embedded.JettySolrRunner;
Expand All @@ -40,12 +39,11 @@
import org.junit.BeforeClass;

/**
* A very simple sanity check that Phrase Identification works across a cloud cluster using
* A very simple check that Phrase Identification works across a cloud cluster using
* distributed term stat collection.
*
* @see org.apache.solr.handler.component.PhrasesIdentificationComponentTest
*/
@Slow
public class TestCloudPhrasesIdentificationComponent extends SolrCloudTestCase {

private static final String DEBUG_LABEL = MethodHandles.lookup().lookupClass().getName();
Expand Down
Expand Up @@ -28,7 +28,6 @@
import java.util.EnumSet;
import java.util.List;
import java.util.Map;
import org.apache.lucene.tests.util.LuceneTestCase.Slow;
import org.apache.solr.client.solrj.SolrQuery;
import org.apache.solr.client.solrj.SolrRequest;
import org.apache.solr.client.solrj.SolrResponse;
Expand All @@ -50,7 +49,6 @@
import org.junit.BeforeClass;
import org.junit.Test;

@Slow
public class TestPullReplicaWithAuth extends SolrCloudTestCase {

private static final String USER = "solr";
Expand Down
Expand Up @@ -17,11 +17,9 @@
package org.apache.solr.cloud;

import org.apache.lucene.tests.util.LuceneTestCase.Nightly;
import org.apache.lucene.tests.util.LuceneTestCase.Slow;
import org.apache.solr.SolrTestCaseJ4.SuppressSSL;
import org.junit.Test;

@Slow
@Nightly
@SuppressSSL
/*
Expand Down
Expand Up @@ -29,7 +29,6 @@
import java.util.Properties;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.atomic.AtomicReference;
import org.apache.lucene.tests.util.LuceneTestCase.Slow;
import org.apache.solr.SolrTestCaseJ4;
import org.apache.solr.common.cloud.ClusterProperties;
import org.apache.solr.common.cloud.SolrZkClient;
Expand All @@ -54,7 +53,6 @@
import org.junit.BeforeClass;
import org.junit.Test;

@Slow
@SolrTestCaseJ4.SuppressSSL
public class ZkControllerTest extends SolrTestCaseJ4 {

Expand Down Expand Up @@ -206,7 +204,6 @@ public void testGetHostName() throws Exception {
}
}

@Slow
@LogLevel(value = "org.apache.solr.cloud=DEBUG;org.apache.solr.cloud.overseer=DEBUG")
public void testPublishAndWaitForDownStates() throws Exception {

Expand Down
Expand Up @@ -19,7 +19,6 @@
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
import org.apache.lucene.tests.util.LuceneTestCase.Slow;
import org.apache.solr.client.solrj.embedded.JettySolrRunner;
import org.apache.solr.client.solrj.request.CollectionAdminRequest;
import org.apache.solr.cloud.SolrCloudTestCase;
Expand All @@ -31,7 +30,6 @@
import org.junit.Ignore;
import org.junit.Test;

@Slow
public class CollectionTooManyReplicasTest extends SolrCloudTestCase {

@BeforeClass
Expand Down
Expand Up @@ -18,7 +18,6 @@
package org.apache.solr.cloud.overseer;

import java.io.IOException;
import org.apache.lucene.tests.util.LuceneTestCase;
import org.apache.solr.SolrTestCaseJ4;
import org.apache.solr.client.solrj.request.CollectionAdminRequest;
import org.apache.solr.client.solrj.response.CollectionAdminResponse;
Expand All @@ -29,7 +28,6 @@
import org.junit.BeforeClass;
import org.junit.Test;

@LuceneTestCase.Slow
@SolrTestCaseJ4.SuppressSSL
public class ZkCollectionPropsCachingTest extends SolrCloudTestCase {
//
Expand Down
Expand Up @@ -25,7 +25,6 @@
import static org.apache.solr.handler.ReplicationTestHelper.rQuery;

import java.io.IOException;
import org.apache.lucene.tests.util.LuceneTestCase.Slow;
import org.apache.solr.SolrTestCaseJ4;
import org.apache.solr.SolrTestCaseJ4.SuppressSSL;
import org.apache.solr.client.solrj.embedded.JettySolrRunner;
Expand All @@ -40,7 +39,6 @@
import org.junit.Test;

/** Test for HealthCheckHandler in legacy mode */
@Slow
@SuppressSSL // Currently, unknown why SSL does not work with this test
public class TestHealthCheckHandlerLegacyMode extends SolrTestCaseJ4 {
HttpSolrClient leaderClientHealthCheck, followerClientHealthCheck;
Expand Down
Expand Up @@ -16,7 +16,6 @@
*/
package org.apache.solr.handler.component;

import org.apache.lucene.tests.util.LuceneTestCase.Slow;
import org.apache.solr.SolrTestCaseJ4;
import org.apache.solr.common.params.CommonParams;
import org.apache.solr.common.params.ModifiableSolrParams;
Expand All @@ -32,7 +31,6 @@
*
* @see MoreLikeThisComponent
*/
@Slow
public class MoreLikeThisComponentTest extends SolrTestCaseJ4 {

@BeforeClass
Expand Down
Expand Up @@ -35,7 +35,6 @@
import org.junit.runners.model.MultipleFailureException;

/** */
@LuceneTestCase.Slow
public class TestSolrCachePerf extends SolrTestCaseJ4 {

@SuppressWarnings({"unchecked", "rawtypes"})
Expand Down
Expand Up @@ -19,7 +19,6 @@
import java.util.HashSet;
import java.util.List;
import java.util.Set;
import org.apache.lucene.tests.util.LuceneTestCase.Slow;
import org.apache.lucene.tests.util.LuceneTestCase.SuppressTempFileChecks;
import org.apache.lucene.tests.util.TestUtil;
import org.apache.solr.SolrTestCaseJ4;
Expand All @@ -41,7 +40,6 @@
import org.junit.BeforeClass;
import org.junit.Test;

@Slow
@SuppressTempFileChecks(
bugUrl = "https://issues.apache.org/jira/browse/SOLR-1877 Spellcheck IndexReader leak bug?")
public class SpellCheckCollatorTest extends SolrTestCaseJ4 {
Expand Down
Expand Up @@ -21,15 +21,13 @@
import org.apache.hadoop.hdfs.MiniDFSCluster;
import org.apache.lucene.tests.util.LuceneTestCase;
import org.apache.lucene.tests.util.LuceneTestCase.Nightly;
import org.apache.lucene.tests.util.LuceneTestCase.Slow;
import org.apache.lucene.tests.util.QuickPatchThreadsFilter;
import org.apache.solr.SolrIgnoredThreadsFilter;
import org.apache.solr.cloud.AbstractRecoveryZkTestBase;
import org.apache.solr.hdfs.util.BadHdfsThreadsFilter;
import org.junit.AfterClass;
import org.junit.BeforeClass;

@Slow
@Nightly
@LuceneTestCase.AwaitsFix(bugUrl = "SOLR-15405")
@ThreadLeakFilters(
Expand Down
Expand Up @@ -30,7 +30,6 @@
import org.apache.lucene.store.Directory;
import org.apache.lucene.store.NRTCachingDirectory;
import org.apache.lucene.tests.util.LuceneTestCase.Nightly;
import org.apache.lucene.tests.util.LuceneTestCase.Slow;
import org.apache.lucene.tests.util.QuickPatchThreadsFilter;
import org.apache.lucene.util.IOUtils;
import org.apache.solr.SolrIgnoredThreadsFilter;
Expand All @@ -53,7 +52,6 @@
import org.junit.BeforeClass;
import org.junit.Test;

@Slow
@Nightly
@ThreadLeakFilters(
defaultFilters = true,
Expand Down