SOLR-12028: BadApple and AwaitsFix annotations usage

This commit is contained in:
Erick 2018-03-03 21:42:14 -08:00
parent 78f11d05ac
commit ad7e94afb2
40 changed files with 51 additions and 2 deletions

View File

@ -843,6 +843,7 @@ public class TestRandomChains extends BaseTokenStreamTestCase {
String toString; String toString;
} }
@BadApple(bugUrl="https://issues.apache.org/jira/browse/SOLR-12028")
public void testRandomChains() throws Throwable { public void testRandomChains() throws Throwable {
int numIterations = TEST_NIGHTLY ? atLeast(20) : 3; int numIterations = TEST_NIGHTLY ? atLeast(20) : 3;
Random random = random(); Random random = random();

View File

@ -28,6 +28,7 @@ import java.io.IOException;
import java.io.Reader; import java.io.Reader;
import java.io.StringReader; import java.io.StringReader;
// See: https://issues.apache.org/jira/browse/SOLR-12028 Tests cannot remove files on Windows machines occasionally
public class TestJapaneseIterationMarkCharFilter extends BaseTokenStreamTestCase { public class TestJapaneseIterationMarkCharFilter extends BaseTokenStreamTestCase {
private Analyzer keywordAnalyzer, japaneseAnalyzer; private Analyzer keywordAnalyzer, japaneseAnalyzer;

View File

@ -87,6 +87,7 @@ import org.junit.BeforeClass;
Verify we can read previous versions' indexes, do searches Verify we can read previous versions' indexes, do searches
against them, and add documents to them. against them, and add documents to them.
*/ */
// See: https://issues.apache.org/jira/browse/SOLR-12028 Tests cannot remove files on Windows machines occasionally
public class TestBackwardsCompatibility extends LuceneTestCase { public class TestBackwardsCompatibility extends LuceneTestCase {
// Backcompat index generation, described below, is mostly automated in: // Backcompat index generation, described below, is mostly automated in:

View File

@ -82,7 +82,7 @@ import org.apache.lucene.util.Version;
* since they will just be regnerated (at a cost though). */ * since they will just be regnerated (at a cost though). */
// @SuppressSysoutChecks(bugUrl="we print stuff") // @SuppressSysoutChecks(bugUrl="we print stuff")
// See: https://issues.apache.org/jira/browse/SOLR-12028 Tests cannot remove files on Windows machines occasionally
public class TestDemoParallelLeafReader extends LuceneTestCase { public class TestDemoParallelLeafReader extends LuceneTestCase {
static final boolean DEBUG = false; static final boolean DEBUG = false;

View File

@ -62,6 +62,7 @@ import org.apache.lucene.util.IOUtils;
import org.apache.lucene.util.LuceneTestCase; import org.apache.lucene.util.LuceneTestCase;
import org.apache.lucene.util.RamUsageTester; import org.apache.lucene.util.RamUsageTester;
import org.apache.lucene.util.TestUtil; import org.apache.lucene.util.TestUtil;
import org.junit.Test;
public class TestLRUQueryCache extends LuceneTestCase { public class TestLRUQueryCache extends LuceneTestCase {
@ -1467,6 +1468,8 @@ public class TestLRUQueryCache extends LuceneTestCase {
} }
} }
@Test
@BadApple(bugUrl="https://issues.apache.org/jira/browse/SOLR-12028")
public void testDocValuesUpdatesDontBreakCache() throws IOException { public void testDocValuesUpdatesDontBreakCache() throws IOException {
Directory dir = newDirectory(); Directory dir = newDirectory();
IndexWriterConfig iwc = newIndexWriterConfig().setMergePolicy(NoMergePolicy.INSTANCE); IndexWriterConfig iwc = newIndexWriterConfig().setMergePolicy(NoMergePolicy.INSTANCE);

View File

@ -28,6 +28,7 @@ import org.apache.lucene.util.TestUtil;
/** /**
* Random testing for LongRange Queries. * Random testing for LongRange Queries.
*/ */
// See: https://issues.apache.org/jira/browse/SOLR-12028 Tests cannot remove files on Windows machines occasionally
public class TestLongRangeFieldQueries extends BaseRangeFieldQueryTestCase { public class TestLongRangeFieldQueries extends BaseRangeFieldQueryTestCase {
private static final String FIELD_NAME = "longRangeField"; private static final String FIELD_NAME = "longRangeField";

View File

@ -33,6 +33,7 @@ import org.apache.lucene.index.IndexWriterConfig;
import org.apache.lucene.index.TestIndexWriterReader; import org.apache.lucene.index.TestIndexWriterReader;
import org.apache.lucene.util.TestUtil; import org.apache.lucene.util.TestUtil;
// See: https://issues.apache.org/jira/browse/SOLR-12028 Tests cannot remove files on Windows machines occasionally
public class TestFileSwitchDirectory extends BaseDirectoryTestCase { public class TestFileSwitchDirectory extends BaseDirectoryTestCase {
/** /**

View File

@ -27,6 +27,7 @@ import org.junit.Ignore;
/** /**
* Tests MMapDirectory * Tests MMapDirectory
*/ */
// See: https://issues.apache.org/jira/browse/SOLR-12028 Tests cannot remove files on Windows machines occasionally
public class TestMmapDirectory extends BaseDirectoryTestCase { public class TestMmapDirectory extends BaseDirectoryTestCase {
@Override @Override

View File

@ -26,6 +26,7 @@ import java.util.Collections;
import org.apache.lucene.codecs.CodecUtil; import org.apache.lucene.codecs.CodecUtil;
import org.apache.lucene.util.IOUtils; import org.apache.lucene.util.IOUtils;
// See: https://issues.apache.org/jira/browse/SOLR-12028 Tests cannot remove files on Windows machines occasionally
public class TestHardLinkCopyDirectoryWrapper extends BaseDirectoryTestCase { public class TestHardLinkCopyDirectoryWrapper extends BaseDirectoryTestCase {
@Override @Override

View File

@ -22,6 +22,7 @@ import java.nio.file.Path;
/** /**
* Tests RAFDirectory * Tests RAFDirectory
*/ */
// See: https://issues.apache.org/jira/browse/SOLR-12028 Tests cannot remove files on Windows machines occasionally
public class TestRAFDirectory extends BaseDirectoryTestCase { public class TestRAFDirectory extends BaseDirectoryTestCase {
@Override @Override

View File

@ -47,6 +47,7 @@ import org.apache.lucene.util.IOUtils;
import org.apache.lucene.util.LuceneTestCase; import org.apache.lucene.util.LuceneTestCase;
import org.junit.Test; import org.junit.Test;
// See: https://issues.apache.org/jira/browse/SOLR-12028 Tests cannot remove files on Windows machines occasionally
public class DocumentDictionaryTest extends LuceneTestCase { public class DocumentDictionaryTest extends LuceneTestCase {
static final String FIELD_NAME = "f1"; static final String FIELD_NAME = "f1";

View File

@ -25,6 +25,7 @@ import java.nio.file.Path;
import org.apache.lucene.document.Document; import org.apache.lucene.document.Document;
import org.apache.lucene.index.RandomIndexWriter; import org.apache.lucene.index.RandomIndexWriter;
// See: https://issues.apache.org/jira/browse/SOLR-12028 Tests cannot remove files on Windows machines occasionally
public class TestMockDirectoryWrapper extends BaseDirectoryTestCase { public class TestMockDirectoryWrapper extends BaseDirectoryTestCase {
@Override @Override

View File

@ -23,6 +23,7 @@ import org.apache.solr.SolrTestCaseJ4;
import org.junit.BeforeClass; import org.junit.BeforeClass;
import org.junit.Test; import org.junit.Test;
// See: https://issues.apache.org/jira/browse/SOLR-12028 Tests cannot remove files on Windows machines occasionally
public class TestFoldingMultitermExtrasQuery extends SolrTestCaseJ4 { public class TestFoldingMultitermExtrasQuery extends SolrTestCaseJ4 {
public String getCoreName() { public String getCoreName() {

View File

@ -33,6 +33,7 @@ import java.util.*;
* *
* @since solr 1.3 * @since solr 1.3
*/ */
// See: https://issues.apache.org/jira/browse/SOLR-12028 Tests cannot remove files on Windows machines occasionally
public class TestDocBuilder extends AbstractDataImportHandlerTestCase { public class TestDocBuilder extends AbstractDataImportHandlerTestCase {
@Override @Override

View File

@ -30,6 +30,7 @@ import org.junit.Test;
@Slow @Slow
@SuppressSSL(bugUrl="https://issues.apache.org/jira/browse/SOLR-9182 - causes OOM") @SuppressSSL(bugUrl="https://issues.apache.org/jira/browse/SOLR-9182 - causes OOM")
// See: https://issues.apache.org/jira/browse/SOLR-12028 Tests cannot remove files on Windows machines occasionally
public class DistributedIntervalFacetingTest extends public class DistributedIntervalFacetingTest extends
BaseDistributedSearchTestCase { BaseDistributedSearchTestCase {

View File

@ -93,6 +93,7 @@ public class AliasIntegrationTest extends SolrCloudTestCase {
} }
@Test @Test
@BadApple(bugUrl="https://issues.apache.org/jira/browse/SOLR-12028")
public void testMetadata() throws Exception { public void testMetadata() throws Exception {
CollectionAdminRequest.createCollection("collection1meta", "conf", 2, 1).process(cluster.getSolrClient()); CollectionAdminRequest.createCollection("collection1meta", "conf", 2, 1).process(cluster.getSolrClient());
CollectionAdminRequest.createCollection("collection2meta", "conf", 1, 1).process(cluster.getSolrClient()); CollectionAdminRequest.createCollection("collection2meta", "conf", 1, 1).process(cluster.getSolrClient());
@ -251,6 +252,8 @@ public class AliasIntegrationTest extends SolrCloudTestCase {
checkFooAndBarMeta(aliasName, zkStateReader); checkFooAndBarMeta(aliasName, zkStateReader);
} }
@Test
@BadApple(bugUrl="https://issues.apache.org/jira/browse/SOLR-12028")
public void testModifyMetadataCAR() throws Exception { public void testModifyMetadataCAR() throws Exception {
// note we don't use TZ in this test, thus it's UTC // note we don't use TZ in this test, thus it's UTC
final String aliasName = getTestName(); final String aliasName = getTestName();

View File

@ -81,6 +81,7 @@ public class ChaosMonkeySafeLeaderTest extends AbstractFullDistribZkTestBase {
} }
@Test @Test
@BadApple(bugUrl="https://issues.apache.org/jira/browse/SOLR-12028")
public void test() throws Exception { public void test() throws Exception {
handle.clear(); handle.clear();

View File

@ -112,6 +112,7 @@ public class ChaosMonkeySafeLeaderWithPullReplicasTest extends AbstractFullDistr
} }
@Test @Test
@BadApple(bugUrl="https://issues.apache.org/jira/browse/SOLR-12028")
public void test() throws Exception { public void test() throws Exception {
DocCollection docCollection = cloudClient.getZkStateReader().getClusterState().getCollection(DEFAULT_COLLECTION); DocCollection docCollection = cloudClient.getZkStateReader().getClusterState().getCollection(DEFAULT_COLLECTION);
assertEquals(this.sliceCount, docCollection.getSlices().size()); assertEquals(this.sliceCount, docCollection.getSlices().size());

View File

@ -76,6 +76,7 @@ public class ForceLeaderTest extends HttpPartitionTest {
*/ */
@Test @Test
@Slow @Slow
@BadApple(bugUrl="https://issues.apache.org/jira/browse/SOLR-12028")
public void testReplicasInLowerTerms() throws Exception { public void testReplicasInLowerTerms() throws Exception {
handle.put("maxScore", SKIPVAL); handle.put("maxScore", SKIPVAL);
handle.put("timestamp", SKIPVAL); handle.put("timestamp", SKIPVAL);

View File

@ -65,6 +65,7 @@ public class LegacyCloudClusterPropTest extends SolrCloudTestCase {
}; };
@Test @Test
@BadApple(bugUrl="https://issues.apache.org/jira/browse/SOLR-12028")
public void testCreateCollectionSwitchLegacyCloud() throws Exception { public void testCreateCollectionSwitchLegacyCloud() throws Exception {
createAndTest("legacyTrue", true); createAndTest("legacyTrue", true);
createAndTest("legacyFalse", false); createAndTest("legacyFalse", false);

View File

@ -89,6 +89,7 @@ public class MissingSegmentRecoveryTest extends SolrCloudTestCase {
} }
@Test @Test
@BadApple(bugUrl="https://issues.apache.org/jira/browse/SOLR-12028")
public void testLeaderRecovery() throws Exception { public void testLeaderRecovery() throws Exception {
System.setProperty("CoreInitFailedAction", "fromleader"); System.setProperty("CoreInitFailedAction", "fromleader");

View File

@ -58,6 +58,7 @@ public class MultiThreadedOCPTest extends AbstractFullDistribZkTestBase {
} }
@Test @Test
@BadApple(bugUrl="https://issues.apache.org/jira/browse/SOLR-12028")
@ShardsFixed(num = 4) @ShardsFixed(num = 4)
public void test() throws Exception { public void test() throws Exception {
testParallelCollectionAPICalls(); testParallelCollectionAPICalls();

View File

@ -185,6 +185,8 @@ public class TestStressCloudBlindAtomicUpdates extends SolrCloudTestCase {
} }
@Test
@BadApple(bugUrl="https://issues.apache.org/jira/browse/SOLR-12028")
public void test_dv() throws Exception { public void test_dv() throws Exception {
String field = "long_dv"; String field = "long_dv";
checkExpectedSchemaField(map("name", field, checkExpectedSchemaField(map("name", field,

View File

@ -51,6 +51,8 @@ public class ZkShardTermsTest extends SolrCloudTestCase {
.configure(); .configure();
} }
@Test
@BadApple(bugUrl="https://issues.apache.org/jira/browse/SOLR-12028")
public void testParticipationOfReplicas() throws IOException, SolrServerException, InterruptedException { public void testParticipationOfReplicas() throws IOException, SolrServerException, InterruptedException {
String collection = "collection1"; String collection = "collection1";
try (ZkShardTerms zkShardTerms = new ZkShardTerms(collection, "shard2", cluster.getZkClient())) { try (ZkShardTerms zkShardTerms = new ZkShardTerms(collection, "shard2", cluster.getZkClient())) {

View File

@ -420,6 +420,8 @@ public class CollectionsAPIDistributedZkTest extends SolrCloudTestCase {
} }
@Test @Test
@BadApple(bugUrl="https://issues.apache.org/jira/browse/SOLR-12028")
// See: https://issues.apache.org/jira/browse/SOLR-12028 Tests cannot remove files on Windows machines occasionally
public void testCollectionsAPI() throws Exception { public void testCollectionsAPI() throws Exception {
// create new collections rapid fire // create new collections rapid fire

View File

@ -258,6 +258,7 @@ public class ShardSplitTest extends BasicDistributedZkTest {
* See SOLR-9439 * See SOLR-9439
*/ */
@Test @Test
@BadApple(bugUrl="https://issues.apache.org/jira/browse/SOLR-12028")
public void testSplitAfterFailedSplit() throws Exception { public void testSplitAfterFailedSplit() throws Exception {
waitForThingsToLevelOut(15); waitForThingsToLevelOut(15);
@ -304,6 +305,7 @@ public class ShardSplitTest extends BasicDistributedZkTest {
} }
@Test @Test
@BadApple(bugUrl="https://issues.apache.org/jira/browse/SOLR-12028")
public void testSplitWithChaosMonkey() throws Exception { public void testSplitWithChaosMonkey() throws Exception {
waitForThingsToLevelOut(15); waitForThingsToLevelOut(15);

View File

@ -94,6 +94,7 @@ public class TestCollectionsAPIViaSolrCloudCluster extends SolrCloudTestCase {
} }
@Test @Test
@BadApple(bugUrl="https://issues.apache.org/jira/browse/SOLR-12028")
public void testCollectionCreateSearchDelete() throws Exception { public void testCollectionCreateSearchDelete() throws Exception {
final CloudSolrClient client = cluster.getSolrClient(); final CloudSolrClient client = cluster.getSolrClient();
final String collectionName = "testcollection"; final String collectionName = "testcollection";

View File

@ -54,6 +54,7 @@ public class AutoAddReplicasPlanActionTest extends SolrCloudTestCase{
} }
@Test @Test
@BadApple(bugUrl="https://issues.apache.org/jira/browse/SOLR-12028")
public void testSimple() throws Exception { public void testSimple() throws Exception {
JettySolrRunner jetty1 = cluster.getJettySolrRunner(0); JettySolrRunner jetty1 = cluster.getJettySolrRunner(0);
JettySolrRunner jetty2 = cluster.getJettySolrRunner(1); JettySolrRunner jetty2 = cluster.getJettySolrRunner(1);

View File

@ -57,6 +57,7 @@ public class ScheduledTriggerTest extends SolrCloudTestCase {
} }
@Test @Test
@BadApple(bugUrl="https://issues.apache.org/jira/browse/SOLR-12028")
public void testTrigger() throws Exception { public void testTrigger() throws Exception {
CoreContainer container = cluster.getJettySolrRunners().get(0).getCoreContainer(); CoreContainer container = cluster.getJettySolrRunners().get(0).getCoreContainer();

View File

@ -255,6 +255,7 @@ public class TestTriggerIntegration extends SimSolrCloudTestCase {
} }
@Test @Test
@BadApple(bugUrl="https://issues.apache.org/jira/browse/SOLR-12028")
public void testNodeLostTriggerRestoreState() throws Exception { public void testNodeLostTriggerRestoreState() throws Exception {
// for this test we want to update the trigger so we must assert that the actions were created twice // for this test we want to update the trigger so we must assert that the actions were created twice
TestTriggerIntegration.actionInitCalled = new CountDownLatch(2); TestTriggerIntegration.actionInitCalled = new CountDownLatch(2);
@ -756,6 +757,7 @@ public class TestTriggerIntegration extends SimSolrCloudTestCase {
} }
@Test @Test
@BadApple(bugUrl="https://issues.apache.org/jira/browse/SOLR-12028")
public void testNodeMarkersRegistration() throws Exception { public void testNodeMarkersRegistration() throws Exception {
// for this test we want to create two triggers so we must assert that the actions were created twice // for this test we want to create two triggers so we must assert that the actions were created twice
actionInitCalled = new CountDownLatch(2); actionInitCalled = new CountDownLatch(2);

View File

@ -36,6 +36,7 @@ import org.noggit.ObjectBuilder;
* Test that a ConfigSet marked as immutable cannot be modified via * Test that a ConfigSet marked as immutable cannot be modified via
* the known APIs, i.e. SolrConfigHandler and SchemaHandler. * the known APIs, i.e. SolrConfigHandler and SchemaHandler.
*/ */
// See: https://issues.apache.org/jira/browse/SOLR-12028 Tests cannot remove files on Windows machines occasionally
public class TestConfigSetImmutable extends RestTestBase { public class TestConfigSetImmutable extends RestTestBase {
private static final String collection = "collection1"; private static final String collection = "collection1";

View File

@ -45,6 +45,7 @@ public class TestDynamicLoading extends AbstractFullDistribZkTestBase {
} }
@Test @Test
@BadApple(bugUrl="https://issues.apache.org/jira/browse/SOLR-12028")
public void testDynamicLoading() throws Exception { public void testDynamicLoading() throws Exception {
System.setProperty("enable.runtime.lib", "true"); System.setProperty("enable.runtime.lib", "true");
setupRestTestHarnesses(); setupRestTestHarnesses();

View File

@ -27,6 +27,7 @@ import org.apache.solr.util.RandomMergePolicy;
import org.apache.solr.update.LoggingInfoStream; import org.apache.solr.update.LoggingInfoStream;
import org.junit.BeforeClass; import org.junit.BeforeClass;
// See: https://issues.apache.org/jira/browse/SOLR-12028 Tests cannot remove files on Windows machines occasionally
public class TestSolrIndexConfig extends SolrTestCaseJ4 { public class TestSolrIndexConfig extends SolrTestCaseJ4 {
@BeforeClass @BeforeClass

View File

@ -35,6 +35,7 @@ import org.junit.Test;
/** /**
* *
*/ */
// See: https://issues.apache.org/jira/browse/SOLR-12028 Tests cannot remove files on Windows machines occasionally
public class DistributedQueryElevationComponentTest extends BaseDistributedSearchTestCase { public class DistributedQueryElevationComponentTest extends BaseDistributedSearchTestCase {
@BeforeClass @BeforeClass

View File

@ -36,6 +36,7 @@ import org.junit.Test;
import org.noggit.JSONUtil; import org.noggit.JSONUtil;
import org.restlet.ext.servlet.ServerServlet; import org.restlet.ext.servlet.ServerServlet;
// See: https://issues.apache.org/jira/browse/SOLR-12028 Tests cannot remove files on Windows machines occasionally
public class TestManagedSynonymGraphFilterFactory extends RestTestBase { public class TestManagedSynonymGraphFilterFactory extends RestTestBase {
private static File tmpSolrHome; private static File tmpSolrHome;

View File

@ -44,6 +44,7 @@ import java.util.function.UnaryOperator;
* Tests a schemaless collection configuration with SolrCloud * Tests a schemaless collection configuration with SolrCloud
*/ */
@SuppressSSL(bugUrl = "https://issues.apache.org/jira/browse/SOLR-5776") @SuppressSSL(bugUrl = "https://issues.apache.org/jira/browse/SOLR-5776")
// See: https://issues.apache.org/jira/browse/SOLR-12028 Tests cannot remove files on Windows machines occasionally
public class TestCloudSchemaless extends AbstractFullDistribZkTestBase { public class TestCloudSchemaless extends AbstractFullDistribZkTestBase {
private static final Logger log = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass()); private static final Logger log = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());
private static final String SUCCESS_XPATH = "/response/lst[@name='responseHeader']/int[@name='status'][.='0']"; private static final String SUCCESS_XPATH = "/response/lst[@name='responseHeader']/int[@name='status'][.='0']";

View File

@ -32,6 +32,7 @@ import org.noggit.ObjectBuilder;
/** /**
* Tests the useDocValuesAsStored functionality. * Tests the useDocValuesAsStored functionality.
*/ */
// See: https://issues.apache.org/jira/browse/SOLR-12028 Tests cannot remove files on Windows machines occasionally
public class TestUseDocValuesAsStored2 extends RestTestBase { public class TestUseDocValuesAsStored2 extends RestTestBase {
@Before @Before

View File

@ -23,6 +23,7 @@ import org.apache.solr.common.SolrDocumentList;
import org.apache.solr.common.params.ModifiableSolrParams; import org.apache.solr.common.params.ModifiableSolrParams;
import org.junit.Test; import org.junit.Test;
// See: https://issues.apache.org/jira/browse/SOLR-12028 Tests cannot remove files on Windows machines occasionally
public class TestDefaultStatsCache extends BaseDistributedSearchTestCase { public class TestDefaultStatsCache extends BaseDistributedSearchTestCase {
private int docId = 0; private int docId = 0;

View File

@ -56,6 +56,7 @@ import org.junit.BeforeClass;
import org.junit.Test; import org.junit.Test;
import org.xml.sax.SAXException; import org.xml.sax.SAXException;
// See: https://issues.apache.org/jira/browse/SOLR-12028 Tests cannot remove files on Windows machines occasionally
public class SolrCmdDistributorTest extends BaseDistributedSearchTestCase { public class SolrCmdDistributorTest extends BaseDistributedSearchTestCase {
private AtomicInteger id = new AtomicInteger(); private AtomicInteger id = new AtomicInteger();

View File

@ -56,6 +56,7 @@ public class TestV2Request extends SolrCloudTestCase {
} }
@Test @Test
@BadApple(bugUrl="https://issues.apache.org/jira/browse/SOLR-12028")
public void testHttpSolrClient() throws Exception { public void testHttpSolrClient() throws Exception {
HttpSolrClient solrClient = new HttpSolrClient.Builder( HttpSolrClient solrClient = new HttpSolrClient.Builder(
cluster.getJettySolrRunner(0).getBaseUrl().toString()).build(); cluster.getJettySolrRunner(0).getBaseUrl().toString()).build();
@ -64,6 +65,7 @@ public class TestV2Request extends SolrCloudTestCase {
} }
@Test @Test
@BadApple(bugUrl="https://issues.apache.org/jira/browse/SOLR-12028")
public void testCloudSolrClient() throws Exception { public void testCloudSolrClient() throws Exception {
doTest(cluster.getSolrClient()); doTest(cluster.getSolrClient());
} }