From c53cc3edafbb00c9b1f411af7c2abf48e9b75288 Mon Sep 17 00:00:00 2001 From: Robert Muir Date: Fri, 24 Jan 2020 08:58:59 -0500 Subject: [PATCH] LUCENE-9167: test speedup for slowest/pathological tests (round 3) --- .../org/apache/lucene/analysis/ar/TestArabicAnalyzer.java | 2 +- .../apache/lucene/analysis/bn/TestBengaliAnalyzer.java | 2 +- .../org/apache/lucene/analysis/cjk/TestCJKAnalyzer.java | 2 +- .../apache/lucene/analysis/cjk/TestCJKBigramFilter.java | 4 ++-- .../apache/lucene/analysis/cjk/TestCJKWidthFilter.java | 2 +- .../analysis/commongrams/CommonGramsFilterTest.java | 2 +- .../analysis/compound/TestCompoundWordTokenFilter.java | 2 +- .../lucene/analysis/core/TestDecimalDigitFilter.java | 2 +- .../apache/lucene/analysis/core/TestKeywordAnalyzer.java | 2 +- .../org/apache/lucene/analysis/cz/TestCzechAnalyzer.java | 2 +- .../org/apache/lucene/analysis/da/TestDanishAnalyzer.java | 2 +- .../lucene/analysis/de/TestGermanLightStemFilter.java | 2 +- .../lucene/analysis/de/TestGermanMinimalStemFilter.java | 2 +- .../lucene/analysis/de/TestGermanNormalizationFilter.java | 2 +- .../apache/lucene/analysis/de/TestGermanStemFilter.java | 2 +- .../lucene/analysis/en/TestEnglishMinimalStemFilter.java | 2 +- .../lucene/analysis/es/TestSpanishLightStemFilter.java | 2 +- .../apache/lucene/analysis/fa/TestPersianCharFilter.java | 2 +- .../lucene/analysis/fi/TestFinnishLightStemFilter.java | 2 +- .../lucene/analysis/fr/TestFrenchLightStemFilter.java | 2 +- .../lucene/analysis/fr/TestFrenchMinimalStemFilter.java | 2 +- .../apache/lucene/analysis/gl/TestGalicianAnalyzer.java | 2 +- .../org/apache/lucene/analysis/hi/TestHindiAnalyzer.java | 2 +- .../apache/lucene/analysis/hu/TestHungarianAnalyzer.java | 2 +- .../lucene/analysis/hunspell/TestHunspellStemFilter.java | 2 +- .../apache/lucene/analysis/hy/TestArmenianAnalyzer.java | 2 +- .../apache/lucene/analysis/id/TestIndonesianAnalyzer.java | 2 +- .../apache/lucene/analysis/it/TestItalianAnalyzer.java | 2 +- .../lucene/analysis/it/TestItalianLightStemFilter.java | 2 +- .../apache/lucene/analysis/lt/TestLithuanianAnalyzer.java | 2 +- .../apache/lucene/analysis/lv/TestLatvianAnalyzer.java | 2 +- .../miscellaneous/TestRemoveDuplicatesTokenFilter.java | 2 +- .../miscellaneous/TestScandinavianFoldingFilter.java | 2 +- .../TestScandinavianNormalizationFilter.java | 2 +- .../analysis/miscellaneous/TestWordDelimiterFilter.java | 2 +- .../miscellaneous/TestWordDelimiterGraphFilter.java | 2 +- .../lucene/analysis/ngram/EdgeNGramTokenFilterTest.java | 2 +- .../lucene/analysis/ngram/NGramTokenFilterTest.java | 2 +- .../apache/lucene/analysis/ngram/NGramTokenizerTest.java | 2 +- .../org/apache/lucene/analysis/nl/TestDutchAnalyzer.java | 2 +- .../apache/lucene/analysis/no/TestNorwegianAnalyzer.java | 2 +- .../lucene/analysis/no/TestNorwegianLightStemFilter.java | 2 +- .../analysis/no/TestNorwegianMinimalStemFilter.java | 2 +- .../lucene/analysis/path/TestPathHierarchyTokenizer.java | 2 +- .../analysis/path/TestReversePathHierarchyTokenizer.java | 2 +- .../lucene/analysis/pattern/TestPatternReplaceFilter.java | 2 +- .../lucene/analysis/pattern/TestPatternTokenizer.java | 2 +- .../analysis/pattern/TestSimplePatternSplitTokenizer.java | 2 +- .../analysis/pattern/TestSimplePatternTokenizer.java | 2 +- .../apache/lucene/analysis/pt/TestPortugueseAnalyzer.java | 2 +- .../lucene/analysis/pt/TestPortugueseLightStemFilter.java | 2 +- .../analysis/pt/TestPortugueseMinimalStemFilter.java | 2 +- .../lucene/analysis/pt/TestPortugueseStemFilter.java | 2 +- .../apache/lucene/analysis/ro/TestRomanianAnalyzer.java | 2 +- .../apache/lucene/analysis/ru/TestRussianAnalyzer.java | 2 +- .../lucene/analysis/ru/TestRussianLightStemFilter.java | 2 +- .../apache/lucene/analysis/shingle/ShingleFilterTest.java | 2 +- .../analysis/sr/TestSerbianNormalizationFilter.java | 2 +- .../sr/TestSerbianNormalizationRegularFilter.java | 2 +- .../lucene/analysis/standard/TestClassicAnalyzer.java | 4 ++-- .../analysis/standard/TestUAX29URLEmailTokenizer.java | 2 +- .../apache/lucene/analysis/sv/TestSwedishAnalyzer.java | 2 +- .../lucene/analysis/sv/TestSwedishLightStemFilter.java | 2 +- .../lucene/analysis/synonym/TestSynonymGraphFilter.java | 4 ++-- .../lucene/analysis/synonym/TestSynonymMapFilter.java | 2 +- .../org/apache/lucene/analysis/th/TestThaiAnalyzer.java | 4 ++-- .../apache/lucene/analysis/tr/TestTurkishAnalyzer.java | 2 +- .../lucene/analysis/util/TestRollingCharBuffer.java | 2 +- .../lucene/analysis/util/TestSegmentingTokenizerBase.java | 4 ++-- .../lucene/analysis/wikipedia/WikipediaTokenizerTest.java | 4 ++-- .../lucene/collation/TestCollationDocValuesField.java | 4 ++-- .../analysis/icu/segmentation/TestICUTokenizer.java | 2 +- .../analysis/icu/segmentation/TestICUTokenizerCJK.java | 2 +- .../org/apache/lucene/analysis/ja/TestExtendedMode.java | 6 ++++++ .../analysis/ja/TestJapaneseKatakanaStemFilter.java | 2 +- .../lucene/analysis/ja/TestJapaneseReadingFormFilter.java | 4 ++-- .../apache/lucene/analysis/ja/TestJapaneseTokenizer.java | 3 ++- .../apache/lucene/analysis/uk/TestUkrainianAnalyzer.java | 2 +- .../lucene/analysis/ko/TestKoreanReadingFormFilter.java | 2 +- .../apache/lucene/analysis/ko/TestKoreanTokenizer.java | 2 +- .../lucene/analysis/phonetic/TestPhoneticFilter.java | 2 +- .../org/apache/lucene/analysis/pl/TestPolishAnalyzer.java | 2 +- .../lucene/benchmark/byTask/TestPerfTasksLogic.java | 2 ++ .../lucene/classification/utils/DataSplitterTest.java | 1 + .../lucene/analysis/standard/TestStandardAnalyzer.java | 2 +- .../tokenattributes/TestCharTermAttributeImpl.java | 1 + .../lucene/codecs/lucene60/TestLucene60PointsFormat.java | 4 ++-- .../apache/lucene/codecs/lucene80/TestIndexedDISI.java | 6 ++++-- .../codecs/perfield/TestPerFieldPostingsFormat2.java | 1 + .../org/apache/lucene/document/BaseShapeTestCase.java | 2 +- .../document/TestLatLonPointDistanceFeatureQuery.java | 5 +++-- .../lucene/document/TestXYMultiPolygonShapeQueries.java | 2 ++ .../test/org/apache/lucene/index/TestDirectoryReader.java | 1 + .../org/apache/lucene/index/TestIndexWriterCommit.java | 2 ++ .../org/apache/lucene/index/TestIndexWriterDelete.java | 3 ++- .../org/apache/lucene/index/TestIndexWriterMaxDocs.java | 2 ++ .../apache/lucene/index/TestIndexWriterMergePolicy.java | 1 + .../lucene/index/TestIndexWriterThreadsToSegments.java | 1 + .../apache/lucene/index/TestIndexWriterWithThreads.java | 4 ++-- .../src/test/org/apache/lucene/index/TestManyFields.java | 1 + .../src/test/org/apache/lucene/index/TestNRTThreads.java | 2 +- .../apache/lucene/index/TestSnapshotDeletionPolicy.java | 4 ++-- .../src/test/org/apache/lucene/index/TestTermsEnum.java | 2 +- .../test/org/apache/lucene/search/TestBooleanScorer.java | 7 ++++--- .../org/apache/lucene/search/TestDisjunctionMaxQuery.java | 1 + .../org/apache/lucene/search/TestDoubleValuesSource.java | 1 + .../src/test/org/apache/lucene/search/TestFuzzyQuery.java | 2 +- .../test/org/apache/lucene/search/TestLRUQueryCache.java | 2 +- .../org/apache/lucene/search/TestMinShouldMatch2.java | 1 + .../test/org/apache/lucene/search/TestPhraseQuery.java | 6 +++--- .../test/org/apache/lucene/search/TestPointQueries.java | 1 + .../test/org/apache/lucene/search/TestRegexpRandom2.java | 2 +- .../src/test/org/apache/lucene/search/TestTermScorer.java | 2 +- .../test/org/apache/lucene/util/TestOfflineSorter.java | 2 +- .../src/test/org/apache/lucene/util/TestPagedBytes.java | 6 ++++-- .../org/apache/lucene/util/automaton/TestUTF32ToUTF8.java | 2 +- .../apache/lucene/expressions/TestExpressionSorts.java | 2 +- .../facet/taxonomy/TestSearcherTaxonomyManager.java | 2 ++ .../lucene/facet/taxonomy/directory/TestAddTaxonomy.java | 2 ++ .../taxonomy/directory/TestDirectoryTaxonomyWriter.java | 3 ++- .../search/grouping/AllGroupHeadsCollectorTest.java | 2 +- .../search/grouping/DistinctValuesCollectorTest.java | 3 +-- .../lucene/search/grouping/GroupFacetCollectorTest.java | 2 +- .../test/org/apache/lucene/search/join/TestBlockJoin.java | 2 +- .../codecs/idversion/TestIDVersionPostingsFormat.java | 4 ++-- .../org/apache/lucene/search/TestTermAutomatonQuery.java | 1 + .../spatial/prefix/TestRecursivePrefixTreeStrategy.java | 2 ++ .../spatial3d/geom/RandomGeoShapeRelationshipTest.java | 3 ++- .../org/apache/lucene/index/BasePointsFormatTestCase.java | 8 ++++---- .../lucene/index/BaseStoredFieldsFormatTestCase.java | 2 +- .../lucene/index/BaseTermVectorsFormatTestCase.java | 7 ++++--- .../index/ThreadedIndexingAndSearchingTestCase.java | 4 ++-- .../org/apache/lucene/store/BaseLockFactoryTestCase.java | 7 ++++--- .../java/org/apache/lucene/util/BaseBitSetTestCase.java | 2 +- .../compressing/TestCompressingStoredFieldsFormat.java | 8 ++++++-- .../compressing/TestCompressingTermVectorsFormat.java | 6 +++++- 136 files changed, 196 insertions(+), 145 deletions(-) diff --git a/lucene/analysis/common/src/test/org/apache/lucene/analysis/ar/TestArabicAnalyzer.java b/lucene/analysis/common/src/test/org/apache/lucene/analysis/ar/TestArabicAnalyzer.java index b861eaf6326..2ace0ee670f 100644 --- a/lucene/analysis/common/src/test/org/apache/lucene/analysis/ar/TestArabicAnalyzer.java +++ b/lucene/analysis/common/src/test/org/apache/lucene/analysis/ar/TestArabicAnalyzer.java @@ -112,7 +112,7 @@ public class TestArabicAnalyzer extends BaseTokenStreamTestCase { /** blast some random strings through the analyzer */ public void testRandomStrings() throws Exception { ArabicAnalyzer a = new ArabicAnalyzer(); - checkRandomData(random(), a, 200*RANDOM_MULTIPLIER); + checkRandomData(random(), a, 200 * RANDOM_MULTIPLIER); a.close(); } } diff --git a/lucene/analysis/common/src/test/org/apache/lucene/analysis/bn/TestBengaliAnalyzer.java b/lucene/analysis/common/src/test/org/apache/lucene/analysis/bn/TestBengaliAnalyzer.java index e04f209746e..7d6c5657bcc 100644 --- a/lucene/analysis/common/src/test/org/apache/lucene/analysis/bn/TestBengaliAnalyzer.java +++ b/lucene/analysis/common/src/test/org/apache/lucene/analysis/bn/TestBengaliAnalyzer.java @@ -47,7 +47,7 @@ public class TestBengaliAnalyzer extends BaseTokenStreamTestCase { /** blast some random strings through the analyzer */ public void testRandomStrings() throws Exception { Analyzer analyzer = new BengaliAnalyzer(); - checkRandomData(random(), analyzer, 1000*RANDOM_MULTIPLIER); + checkRandomData(random(), analyzer, 200 * RANDOM_MULTIPLIER); analyzer.close(); } } diff --git a/lucene/analysis/common/src/test/org/apache/lucene/analysis/cjk/TestCJKAnalyzer.java b/lucene/analysis/common/src/test/org/apache/lucene/analysis/cjk/TestCJKAnalyzer.java index f65c8f7d999..fc435f4c17a 100644 --- a/lucene/analysis/common/src/test/org/apache/lucene/analysis/cjk/TestCJKAnalyzer.java +++ b/lucene/analysis/common/src/test/org/apache/lucene/analysis/cjk/TestCJKAnalyzer.java @@ -293,7 +293,7 @@ public class TestCJKAnalyzer extends BaseTokenStreamTestCase { /** blast some random strings through the analyzer */ public void testRandomHugeStrings() throws Exception { Analyzer a = new CJKAnalyzer(); - checkRandomData(random(), a, 100*RANDOM_MULTIPLIER, 8192); + checkRandomData(random(), a, 10 * RANDOM_MULTIPLIER, 8192); a.close(); } diff --git a/lucene/analysis/common/src/test/org/apache/lucene/analysis/cjk/TestCJKBigramFilter.java b/lucene/analysis/common/src/test/org/apache/lucene/analysis/cjk/TestCJKBigramFilter.java index 35facbfe2f1..e62f4c99c43 100644 --- a/lucene/analysis/common/src/test/org/apache/lucene/analysis/cjk/TestCJKBigramFilter.java +++ b/lucene/analysis/common/src/test/org/apache/lucene/analysis/cjk/TestCJKBigramFilter.java @@ -170,12 +170,12 @@ public class TestCJKBigramFilter extends BaseTokenStreamTestCase { /** blast some random strings through the analyzer */ public void testRandomUnibiStrings() throws Exception { - checkRandomData(random(), unibiAnalyzer, 1000*RANDOM_MULTIPLIER); + checkRandomData(random(), unibiAnalyzer, 200 * RANDOM_MULTIPLIER); } /** blast some random strings through the analyzer */ public void testRandomUnibiHugeStrings() throws Exception { Random random = random(); - checkRandomData(random, unibiAnalyzer, 100*RANDOM_MULTIPLIER, 8192); + checkRandomData(random, unibiAnalyzer, 10 * RANDOM_MULTIPLIER, 8192); } } diff --git a/lucene/analysis/common/src/test/org/apache/lucene/analysis/cjk/TestCJKWidthFilter.java b/lucene/analysis/common/src/test/org/apache/lucene/analysis/cjk/TestCJKWidthFilter.java index 63e4fd79625..03ea0c4ee13 100644 --- a/lucene/analysis/common/src/test/org/apache/lucene/analysis/cjk/TestCJKWidthFilter.java +++ b/lucene/analysis/common/src/test/org/apache/lucene/analysis/cjk/TestCJKWidthFilter.java @@ -74,7 +74,7 @@ public class TestCJKWidthFilter extends BaseTokenStreamTestCase { } public void testRandomData() throws IOException { - checkRandomData(random(), analyzer, 1000*RANDOM_MULTIPLIER); + checkRandomData(random(), analyzer, 200 * RANDOM_MULTIPLIER); } public void testEmptyTerm() throws IOException { diff --git a/lucene/analysis/common/src/test/org/apache/lucene/analysis/commongrams/CommonGramsFilterTest.java b/lucene/analysis/common/src/test/org/apache/lucene/analysis/commongrams/CommonGramsFilterTest.java index e344ec37830..429f64b29c9 100644 --- a/lucene/analysis/common/src/test/org/apache/lucene/analysis/commongrams/CommonGramsFilterTest.java +++ b/lucene/analysis/common/src/test/org/apache/lucene/analysis/commongrams/CommonGramsFilterTest.java @@ -347,7 +347,7 @@ public class CommonGramsFilterTest extends BaseTokenStreamTestCase { } }; - checkRandomData(random(), b, 1000*RANDOM_MULTIPLIER); + checkRandomData(random(), b, 200 * RANDOM_MULTIPLIER); b.close(); } } diff --git a/lucene/analysis/common/src/test/org/apache/lucene/analysis/compound/TestCompoundWordTokenFilter.java b/lucene/analysis/common/src/test/org/apache/lucene/analysis/compound/TestCompoundWordTokenFilter.java index 46fe0966867..f107a25a312 100644 --- a/lucene/analysis/common/src/test/org/apache/lucene/analysis/compound/TestCompoundWordTokenFilter.java +++ b/lucene/analysis/common/src/test/org/apache/lucene/analysis/compound/TestCompoundWordTokenFilter.java @@ -389,7 +389,7 @@ public class TestCompoundWordTokenFilter extends BaseTokenStreamTestCase { return new TokenStreamComponents(tokenizer, filter); } }; - checkRandomData(random(), b, 1000*RANDOM_MULTIPLIER); + checkRandomData(random(), b, 200 * RANDOM_MULTIPLIER); b.close(); } diff --git a/lucene/analysis/common/src/test/org/apache/lucene/analysis/core/TestDecimalDigitFilter.java b/lucene/analysis/common/src/test/org/apache/lucene/analysis/core/TestDecimalDigitFilter.java index e6af49d530b..6430b1b4c57 100644 --- a/lucene/analysis/common/src/test/org/apache/lucene/analysis/core/TestDecimalDigitFilter.java +++ b/lucene/analysis/common/src/test/org/apache/lucene/analysis/core/TestDecimalDigitFilter.java @@ -180,7 +180,7 @@ public class TestDecimalDigitFilter extends BaseTokenStreamTestCase { * blast some random strings through the filter */ public void testRandomStrings() throws Exception { - checkRandomData(random(), tokenized, 1000*RANDOM_MULTIPLIER); + checkRandomData(random(), tokenized, 200 * RANDOM_MULTIPLIER); } /** returns a psuedo-random codepoint which is a Decimal Digit */ diff --git a/lucene/analysis/common/src/test/org/apache/lucene/analysis/core/TestKeywordAnalyzer.java b/lucene/analysis/common/src/test/org/apache/lucene/analysis/core/TestKeywordAnalyzer.java index d0da8861112..486bee024e4 100644 --- a/lucene/analysis/common/src/test/org/apache/lucene/analysis/core/TestKeywordAnalyzer.java +++ b/lucene/analysis/common/src/test/org/apache/lucene/analysis/core/TestKeywordAnalyzer.java @@ -130,7 +130,7 @@ public class TestKeywordAnalyzer extends BaseTokenStreamTestCase { /** blast some random strings through the analyzer */ public void testRandomStrings() throws Exception { Analyzer analyzer = new KeywordAnalyzer(); - checkRandomData(random(), analyzer, 1000*RANDOM_MULTIPLIER); + checkRandomData(random(), analyzer, 200 * RANDOM_MULTIPLIER); analyzer.close(); } } diff --git a/lucene/analysis/common/src/test/org/apache/lucene/analysis/cz/TestCzechAnalyzer.java b/lucene/analysis/common/src/test/org/apache/lucene/analysis/cz/TestCzechAnalyzer.java index 966b1fd1d3d..fbb33cd7a11 100644 --- a/lucene/analysis/common/src/test/org/apache/lucene/analysis/cz/TestCzechAnalyzer.java +++ b/lucene/analysis/common/src/test/org/apache/lucene/analysis/cz/TestCzechAnalyzer.java @@ -63,7 +63,7 @@ public class TestCzechAnalyzer extends BaseTokenStreamTestCase { /** blast some random strings through the analyzer */ public void testRandomStrings() throws Exception { Analyzer analyzer = new CzechAnalyzer(); - checkRandomData(random(), analyzer, 1000*RANDOM_MULTIPLIER); + checkRandomData(random(), analyzer, 200 * RANDOM_MULTIPLIER); analyzer.close(); } } diff --git a/lucene/analysis/common/src/test/org/apache/lucene/analysis/da/TestDanishAnalyzer.java b/lucene/analysis/common/src/test/org/apache/lucene/analysis/da/TestDanishAnalyzer.java index 199981e585d..137e91d0185 100644 --- a/lucene/analysis/common/src/test/org/apache/lucene/analysis/da/TestDanishAnalyzer.java +++ b/lucene/analysis/common/src/test/org/apache/lucene/analysis/da/TestDanishAnalyzer.java @@ -54,7 +54,7 @@ public class TestDanishAnalyzer extends BaseTokenStreamTestCase { /** blast some random strings through the analyzer */ public void testRandomStrings() throws Exception { Analyzer analyzer = new DanishAnalyzer(); - checkRandomData(random(), analyzer, 1000*RANDOM_MULTIPLIER); + checkRandomData(random(), analyzer, 200 * RANDOM_MULTIPLIER); analyzer.close(); } } diff --git a/lucene/analysis/common/src/test/org/apache/lucene/analysis/de/TestGermanLightStemFilter.java b/lucene/analysis/common/src/test/org/apache/lucene/analysis/de/TestGermanLightStemFilter.java index cb67e93b046..04fa7129502 100644 --- a/lucene/analysis/common/src/test/org/apache/lucene/analysis/de/TestGermanLightStemFilter.java +++ b/lucene/analysis/common/src/test/org/apache/lucene/analysis/de/TestGermanLightStemFilter.java @@ -75,7 +75,7 @@ public class TestGermanLightStemFilter extends BaseTokenStreamTestCase { /** blast some random strings through the analyzer */ public void testRandomStrings() throws Exception { - checkRandomData(random(), analyzer, 1000*RANDOM_MULTIPLIER); + checkRandomData(random(), analyzer, 200 * RANDOM_MULTIPLIER); } public void testEmptyTerm() throws IOException { diff --git a/lucene/analysis/common/src/test/org/apache/lucene/analysis/de/TestGermanMinimalStemFilter.java b/lucene/analysis/common/src/test/org/apache/lucene/analysis/de/TestGermanMinimalStemFilter.java index 35a8004dcf5..0b53e839b27 100644 --- a/lucene/analysis/common/src/test/org/apache/lucene/analysis/de/TestGermanMinimalStemFilter.java +++ b/lucene/analysis/common/src/test/org/apache/lucene/analysis/de/TestGermanMinimalStemFilter.java @@ -87,7 +87,7 @@ public class TestGermanMinimalStemFilter extends BaseTokenStreamTestCase { /** blast some random strings through the analyzer */ public void testRandomStrings() throws Exception { - checkRandomData(random(), analyzer, 1000*RANDOM_MULTIPLIER); + checkRandomData(random(), analyzer, 200 * RANDOM_MULTIPLIER); } public void testEmptyTerm() throws IOException { diff --git a/lucene/analysis/common/src/test/org/apache/lucene/analysis/de/TestGermanNormalizationFilter.java b/lucene/analysis/common/src/test/org/apache/lucene/analysis/de/TestGermanNormalizationFilter.java index 77d71b42042..9d6866de760 100644 --- a/lucene/analysis/common/src/test/org/apache/lucene/analysis/de/TestGermanNormalizationFilter.java +++ b/lucene/analysis/common/src/test/org/apache/lucene/analysis/de/TestGermanNormalizationFilter.java @@ -75,7 +75,7 @@ public class TestGermanNormalizationFilter extends BaseTokenStreamTestCase { /** blast some random strings through the analyzer */ public void testRandomStrings() throws Exception { - checkRandomData(random(), analyzer, 1000*RANDOM_MULTIPLIER); + checkRandomData(random(), analyzer, 200 * RANDOM_MULTIPLIER); } public void testEmptyTerm() throws IOException { diff --git a/lucene/analysis/common/src/test/org/apache/lucene/analysis/de/TestGermanStemFilter.java b/lucene/analysis/common/src/test/org/apache/lucene/analysis/de/TestGermanStemFilter.java index c9d31401fe3..7b7115eb992 100644 --- a/lucene/analysis/common/src/test/org/apache/lucene/analysis/de/TestGermanStemFilter.java +++ b/lucene/analysis/common/src/test/org/apache/lucene/analysis/de/TestGermanStemFilter.java @@ -82,7 +82,7 @@ public class TestGermanStemFilter extends BaseTokenStreamTestCase { /** blast some random strings through the analyzer */ public void testRandomStrings() throws Exception { - checkRandomData(random(), analyzer, 1000*RANDOM_MULTIPLIER); + checkRandomData(random(), analyzer, 200 * RANDOM_MULTIPLIER); } public void testEmptyTerm() throws IOException { diff --git a/lucene/analysis/common/src/test/org/apache/lucene/analysis/en/TestEnglishMinimalStemFilter.java b/lucene/analysis/common/src/test/org/apache/lucene/analysis/en/TestEnglishMinimalStemFilter.java index bf1335f50cd..7e360ec094c 100644 --- a/lucene/analysis/common/src/test/org/apache/lucene/analysis/en/TestEnglishMinimalStemFilter.java +++ b/lucene/analysis/common/src/test/org/apache/lucene/analysis/en/TestEnglishMinimalStemFilter.java @@ -64,7 +64,7 @@ public class TestEnglishMinimalStemFilter extends BaseTokenStreamTestCase { /** blast some random strings through the analyzer */ public void testRandomStrings() throws Exception { - checkRandomData(random(), analyzer, 1000*RANDOM_MULTIPLIER); + checkRandomData(random(), analyzer, 200 * RANDOM_MULTIPLIER); } public void testEmptyTerm() throws IOException { diff --git a/lucene/analysis/common/src/test/org/apache/lucene/analysis/es/TestSpanishLightStemFilter.java b/lucene/analysis/common/src/test/org/apache/lucene/analysis/es/TestSpanishLightStemFilter.java index f10eaf6c657..411a15fa836 100644 --- a/lucene/analysis/common/src/test/org/apache/lucene/analysis/es/TestSpanishLightStemFilter.java +++ b/lucene/analysis/common/src/test/org/apache/lucene/analysis/es/TestSpanishLightStemFilter.java @@ -58,7 +58,7 @@ public class TestSpanishLightStemFilter extends BaseTokenStreamTestCase { /** blast some random strings through the analyzer */ public void testRandomStrings() throws Exception { - checkRandomData(random(), analyzer, 1000*RANDOM_MULTIPLIER); + checkRandomData(random(), analyzer, 200 * RANDOM_MULTIPLIER); } public void testEmptyTerm() throws IOException { diff --git a/lucene/analysis/common/src/test/org/apache/lucene/analysis/fa/TestPersianCharFilter.java b/lucene/analysis/common/src/test/org/apache/lucene/analysis/fa/TestPersianCharFilter.java index 53ad9c52789..463ac2096fa 100644 --- a/lucene/analysis/common/src/test/org/apache/lucene/analysis/fa/TestPersianCharFilter.java +++ b/lucene/analysis/common/src/test/org/apache/lucene/analysis/fa/TestPersianCharFilter.java @@ -55,6 +55,6 @@ public class TestPersianCharFilter extends BaseTokenStreamTestCase { /** blast some random strings through the analyzer */ public void testRandomStrings() throws Exception { - checkRandomData(random(), analyzer, 1000*RANDOM_MULTIPLIER); + checkRandomData(random(), analyzer, 200 * RANDOM_MULTIPLIER); } } diff --git a/lucene/analysis/common/src/test/org/apache/lucene/analysis/fi/TestFinnishLightStemFilter.java b/lucene/analysis/common/src/test/org/apache/lucene/analysis/fi/TestFinnishLightStemFilter.java index 1313aaf210a..2bc1bae23c4 100644 --- a/lucene/analysis/common/src/test/org/apache/lucene/analysis/fi/TestFinnishLightStemFilter.java +++ b/lucene/analysis/common/src/test/org/apache/lucene/analysis/fi/TestFinnishLightStemFilter.java @@ -75,7 +75,7 @@ public class TestFinnishLightStemFilter extends BaseTokenStreamTestCase { /** blast some random strings through the analyzer */ public void testRandomStrings() throws Exception { - checkRandomData(random(), analyzer, 1000*RANDOM_MULTIPLIER); + checkRandomData(random(), analyzer, 200 * RANDOM_MULTIPLIER); } public void testEmptyTerm() throws IOException { diff --git a/lucene/analysis/common/src/test/org/apache/lucene/analysis/fr/TestFrenchLightStemFilter.java b/lucene/analysis/common/src/test/org/apache/lucene/analysis/fr/TestFrenchLightStemFilter.java index a8e18b0304b..38b71545d8a 100644 --- a/lucene/analysis/common/src/test/org/apache/lucene/analysis/fr/TestFrenchLightStemFilter.java +++ b/lucene/analysis/common/src/test/org/apache/lucene/analysis/fr/TestFrenchLightStemFilter.java @@ -205,7 +205,7 @@ public class TestFrenchLightStemFilter extends BaseTokenStreamTestCase { /** blast some random strings through the analyzer */ public void testRandomStrings() throws Exception { - checkRandomData(random(), analyzer, 1000*RANDOM_MULTIPLIER); + checkRandomData(random(), analyzer, 200 * RANDOM_MULTIPLIER); } public void testEmptyTerm() throws IOException { diff --git a/lucene/analysis/common/src/test/org/apache/lucene/analysis/fr/TestFrenchMinimalStemFilter.java b/lucene/analysis/common/src/test/org/apache/lucene/analysis/fr/TestFrenchMinimalStemFilter.java index bf0fc0326f7..119205b57b0 100644 --- a/lucene/analysis/common/src/test/org/apache/lucene/analysis/fr/TestFrenchMinimalStemFilter.java +++ b/lucene/analysis/common/src/test/org/apache/lucene/analysis/fr/TestFrenchMinimalStemFilter.java @@ -106,7 +106,7 @@ public class TestFrenchMinimalStemFilter extends BaseTokenStreamTestCase { /** blast some random strings through the analyzer */ public void testRandomStrings() throws Exception { - checkRandomData(random(), analyzer, 1000*RANDOM_MULTIPLIER); + checkRandomData(random(), analyzer, 200 * RANDOM_MULTIPLIER); } public void testEmptyTerm() throws IOException { diff --git a/lucene/analysis/common/src/test/org/apache/lucene/analysis/gl/TestGalicianAnalyzer.java b/lucene/analysis/common/src/test/org/apache/lucene/analysis/gl/TestGalicianAnalyzer.java index 78e171910e6..b075e37134a 100644 --- a/lucene/analysis/common/src/test/org/apache/lucene/analysis/gl/TestGalicianAnalyzer.java +++ b/lucene/analysis/common/src/test/org/apache/lucene/analysis/gl/TestGalicianAnalyzer.java @@ -54,7 +54,7 @@ public class TestGalicianAnalyzer extends BaseTokenStreamTestCase { /** blast some random strings through the analyzer */ public void testRandomStrings() throws Exception { Analyzer analyzer = new GalicianAnalyzer(); - checkRandomData(random(), analyzer, 1000*RANDOM_MULTIPLIER); + checkRandomData(random(), analyzer, 200 * RANDOM_MULTIPLIER); analyzer.close(); } } diff --git a/lucene/analysis/common/src/test/org/apache/lucene/analysis/hi/TestHindiAnalyzer.java b/lucene/analysis/common/src/test/org/apache/lucene/analysis/hi/TestHindiAnalyzer.java index 54e15a2d657..8abfbd72673 100644 --- a/lucene/analysis/common/src/test/org/apache/lucene/analysis/hi/TestHindiAnalyzer.java +++ b/lucene/analysis/common/src/test/org/apache/lucene/analysis/hi/TestHindiAnalyzer.java @@ -59,7 +59,7 @@ public class TestHindiAnalyzer extends BaseTokenStreamTestCase { /** blast some random strings through the analyzer */ public void testRandomStrings() throws Exception { Analyzer analyzer = new HindiAnalyzer(); - checkRandomData(random(), analyzer, 1000*RANDOM_MULTIPLIER); + checkRandomData(random(), analyzer, 200 * RANDOM_MULTIPLIER); analyzer.close(); } } diff --git a/lucene/analysis/common/src/test/org/apache/lucene/analysis/hu/TestHungarianAnalyzer.java b/lucene/analysis/common/src/test/org/apache/lucene/analysis/hu/TestHungarianAnalyzer.java index cf591db63f1..926b32f49f8 100644 --- a/lucene/analysis/common/src/test/org/apache/lucene/analysis/hu/TestHungarianAnalyzer.java +++ b/lucene/analysis/common/src/test/org/apache/lucene/analysis/hu/TestHungarianAnalyzer.java @@ -54,7 +54,7 @@ public class TestHungarianAnalyzer extends BaseTokenStreamTestCase { /** blast some random strings through the analyzer */ public void testRandomStrings() throws Exception { Analyzer analyzer = new HungarianAnalyzer(); - checkRandomData(random(), analyzer, 1000*RANDOM_MULTIPLIER); + checkRandomData(random(), analyzer, 200 * RANDOM_MULTIPLIER); analyzer.close(); } } diff --git a/lucene/analysis/common/src/test/org/apache/lucene/analysis/hunspell/TestHunspellStemFilter.java b/lucene/analysis/common/src/test/org/apache/lucene/analysis/hunspell/TestHunspellStemFilter.java index 677351eabad..1882e5430c6 100644 --- a/lucene/analysis/common/src/test/org/apache/lucene/analysis/hunspell/TestHunspellStemFilter.java +++ b/lucene/analysis/common/src/test/org/apache/lucene/analysis/hunspell/TestHunspellStemFilter.java @@ -88,7 +88,7 @@ public class TestHunspellStemFilter extends BaseTokenStreamTestCase { return new TokenStreamComponents(tokenizer, new HunspellStemFilter(tokenizer, dictionary)); } }; - checkRandomData(random(), analyzer, 1000*RANDOM_MULTIPLIER); + checkRandomData(random(), analyzer, 200 * RANDOM_MULTIPLIER); analyzer.close(); } diff --git a/lucene/analysis/common/src/test/org/apache/lucene/analysis/hy/TestArmenianAnalyzer.java b/lucene/analysis/common/src/test/org/apache/lucene/analysis/hy/TestArmenianAnalyzer.java index 704187bbc25..29f45221412 100644 --- a/lucene/analysis/common/src/test/org/apache/lucene/analysis/hy/TestArmenianAnalyzer.java +++ b/lucene/analysis/common/src/test/org/apache/lucene/analysis/hy/TestArmenianAnalyzer.java @@ -54,7 +54,7 @@ public class TestArmenianAnalyzer extends BaseTokenStreamTestCase { /** blast some random strings through the analyzer */ public void testRandomStrings() throws Exception { Analyzer analyzer = new ArmenianAnalyzer(); - checkRandomData(random(), analyzer, 1000*RANDOM_MULTIPLIER); + checkRandomData(random(), analyzer, 200 * RANDOM_MULTIPLIER); analyzer.close(); } } diff --git a/lucene/analysis/common/src/test/org/apache/lucene/analysis/id/TestIndonesianAnalyzer.java b/lucene/analysis/common/src/test/org/apache/lucene/analysis/id/TestIndonesianAnalyzer.java index 366bad7ce8f..92c8e748703 100644 --- a/lucene/analysis/common/src/test/org/apache/lucene/analysis/id/TestIndonesianAnalyzer.java +++ b/lucene/analysis/common/src/test/org/apache/lucene/analysis/id/TestIndonesianAnalyzer.java @@ -54,7 +54,7 @@ public class TestIndonesianAnalyzer extends BaseTokenStreamTestCase { /** blast some random strings through the analyzer */ public void testRandomStrings() throws Exception { Analyzer analyzer = new IndonesianAnalyzer(); - checkRandomData(random(), analyzer, 1000*RANDOM_MULTIPLIER); + checkRandomData(random(), analyzer, 200 * RANDOM_MULTIPLIER); analyzer.close(); } } diff --git a/lucene/analysis/common/src/test/org/apache/lucene/analysis/it/TestItalianAnalyzer.java b/lucene/analysis/common/src/test/org/apache/lucene/analysis/it/TestItalianAnalyzer.java index c7c51b8905e..05cf8702710 100644 --- a/lucene/analysis/common/src/test/org/apache/lucene/analysis/it/TestItalianAnalyzer.java +++ b/lucene/analysis/common/src/test/org/apache/lucene/analysis/it/TestItalianAnalyzer.java @@ -54,7 +54,7 @@ public class TestItalianAnalyzer extends BaseTokenStreamTestCase { /** blast some random strings through the analyzer */ public void testRandomStrings() throws Exception { Analyzer analyzer = new ItalianAnalyzer(); - checkRandomData(random(), analyzer, 1000*RANDOM_MULTIPLIER); + checkRandomData(random(), analyzer, 200 * RANDOM_MULTIPLIER); analyzer.close(); } diff --git a/lucene/analysis/common/src/test/org/apache/lucene/analysis/it/TestItalianLightStemFilter.java b/lucene/analysis/common/src/test/org/apache/lucene/analysis/it/TestItalianLightStemFilter.java index f4eb511123c..4fd93781c49 100644 --- a/lucene/analysis/common/src/test/org/apache/lucene/analysis/it/TestItalianLightStemFilter.java +++ b/lucene/analysis/common/src/test/org/apache/lucene/analysis/it/TestItalianLightStemFilter.java @@ -58,7 +58,7 @@ public class TestItalianLightStemFilter extends BaseTokenStreamTestCase { /** blast some random strings through the analyzer */ public void testRandomStrings() throws Exception { - checkRandomData(random(), analyzer, 1000*RANDOM_MULTIPLIER); + checkRandomData(random(), analyzer, 200 * RANDOM_MULTIPLIER); } public void testEmptyTerm() throws IOException { diff --git a/lucene/analysis/common/src/test/org/apache/lucene/analysis/lt/TestLithuanianAnalyzer.java b/lucene/analysis/common/src/test/org/apache/lucene/analysis/lt/TestLithuanianAnalyzer.java index 86c3f16fcf8..b9432c42dbb 100644 --- a/lucene/analysis/common/src/test/org/apache/lucene/analysis/lt/TestLithuanianAnalyzer.java +++ b/lucene/analysis/common/src/test/org/apache/lucene/analysis/lt/TestLithuanianAnalyzer.java @@ -48,6 +48,6 @@ public class TestLithuanianAnalyzer extends BaseTokenStreamTestCase { /** blast some random strings through the analyzer */ public void testRandomStrings() throws Exception { - checkRandomData(random(), new LithuanianAnalyzer(), 1000*RANDOM_MULTIPLIER); + checkRandomData(random(), new LithuanianAnalyzer(), 200 * RANDOM_MULTIPLIER); } } diff --git a/lucene/analysis/common/src/test/org/apache/lucene/analysis/lv/TestLatvianAnalyzer.java b/lucene/analysis/common/src/test/org/apache/lucene/analysis/lv/TestLatvianAnalyzer.java index 5f400b5dcff..0b75bb579b7 100644 --- a/lucene/analysis/common/src/test/org/apache/lucene/analysis/lv/TestLatvianAnalyzer.java +++ b/lucene/analysis/common/src/test/org/apache/lucene/analysis/lv/TestLatvianAnalyzer.java @@ -54,7 +54,7 @@ public class TestLatvianAnalyzer extends BaseTokenStreamTestCase { /** blast some random strings through the analyzer */ public void testRandomStrings() throws Exception { Analyzer analyzer = new LatvianAnalyzer(); - checkRandomData(random(), analyzer, 1000*RANDOM_MULTIPLIER); + checkRandomData(random(), analyzer, 200 * RANDOM_MULTIPLIER); analyzer.close(); } } diff --git a/lucene/analysis/common/src/test/org/apache/lucene/analysis/miscellaneous/TestRemoveDuplicatesTokenFilter.java b/lucene/analysis/common/src/test/org/apache/lucene/analysis/miscellaneous/TestRemoveDuplicatesTokenFilter.java index d1e2e2ee477..43fa5b67553 100644 --- a/lucene/analysis/common/src/test/org/apache/lucene/analysis/miscellaneous/TestRemoveDuplicatesTokenFilter.java +++ b/lucene/analysis/common/src/test/org/apache/lucene/analysis/miscellaneous/TestRemoveDuplicatesTokenFilter.java @@ -142,7 +142,7 @@ public class TestRemoveDuplicatesTokenFilter extends BaseTokenStreamTestCase { /** blast some random strings through the analyzer */ public void testRandomStrings() throws Exception { - final int numIters = atLeast(10); + final int numIters = atLeast(3); for (int i = 0; i < numIters; i++) { SynonymMap.Builder b = new SynonymMap.Builder(random().nextBoolean()); final int numEntries = atLeast(10); diff --git a/lucene/analysis/common/src/test/org/apache/lucene/analysis/miscellaneous/TestScandinavianFoldingFilter.java b/lucene/analysis/common/src/test/org/apache/lucene/analysis/miscellaneous/TestScandinavianFoldingFilter.java index e15527d4312..04ddcfdf6b7 100644 --- a/lucene/analysis/common/src/test/org/apache/lucene/analysis/miscellaneous/TestScandinavianFoldingFilter.java +++ b/lucene/analysis/common/src/test/org/apache/lucene/analysis/miscellaneous/TestScandinavianFoldingFilter.java @@ -130,6 +130,6 @@ public class TestScandinavianFoldingFilter extends BaseTokenStreamTestCase { /** blast some random strings through the analyzer */ public void testRandomData() throws Exception { - checkRandomData(random(), analyzer, 1000*RANDOM_MULTIPLIER); + checkRandomData(random(), analyzer, 200 * RANDOM_MULTIPLIER); } } diff --git a/lucene/analysis/common/src/test/org/apache/lucene/analysis/miscellaneous/TestScandinavianNormalizationFilter.java b/lucene/analysis/common/src/test/org/apache/lucene/analysis/miscellaneous/TestScandinavianNormalizationFilter.java index 6352372cead..64990966939 100644 --- a/lucene/analysis/common/src/test/org/apache/lucene/analysis/miscellaneous/TestScandinavianNormalizationFilter.java +++ b/lucene/analysis/common/src/test/org/apache/lucene/analysis/miscellaneous/TestScandinavianNormalizationFilter.java @@ -128,6 +128,6 @@ public class TestScandinavianNormalizationFilter extends BaseTokenStreamTestCase /** blast some random strings through the analyzer */ public void testRandomData() throws Exception { - checkRandomData(random(), analyzer, 1000*RANDOM_MULTIPLIER); + checkRandomData(random(), analyzer, 200 * RANDOM_MULTIPLIER); } } diff --git a/lucene/analysis/common/src/test/org/apache/lucene/analysis/miscellaneous/TestWordDelimiterFilter.java b/lucene/analysis/common/src/test/org/apache/lucene/analysis/miscellaneous/TestWordDelimiterFilter.java index b6a938d0e25..060eb9b8f70 100644 --- a/lucene/analysis/common/src/test/org/apache/lucene/analysis/miscellaneous/TestWordDelimiterFilter.java +++ b/lucene/analysis/common/src/test/org/apache/lucene/analysis/miscellaneous/TestWordDelimiterFilter.java @@ -440,7 +440,7 @@ public class TestWordDelimiterFilter extends BaseTokenStreamTestCase { /** blast some enormous random strings through the analyzer */ public void testRandomHugeStrings() throws Exception { - int numIterations = atLeast(3); + int numIterations = atLeast(1); for (int i = 0; i < numIterations; i++) { final int flags = random().nextInt(512); final CharArraySet protectedWords; diff --git a/lucene/analysis/common/src/test/org/apache/lucene/analysis/miscellaneous/TestWordDelimiterGraphFilter.java b/lucene/analysis/common/src/test/org/apache/lucene/analysis/miscellaneous/TestWordDelimiterGraphFilter.java index 207609a5123..648c3669af3 100644 --- a/lucene/analysis/common/src/test/org/apache/lucene/analysis/miscellaneous/TestWordDelimiterGraphFilter.java +++ b/lucene/analysis/common/src/test/org/apache/lucene/analysis/miscellaneous/TestWordDelimiterGraphFilter.java @@ -501,7 +501,7 @@ public class TestWordDelimiterGraphFilter extends BaseTokenStreamTestCase { /** blast some enormous random strings through the analyzer */ public void testRandomHugeStrings() throws Exception { - int numIterations = atLeast(3); + int numIterations = atLeast(1); for (int i = 0; i < numIterations; i++) { final int flags = random().nextInt(512); final CharArraySet protectedWords; diff --git a/lucene/analysis/common/src/test/org/apache/lucene/analysis/ngram/EdgeNGramTokenFilterTest.java b/lucene/analysis/common/src/test/org/apache/lucene/analysis/ngram/EdgeNGramTokenFilterTest.java index 8fcf7a14cfe..7104a62fef0 100644 --- a/lucene/analysis/common/src/test/org/apache/lucene/analysis/ngram/EdgeNGramTokenFilterTest.java +++ b/lucene/analysis/common/src/test/org/apache/lucene/analysis/ngram/EdgeNGramTokenFilterTest.java @@ -194,7 +194,7 @@ public class EdgeNGramTokenFilterTest extends BaseTokenStreamTestCase { new EdgeNGramTokenFilter(tokenizer, min, max, preserveOriginal)); } }; - checkRandomData(random(), a, 100*RANDOM_MULTIPLIER); + checkRandomData(random(), a, 10*RANDOM_MULTIPLIER); a.close(); } } diff --git a/lucene/analysis/common/src/test/org/apache/lucene/analysis/ngram/NGramTokenFilterTest.java b/lucene/analysis/common/src/test/org/apache/lucene/analysis/ngram/NGramTokenFilterTest.java index c3ef231afe5..bba65484370 100644 --- a/lucene/analysis/common/src/test/org/apache/lucene/analysis/ngram/NGramTokenFilterTest.java +++ b/lucene/analysis/common/src/test/org/apache/lucene/analysis/ngram/NGramTokenFilterTest.java @@ -196,7 +196,7 @@ public class NGramTokenFilterTest extends BaseTokenStreamTestCase { new NGramTokenFilter(tokenizer, min, max, preserveOriginal)); } }; - checkRandomData(random(), a, 200*RANDOM_MULTIPLIER, 20); + checkRandomData(random(), a, 10*RANDOM_MULTIPLIER, 20); a.close(); } } diff --git a/lucene/analysis/common/src/test/org/apache/lucene/analysis/ngram/NGramTokenizerTest.java b/lucene/analysis/common/src/test/org/apache/lucene/analysis/ngram/NGramTokenizerTest.java index cb54fa2fc44..453c5db9ff0 100644 --- a/lucene/analysis/common/src/test/org/apache/lucene/analysis/ngram/NGramTokenizerTest.java +++ b/lucene/analysis/common/src/test/org/apache/lucene/analysis/ngram/NGramTokenizerTest.java @@ -113,7 +113,7 @@ public class NGramTokenizerTest extends BaseTokenStreamTestCase { return new TokenStreamComponents(tokenizer, tokenizer); } }; - checkRandomData(random(), a, 200*RANDOM_MULTIPLIER, 20); + checkRandomData(random(), a, 200 * RANDOM_MULTIPLIER, 20); checkRandomData(random(), a, 10*RANDOM_MULTIPLIER, 1027); a.close(); } diff --git a/lucene/analysis/common/src/test/org/apache/lucene/analysis/nl/TestDutchAnalyzer.java b/lucene/analysis/common/src/test/org/apache/lucene/analysis/nl/TestDutchAnalyzer.java index 805566039c8..ac8996fda49 100644 --- a/lucene/analysis/common/src/test/org/apache/lucene/analysis/nl/TestDutchAnalyzer.java +++ b/lucene/analysis/common/src/test/org/apache/lucene/analysis/nl/TestDutchAnalyzer.java @@ -176,7 +176,7 @@ public class TestDutchAnalyzer extends BaseTokenStreamTestCase { /** blast some random strings through the analyzer */ public void testRandomStrings() throws Exception { Analyzer analyzer = new DutchAnalyzer(); - checkRandomData(random(), analyzer, 1000*RANDOM_MULTIPLIER); + checkRandomData(random(), analyzer, 200 * RANDOM_MULTIPLIER); analyzer.close(); } diff --git a/lucene/analysis/common/src/test/org/apache/lucene/analysis/no/TestNorwegianAnalyzer.java b/lucene/analysis/common/src/test/org/apache/lucene/analysis/no/TestNorwegianAnalyzer.java index 9cb494d38f7..b2f92a637cf 100644 --- a/lucene/analysis/common/src/test/org/apache/lucene/analysis/no/TestNorwegianAnalyzer.java +++ b/lucene/analysis/common/src/test/org/apache/lucene/analysis/no/TestNorwegianAnalyzer.java @@ -54,7 +54,7 @@ public class TestNorwegianAnalyzer extends BaseTokenStreamTestCase { /** blast some random strings through the analyzer */ public void testRandomStrings() throws Exception { Analyzer analyzer = new NorwegianAnalyzer(); - checkRandomData(random(), analyzer, 1000*RANDOM_MULTIPLIER); + checkRandomData(random(), analyzer, 200 * RANDOM_MULTIPLIER); analyzer.close(); } } diff --git a/lucene/analysis/common/src/test/org/apache/lucene/analysis/no/TestNorwegianLightStemFilter.java b/lucene/analysis/common/src/test/org/apache/lucene/analysis/no/TestNorwegianLightStemFilter.java index 89e52aff524..b95d4281023 100644 --- a/lucene/analysis/common/src/test/org/apache/lucene/analysis/no/TestNorwegianLightStemFilter.java +++ b/lucene/analysis/common/src/test/org/apache/lucene/analysis/no/TestNorwegianLightStemFilter.java @@ -93,7 +93,7 @@ public class TestNorwegianLightStemFilter extends BaseTokenStreamTestCase { /** blast some random strings through the analyzer */ public void testRandomStrings() throws Exception { Random random = random(); - checkRandomData(random, analyzer, 1000*RANDOM_MULTIPLIER); + checkRandomData(random, analyzer, 200 * RANDOM_MULTIPLIER); } public void testEmptyTerm() throws IOException { diff --git a/lucene/analysis/common/src/test/org/apache/lucene/analysis/no/TestNorwegianMinimalStemFilter.java b/lucene/analysis/common/src/test/org/apache/lucene/analysis/no/TestNorwegianMinimalStemFilter.java index 69b5b0ce6b2..fc16b0d3460 100644 --- a/lucene/analysis/common/src/test/org/apache/lucene/analysis/no/TestNorwegianMinimalStemFilter.java +++ b/lucene/analysis/common/src/test/org/apache/lucene/analysis/no/TestNorwegianMinimalStemFilter.java @@ -93,7 +93,7 @@ public class TestNorwegianMinimalStemFilter extends BaseTokenStreamTestCase { /** blast some random strings through the analyzer */ public void testRandomStrings() throws Exception { Random random = random(); - checkRandomData(random, analyzer, 1000*RANDOM_MULTIPLIER); + checkRandomData(random, analyzer, 200 * RANDOM_MULTIPLIER); } public void testEmptyTerm() throws IOException { diff --git a/lucene/analysis/common/src/test/org/apache/lucene/analysis/path/TestPathHierarchyTokenizer.java b/lucene/analysis/common/src/test/org/apache/lucene/analysis/path/TestPathHierarchyTokenizer.java index afe1523f289..3a06d3dc479 100644 --- a/lucene/analysis/common/src/test/org/apache/lucene/analysis/path/TestPathHierarchyTokenizer.java +++ b/lucene/analysis/common/src/test/org/apache/lucene/analysis/path/TestPathHierarchyTokenizer.java @@ -226,7 +226,7 @@ public class TestPathHierarchyTokenizer extends BaseTokenStreamTestCase { } }; // TODO: properly support positionLengthAttribute - checkRandomData(random(), a, 1000*RANDOM_MULTIPLIER, 20, false, false); + checkRandomData(random(), a, 200 * RANDOM_MULTIPLIER, 20, false, false); a.close(); } diff --git a/lucene/analysis/common/src/test/org/apache/lucene/analysis/path/TestReversePathHierarchyTokenizer.java b/lucene/analysis/common/src/test/org/apache/lucene/analysis/path/TestReversePathHierarchyTokenizer.java index 5d423a37f3b..461629d0374 100644 --- a/lucene/analysis/common/src/test/org/apache/lucene/analysis/path/TestReversePathHierarchyTokenizer.java +++ b/lucene/analysis/common/src/test/org/apache/lucene/analysis/path/TestReversePathHierarchyTokenizer.java @@ -184,7 +184,7 @@ public class TestReversePathHierarchyTokenizer extends BaseTokenStreamTestCase { } }; // TODO: properly support positionLengthAttribute - checkRandomData(random(), a, 1000*RANDOM_MULTIPLIER, 20, false, false); + checkRandomData(random(), a, 200 * RANDOM_MULTIPLIER, 20, false, false); a.close(); } diff --git a/lucene/analysis/common/src/test/org/apache/lucene/analysis/pattern/TestPatternReplaceFilter.java b/lucene/analysis/common/src/test/org/apache/lucene/analysis/pattern/TestPatternReplaceFilter.java index 21ffed1895a..544d1dc8d23 100644 --- a/lucene/analysis/common/src/test/org/apache/lucene/analysis/pattern/TestPatternReplaceFilter.java +++ b/lucene/analysis/common/src/test/org/apache/lucene/analysis/pattern/TestPatternReplaceFilter.java @@ -99,7 +99,7 @@ public class TestPatternReplaceFilter extends BaseTokenStreamTestCase { return new TokenStreamComponents(tokenizer, filter); } }; - checkRandomData(random(), b, 1000*RANDOM_MULTIPLIER); + checkRandomData(random(), b, 200 * RANDOM_MULTIPLIER); b.close(); } diff --git a/lucene/analysis/common/src/test/org/apache/lucene/analysis/pattern/TestPatternTokenizer.java b/lucene/analysis/common/src/test/org/apache/lucene/analysis/pattern/TestPatternTokenizer.java index f7cca55b979..cc8f01d7df2 100644 --- a/lucene/analysis/common/src/test/org/apache/lucene/analysis/pattern/TestPatternTokenizer.java +++ b/lucene/analysis/common/src/test/org/apache/lucene/analysis/pattern/TestPatternTokenizer.java @@ -142,7 +142,7 @@ public class TestPatternTokenizer extends BaseTokenStreamTestCase return new TokenStreamComponents(tokenizer); } }; - checkRandomData(random(), b, 1000*RANDOM_MULTIPLIER); + checkRandomData(random(), b, 200 * RANDOM_MULTIPLIER); b.close(); } diff --git a/lucene/analysis/common/src/test/org/apache/lucene/analysis/pattern/TestSimplePatternSplitTokenizer.java b/lucene/analysis/common/src/test/org/apache/lucene/analysis/pattern/TestSimplePatternSplitTokenizer.java index 47b92960609..ba9cdbdab64 100644 --- a/lucene/analysis/common/src/test/org/apache/lucene/analysis/pattern/TestSimplePatternSplitTokenizer.java +++ b/lucene/analysis/common/src/test/org/apache/lucene/analysis/pattern/TestSimplePatternSplitTokenizer.java @@ -267,7 +267,7 @@ public class TestSimplePatternSplitTokenizer extends BaseTokenStreamTestCase { return new TokenStreamComponents(tokenizer); } }; - checkRandomData(random(), b, 1000*RANDOM_MULTIPLIER); + checkRandomData(random(), b, 200 * RANDOM_MULTIPLIER); b.close(); } diff --git a/lucene/analysis/common/src/test/org/apache/lucene/analysis/pattern/TestSimplePatternTokenizer.java b/lucene/analysis/common/src/test/org/apache/lucene/analysis/pattern/TestSimplePatternTokenizer.java index f7dae00497c..c9dce443c33 100644 --- a/lucene/analysis/common/src/test/org/apache/lucene/analysis/pattern/TestSimplePatternTokenizer.java +++ b/lucene/analysis/common/src/test/org/apache/lucene/analysis/pattern/TestSimplePatternTokenizer.java @@ -212,7 +212,7 @@ public class TestSimplePatternTokenizer extends BaseTokenStreamTestCase { return new TokenStreamComponents(tokenizer); } }; - checkRandomData(random(), b, 1000*RANDOM_MULTIPLIER); + checkRandomData(random(), b, 200 * RANDOM_MULTIPLIER); b.close(); } diff --git a/lucene/analysis/common/src/test/org/apache/lucene/analysis/pt/TestPortugueseAnalyzer.java b/lucene/analysis/common/src/test/org/apache/lucene/analysis/pt/TestPortugueseAnalyzer.java index d948c308681..0a3d0c577e4 100644 --- a/lucene/analysis/common/src/test/org/apache/lucene/analysis/pt/TestPortugueseAnalyzer.java +++ b/lucene/analysis/common/src/test/org/apache/lucene/analysis/pt/TestPortugueseAnalyzer.java @@ -54,7 +54,7 @@ public class TestPortugueseAnalyzer extends BaseTokenStreamTestCase { /** blast some random strings through the analyzer */ public void testRandomStrings() throws Exception { Analyzer analyzer = new PortugueseAnalyzer(); - checkRandomData(random(), analyzer, 1000*RANDOM_MULTIPLIER); + checkRandomData(random(), analyzer, 200 * RANDOM_MULTIPLIER); analyzer.close(); } } diff --git a/lucene/analysis/common/src/test/org/apache/lucene/analysis/pt/TestPortugueseLightStemFilter.java b/lucene/analysis/common/src/test/org/apache/lucene/analysis/pt/TestPortugueseLightStemFilter.java index 95d3ff7059b..351f6c97f76 100644 --- a/lucene/analysis/common/src/test/org/apache/lucene/analysis/pt/TestPortugueseLightStemFilter.java +++ b/lucene/analysis/common/src/test/org/apache/lucene/analysis/pt/TestPortugueseLightStemFilter.java @@ -119,7 +119,7 @@ public class TestPortugueseLightStemFilter extends BaseTokenStreamTestCase { /** blast some random strings through the analyzer */ public void testRandomStrings() throws Exception { - checkRandomData(random(), analyzer, 1000*RANDOM_MULTIPLIER); + checkRandomData(random(), analyzer, 200 * RANDOM_MULTIPLIER); } public void testEmptyTerm() throws IOException { diff --git a/lucene/analysis/common/src/test/org/apache/lucene/analysis/pt/TestPortugueseMinimalStemFilter.java b/lucene/analysis/common/src/test/org/apache/lucene/analysis/pt/TestPortugueseMinimalStemFilter.java index b44460f05ca..2cbba5910da 100644 --- a/lucene/analysis/common/src/test/org/apache/lucene/analysis/pt/TestPortugueseMinimalStemFilter.java +++ b/lucene/analysis/common/src/test/org/apache/lucene/analysis/pt/TestPortugueseMinimalStemFilter.java @@ -93,7 +93,7 @@ public class TestPortugueseMinimalStemFilter extends BaseTokenStreamTestCase { /** blast some random strings through the analyzer */ public void testRandomStrings() throws Exception { - checkRandomData(random(), analyzer, 1000*RANDOM_MULTIPLIER); + checkRandomData(random(), analyzer, 200 * RANDOM_MULTIPLIER); } public void testEmptyTerm() throws IOException { diff --git a/lucene/analysis/common/src/test/org/apache/lucene/analysis/pt/TestPortugueseStemFilter.java b/lucene/analysis/common/src/test/org/apache/lucene/analysis/pt/TestPortugueseStemFilter.java index 7bdaac8d477..7365a5030e8 100644 --- a/lucene/analysis/common/src/test/org/apache/lucene/analysis/pt/TestPortugueseStemFilter.java +++ b/lucene/analysis/common/src/test/org/apache/lucene/analysis/pt/TestPortugueseStemFilter.java @@ -93,7 +93,7 @@ public class TestPortugueseStemFilter extends BaseTokenStreamTestCase { /** blast some random strings through the analyzer */ public void testRandomStrings() throws Exception { - checkRandomData(random(), analyzer, 1000*RANDOM_MULTIPLIER); + checkRandomData(random(), analyzer, 200 * RANDOM_MULTIPLIER); } public void testEmptyTerm() throws IOException { diff --git a/lucene/analysis/common/src/test/org/apache/lucene/analysis/ro/TestRomanianAnalyzer.java b/lucene/analysis/common/src/test/org/apache/lucene/analysis/ro/TestRomanianAnalyzer.java index 15c0286a83a..78577237080 100644 --- a/lucene/analysis/common/src/test/org/apache/lucene/analysis/ro/TestRomanianAnalyzer.java +++ b/lucene/analysis/common/src/test/org/apache/lucene/analysis/ro/TestRomanianAnalyzer.java @@ -54,7 +54,7 @@ public class TestRomanianAnalyzer extends BaseTokenStreamTestCase { /** blast some random strings through the analyzer */ public void testRandomStrings() throws Exception { Analyzer analyzer = new RomanianAnalyzer(); - checkRandomData(random(), analyzer, 1000*RANDOM_MULTIPLIER); + checkRandomData(random(), analyzer, 200 * RANDOM_MULTIPLIER); analyzer.close(); } } diff --git a/lucene/analysis/common/src/test/org/apache/lucene/analysis/ru/TestRussianAnalyzer.java b/lucene/analysis/common/src/test/org/apache/lucene/analysis/ru/TestRussianAnalyzer.java index 174feb1572e..96052db55af 100644 --- a/lucene/analysis/common/src/test/org/apache/lucene/analysis/ru/TestRussianAnalyzer.java +++ b/lucene/analysis/common/src/test/org/apache/lucene/analysis/ru/TestRussianAnalyzer.java @@ -59,7 +59,7 @@ public class TestRussianAnalyzer extends BaseTokenStreamTestCase { /** blast some random strings through the analyzer */ public void testRandomStrings() throws Exception { Analyzer analyzer = new RussianAnalyzer(); - checkRandomData(random(), analyzer, 1000*RANDOM_MULTIPLIER); + checkRandomData(random(), analyzer, 200 * RANDOM_MULTIPLIER); analyzer.close(); } } diff --git a/lucene/analysis/common/src/test/org/apache/lucene/analysis/ru/TestRussianLightStemFilter.java b/lucene/analysis/common/src/test/org/apache/lucene/analysis/ru/TestRussianLightStemFilter.java index 604b2300b54..d3c8e16089a 100644 --- a/lucene/analysis/common/src/test/org/apache/lucene/analysis/ru/TestRussianLightStemFilter.java +++ b/lucene/analysis/common/src/test/org/apache/lucene/analysis/ru/TestRussianLightStemFilter.java @@ -75,7 +75,7 @@ public class TestRussianLightStemFilter extends BaseTokenStreamTestCase { /** blast some random strings through the analyzer */ public void testRandomStrings() throws Exception { - checkRandomData(random(), analyzer, 1000*RANDOM_MULTIPLIER); + checkRandomData(random(), analyzer, 200 * RANDOM_MULTIPLIER); } public void testEmptyTerm() throws IOException { diff --git a/lucene/analysis/common/src/test/org/apache/lucene/analysis/shingle/ShingleFilterTest.java b/lucene/analysis/common/src/test/org/apache/lucene/analysis/shingle/ShingleFilterTest.java index cf5d0bbc48b..9754e1c9671 100644 --- a/lucene/analysis/common/src/test/org/apache/lucene/analysis/shingle/ShingleFilterTest.java +++ b/lucene/analysis/common/src/test/org/apache/lucene/analysis/shingle/ShingleFilterTest.java @@ -1125,7 +1125,7 @@ public class ShingleFilterTest extends BaseTokenStreamTestCase { return new TokenStreamComponents(tokenizer, new ShingleFilter(tokenizer)); } }; - checkRandomData(random, a, 100*RANDOM_MULTIPLIER, 8192); + checkRandomData(random, a, 3*RANDOM_MULTIPLIER, 8192); a.close(); } diff --git a/lucene/analysis/common/src/test/org/apache/lucene/analysis/sr/TestSerbianNormalizationFilter.java b/lucene/analysis/common/src/test/org/apache/lucene/analysis/sr/TestSerbianNormalizationFilter.java index c38c9326cfa..2f8c5175d83 100644 --- a/lucene/analysis/common/src/test/org/apache/lucene/analysis/sr/TestSerbianNormalizationFilter.java +++ b/lucene/analysis/common/src/test/org/apache/lucene/analysis/sr/TestSerbianNormalizationFilter.java @@ -67,7 +67,7 @@ public class TestSerbianNormalizationFilter extends BaseTokenStreamTestCase { /** blast some random strings through the analyzer */ public void testRandomStrings() throws Exception { - checkRandomData(random(), analyzer, 1000*RANDOM_MULTIPLIER); + checkRandomData(random(), analyzer, 200 * RANDOM_MULTIPLIER); } public void testEmptyTerm() throws IOException { diff --git a/lucene/analysis/common/src/test/org/apache/lucene/analysis/sr/TestSerbianNormalizationRegularFilter.java b/lucene/analysis/common/src/test/org/apache/lucene/analysis/sr/TestSerbianNormalizationRegularFilter.java index be1c5a61c23..9482cff732f 100644 --- a/lucene/analysis/common/src/test/org/apache/lucene/analysis/sr/TestSerbianNormalizationRegularFilter.java +++ b/lucene/analysis/common/src/test/org/apache/lucene/analysis/sr/TestSerbianNormalizationRegularFilter.java @@ -67,7 +67,7 @@ public class TestSerbianNormalizationRegularFilter extends BaseTokenStreamTestCa /** blast some random strings through the analyzer */ public void testRandomStrings() throws Exception { - checkRandomData(random(), analyzer, 1000*RANDOM_MULTIPLIER); + checkRandomData(random(), analyzer, 200 * RANDOM_MULTIPLIER); } public void testEmptyTerm() throws IOException { diff --git a/lucene/analysis/common/src/test/org/apache/lucene/analysis/standard/TestClassicAnalyzer.java b/lucene/analysis/common/src/test/org/apache/lucene/analysis/standard/TestClassicAnalyzer.java index bb16e9bae42..c077c33fa43 100644 --- a/lucene/analysis/common/src/test/org/apache/lucene/analysis/standard/TestClassicAnalyzer.java +++ b/lucene/analysis/common/src/test/org/apache/lucene/analysis/standard/TestClassicAnalyzer.java @@ -334,14 +334,14 @@ public class TestClassicAnalyzer extends BaseTokenStreamTestCase { /** blast some random strings through the analyzer */ public void testRandomStrings() throws Exception { Analyzer analyzer = new ClassicAnalyzer(); - checkRandomData(random(), analyzer, 1000*RANDOM_MULTIPLIER); + checkRandomData(random(), analyzer, 200 * RANDOM_MULTIPLIER); analyzer.close(); } /** blast some random large strings through the analyzer */ public void testRandomHugeStrings() throws Exception { Analyzer analyzer = new ClassicAnalyzer(); - checkRandomData(random(), analyzer, 100*RANDOM_MULTIPLIER, 8192); + checkRandomData(random(), analyzer, 10 * RANDOM_MULTIPLIER, 8192); analyzer.close(); } } diff --git a/lucene/analysis/common/src/test/org/apache/lucene/analysis/standard/TestUAX29URLEmailTokenizer.java b/lucene/analysis/common/src/test/org/apache/lucene/analysis/standard/TestUAX29URLEmailTokenizer.java index 4bb94906404..926fc36af10 100644 --- a/lucene/analysis/common/src/test/org/apache/lucene/analysis/standard/TestUAX29URLEmailTokenizer.java +++ b/lucene/analysis/common/src/test/org/apache/lucene/analysis/standard/TestUAX29URLEmailTokenizer.java @@ -627,7 +627,7 @@ public class TestUAX29URLEmailTokenizer extends BaseTokenStreamTestCase { /** blast some random large strings through the analyzer */ public void testRandomHugeStrings() throws Exception { Random random = random(); - checkRandomData(random, a, 100*RANDOM_MULTIPLIER, 8192); + checkRandomData(random, a, 3 * RANDOM_MULTIPLIER, 8192); } public void testExampleURLs() throws Exception { diff --git a/lucene/analysis/common/src/test/org/apache/lucene/analysis/sv/TestSwedishAnalyzer.java b/lucene/analysis/common/src/test/org/apache/lucene/analysis/sv/TestSwedishAnalyzer.java index b7f45cbe64d..e2203d8d6a6 100644 --- a/lucene/analysis/common/src/test/org/apache/lucene/analysis/sv/TestSwedishAnalyzer.java +++ b/lucene/analysis/common/src/test/org/apache/lucene/analysis/sv/TestSwedishAnalyzer.java @@ -54,7 +54,7 @@ public class TestSwedishAnalyzer extends BaseTokenStreamTestCase { /** blast some random strings through the analyzer */ public void testRandomStrings() throws Exception { Analyzer analyzer = new SwedishAnalyzer(); - checkRandomData(random(), analyzer, 1000*RANDOM_MULTIPLIER); + checkRandomData(random(), analyzer, 200 * RANDOM_MULTIPLIER); analyzer.close(); } } diff --git a/lucene/analysis/common/src/test/org/apache/lucene/analysis/sv/TestSwedishLightStemFilter.java b/lucene/analysis/common/src/test/org/apache/lucene/analysis/sv/TestSwedishLightStemFilter.java index fd7aefd3a8c..d35eb627975 100644 --- a/lucene/analysis/common/src/test/org/apache/lucene/analysis/sv/TestSwedishLightStemFilter.java +++ b/lucene/analysis/common/src/test/org/apache/lucene/analysis/sv/TestSwedishLightStemFilter.java @@ -75,7 +75,7 @@ public class TestSwedishLightStemFilter extends BaseTokenStreamTestCase { /** blast some random strings through the analyzer */ public void testRandomStrings() throws Exception { - checkRandomData(random(), analyzer, 1000*RANDOM_MULTIPLIER); + checkRandomData(random(), analyzer, 200 * RANDOM_MULTIPLIER); } public void testEmptyTerm() throws IOException { diff --git a/lucene/analysis/common/src/test/org/apache/lucene/analysis/synonym/TestSynonymGraphFilter.java b/lucene/analysis/common/src/test/org/apache/lucene/analysis/synonym/TestSynonymGraphFilter.java index b597ecaca89..c33b3545e22 100644 --- a/lucene/analysis/common/src/test/org/apache/lucene/analysis/synonym/TestSynonymGraphFilter.java +++ b/lucene/analysis/common/src/test/org/apache/lucene/analysis/synonym/TestSynonymGraphFilter.java @@ -1001,7 +1001,7 @@ public class TestSynonymGraphFilter extends BaseTokenStreamTestCase { /** simple random test like testRandom2, but for larger docs */ public void testRandomHuge() throws Exception { - final int numIters = atLeast(3); + final int numIters = atLeast(1); for (int i = 0; i < numIters; i++) { SynonymMap.Builder b = new SynonymMap.Builder(random().nextBoolean()); final int numEntries = atLeast(10); @@ -1406,7 +1406,7 @@ public class TestSynonymGraphFilter extends BaseTokenStreamTestCase { a = getAnalyzer(b, true); } - int iters = atLeast(10); + int iters = atLeast(1); for(int iter=0;iter 0) { fixedSearcher = new IndexSearcher(r, es); smokeTestSearcher(fixedSearcher); - runSearchThreads(System.currentTimeMillis() + 500); + runSearchThreads(System.currentTimeMillis() + 100); } } r.close(); diff --git a/lucene/core/src/test/org/apache/lucene/index/TestSnapshotDeletionPolicy.java b/lucene/core/src/test/org/apache/lucene/index/TestSnapshotDeletionPolicy.java index 42a404176c8..cb4a200cf25 100644 --- a/lucene/core/src/test/org/apache/lucene/index/TestSnapshotDeletionPolicy.java +++ b/lucene/core/src/test/org/apache/lucene/index/TestSnapshotDeletionPolicy.java @@ -102,8 +102,8 @@ public class TestSnapshotDeletionPolicy extends LuceneTestCase { } private void runTest(Random random, Directory dir) throws Exception { - // Run for ~1 seconds - final long stopTime = System.currentTimeMillis() + 1000; + // Run for ~1 seconds at night + final long stopTime = System.currentTimeMillis() + (TEST_NIGHTLY ? 1000 : 100); SnapshotDeletionPolicy dp = getDeletionPolicy(); final IndexWriter writer = new IndexWriter(dir, newIndexWriterConfig(new MockAnalyzer(random)) diff --git a/lucene/core/src/test/org/apache/lucene/index/TestTermsEnum.java b/lucene/core/src/test/org/apache/lucene/index/TestTermsEnum.java index 0eaaeec89cf..c8131a41ec1 100644 --- a/lucene/core/src/test/org/apache/lucene/index/TestTermsEnum.java +++ b/lucene/core/src/test/org/apache/lucene/index/TestTermsEnum.java @@ -897,7 +897,7 @@ public class TestTermsEnum extends LuceneTestCase { Set terms = new HashSet(); //String prefix = TestUtil.randomSimpleString(random(), 1, 20); String prefix = TestUtil.randomRealisticUnicodeString(random(), 1, 20); - int numTerms = atLeast(1000); + int numTerms = atLeast(100); if (VERBOSE) { System.out.println("TEST: " + numTerms + " terms; prefix=" + prefix); } diff --git a/lucene/core/src/test/org/apache/lucene/search/TestBooleanScorer.java b/lucene/core/src/test/org/apache/lucene/search/TestBooleanScorer.java index 884d877e839..4160e008381 100644 --- a/lucene/core/src/test/org/apache/lucene/search/TestBooleanScorer.java +++ b/lucene/core/src/test/org/apache/lucene/search/TestBooleanScorer.java @@ -33,7 +33,6 @@ import org.apache.lucene.search.Weight.DefaultBulkScorer; import org.apache.lucene.store.Directory; import org.apache.lucene.util.Bits; import org.apache.lucene.util.LuceneTestCase; -import org.apache.lucene.util.TestUtil; public class TestBooleanScorer extends LuceneTestCase { private static final String FIELD = "category"; @@ -250,8 +249,9 @@ public class TestBooleanScorer extends LuceneTestCase { RandomIndexWriter w = new RandomIndexWriter(random(), dir); Document emptyDoc = new Document(); final int numDocs = atLeast(10); + int numEmptyDocs = atLeast(200); for (int d = 0; d < numDocs; ++d) { - for (int i = random().nextInt(5000); i >= 0; --i) { + for (int i = numEmptyDocs; i >= 0; --i) { w.addDocument(emptyDoc); } Document doc = new Document(); @@ -261,7 +261,8 @@ public class TestBooleanScorer extends LuceneTestCase { } } } - for (int i = TestUtil.nextInt(random(), 3000, 5000); i >= 0; --i) { + numEmptyDocs = atLeast(200); + for (int i = numEmptyDocs; i >= 0; --i) { w.addDocument(emptyDoc); } if (random().nextBoolean()) { diff --git a/lucene/core/src/test/org/apache/lucene/search/TestDisjunctionMaxQuery.java b/lucene/core/src/test/org/apache/lucene/search/TestDisjunctionMaxQuery.java index 7fa1ed37810..86e1eb028b7 100644 --- a/lucene/core/src/test/org/apache/lucene/search/TestDisjunctionMaxQuery.java +++ b/lucene/core/src/test/org/apache/lucene/search/TestDisjunctionMaxQuery.java @@ -50,6 +50,7 @@ import org.apache.lucene.util.LuceneTestCase; * Test of the DisjunctionMaxQuery. * */ +@LuceneTestCase.SuppressCodecs("SimpleText") public class TestDisjunctionMaxQuery extends LuceneTestCase { /** threshold for comparing floats */ diff --git a/lucene/core/src/test/org/apache/lucene/search/TestDoubleValuesSource.java b/lucene/core/src/test/org/apache/lucene/search/TestDoubleValuesSource.java index 73e34c299f5..a46394124ff 100644 --- a/lucene/core/src/test/org/apache/lucene/search/TestDoubleValuesSource.java +++ b/lucene/core/src/test/org/apache/lucene/search/TestDoubleValuesSource.java @@ -36,6 +36,7 @@ import org.apache.lucene.util.English; import org.apache.lucene.util.LuceneTestCase; import org.apache.lucene.util.TestUtil; +@LuceneTestCase.SuppressCodecs("SimpleText") public class TestDoubleValuesSource extends LuceneTestCase { private static final double LEAST_DOUBLE_VALUE = 45.72; diff --git a/lucene/core/src/test/org/apache/lucene/search/TestFuzzyQuery.java b/lucene/core/src/test/org/apache/lucene/search/TestFuzzyQuery.java index 78c5daf6f28..a95ad39cf59 100644 --- a/lucene/core/src/test/org/apache/lucene/search/TestFuzzyQuery.java +++ b/lucene/core/src/test/org/apache/lucene/search/TestFuzzyQuery.java @@ -602,7 +602,7 @@ public class TestFuzzyQuery extends LuceneTestCase { DirectoryReader r = w.getReader(); //System.out.println("TEST: reader=" + r); IndexSearcher s = newSearcher(r); - int iters = atLeast(1000); + int iters = atLeast(200); for(int iter=0;iter error = new AtomicReference<>(); - final int numDocs = atLeast(10000); + final int numDocs = atLeast(1000); Thread[] threads = new Thread[3]; threads[0] = new Thread() { public void run() { diff --git a/lucene/core/src/test/org/apache/lucene/search/TestMinShouldMatch2.java b/lucene/core/src/test/org/apache/lucene/search/TestMinShouldMatch2.java index e6debf20f0c..f0906f1a0d9 100644 --- a/lucene/core/src/test/org/apache/lucene/search/TestMinShouldMatch2.java +++ b/lucene/core/src/test/org/apache/lucene/search/TestMinShouldMatch2.java @@ -273,6 +273,7 @@ public class TestMinShouldMatch2 extends LuceneTestCase { } /** test advance with varying numbers of terms with varying minShouldMatch */ + @Nightly public void testAdvanceVaryingNumberOfTerms() throws Exception { List termsList = new ArrayList<>(); termsList.addAll(Arrays.asList(commonTerms)); diff --git a/lucene/core/src/test/org/apache/lucene/search/TestPhraseQuery.java b/lucene/core/src/test/org/apache/lucene/search/TestPhraseQuery.java index e268bc85142..9cfdd9ab4ca 100644 --- a/lucene/core/src/test/org/apache/lucene/search/TestPhraseQuery.java +++ b/lucene/core/src/test/org/apache/lucene/search/TestPhraseQuery.java @@ -627,8 +627,8 @@ public class TestPhraseQuery extends LuceneTestCase { int NUM_DOCS = atLeast(10); for (int i = 0; i < NUM_DOCS; i++) { - // must be > 4096 so it spans multiple chunks - int termCount = TestUtil.nextInt(random(), 4097, 8200); + // at night, must be > 4096 so it spans multiple chunks + int termCount = TEST_NIGHTLY ? atLeast(4097) : atLeast(200); List doc = new ArrayList<>(); @@ -675,7 +675,7 @@ public class TestPhraseQuery extends LuceneTestCase { w.close(); // now search - int num = atLeast(10); + int num = atLeast(3); for(int i=0;i doc = docs.get(docID); diff --git a/lucene/core/src/test/org/apache/lucene/search/TestPointQueries.java b/lucene/core/src/test/org/apache/lucene/search/TestPointQueries.java index cbc123f75e2..3b52f2c47d6 100644 --- a/lucene/core/src/test/org/apache/lucene/search/TestPointQueries.java +++ b/lucene/core/src/test/org/apache/lucene/search/TestPointQueries.java @@ -2175,6 +2175,7 @@ public class TestPointQueries extends LuceneTestCase { assertTrue(Float.compare(Float.MAX_VALUE, FloatPoint.nextDown(Float.POSITIVE_INFINITY)) == 0); } + @Nightly public void testInversePointRange() throws IOException { Directory dir = newDirectory(); IndexWriter w = new IndexWriter(dir, newIndexWriterConfig()); diff --git a/lucene/core/src/test/org/apache/lucene/search/TestRegexpRandom2.java b/lucene/core/src/test/org/apache/lucene/search/TestRegexpRandom2.java index 9c2810c5bc2..f4cbd541d2b 100644 --- a/lucene/core/src/test/org/apache/lucene/search/TestRegexpRandom2.java +++ b/lucene/core/src/test/org/apache/lucene/search/TestRegexpRandom2.java @@ -155,7 +155,7 @@ public class TestRegexpRandom2 extends LuceneTestCase { /** test a bunch of random regular expressions */ public void testRegexps() throws Exception { - int num = atLeast(1000); + int num = atLeast(200); for (int i = 0; i < num; i++) { String reg = AutomatonTestUtil.randomRegexp(random()); if (VERBOSE) { diff --git a/lucene/core/src/test/org/apache/lucene/search/TestTermScorer.java b/lucene/core/src/test/org/apache/lucene/search/TestTermScorer.java index 6c3f89fceee..0cfabd67a06 100644 --- a/lucene/core/src/test/org/apache/lucene/search/TestTermScorer.java +++ b/lucene/core/src/test/org/apache/lucene/search/TestTermScorer.java @@ -213,7 +213,7 @@ public class TestTermScorer extends LuceneTestCase { public void testRandomTopDocs() throws IOException { Directory dir = newDirectory(); IndexWriter w = new IndexWriter(dir, newIndexWriterConfig()); - int numDocs = atLeast(128 * 8 * 8 * 3); // make sure some terms have skip data + int numDocs = TEST_NIGHTLY ? atLeast(128 * 8 * 8 * 3) : atLeast(500); // at night, make sure some terms have skip data for (int i = 0; i < numDocs; ++i) { Document doc = new Document(); int numValues = random().nextInt(1 << random().nextInt(5)); diff --git a/lucene/core/src/test/org/apache/lucene/util/TestOfflineSorter.java b/lucene/core/src/test/org/apache/lucene/util/TestOfflineSorter.java index aff02b35b21..d2961f2da1d 100644 --- a/lucene/core/src/test/org/apache/lucene/util/TestOfflineSorter.java +++ b/lucene/core/src/test/org/apache/lucene/util/TestOfflineSorter.java @@ -444,7 +444,7 @@ public class TestOfflineSorter extends LuceneTestCase { } } - @Slow + @Nightly public void testFixedLengthHeap() throws Exception { // Make sure the RAM accounting is correct, i.e. if we are sorting fixed width // ints (4 bytes) then the heap used is really only 4 bytes per value: diff --git a/lucene/core/src/test/org/apache/lucene/util/TestPagedBytes.java b/lucene/core/src/test/org/apache/lucene/util/TestPagedBytes.java index 5f135d4ec0a..f34ba531204 100644 --- a/lucene/core/src/test/org/apache/lucene/util/TestPagedBytes.java +++ b/lucene/core/src/test/org/apache/lucene/util/TestPagedBytes.java @@ -35,7 +35,8 @@ public class TestPagedBytes extends LuceneTestCase { // PagedBytes.Reader: public void testDataInputOutput() throws Exception { Random random = random(); - for(int iter=0;iter<5*RANDOM_MULTIPLIER;iter++) { + int numIters = atLeast(1); + for(int iter=0;iter docValues = new ArrayList<>(); List docIDs = new ArrayList<>(); @@ -375,7 +375,7 @@ public abstract class BasePointsFormatTestCase extends BaseIndexFileFormatTestCa // Tests on N-dimensional points where each dimension is a BigInteger public void testBigIntNDims() throws Exception { - int numDocs = atLeast(1000); + int numDocs = atLeast(200); try (Directory dir = getDirectory(numDocs)) { int numBytesPerDim = TestUtil.nextInt(random(), 2, PointValues.MAX_NUM_BYTES); int numDims = TestUtil.nextInt(random(), 1, PointValues.MAX_DIMENSIONS); @@ -508,7 +508,7 @@ public abstract class BasePointsFormatTestCase extends BaseIndexFileFormatTestCa } public void testRandomBinaryMedium() throws Exception { - doTestRandomBinary(1000); + doTestRandomBinary(200); } @Nightly diff --git a/lucene/test-framework/src/java/org/apache/lucene/index/BaseStoredFieldsFormatTestCase.java b/lucene/test-framework/src/java/org/apache/lucene/index/BaseStoredFieldsFormatTestCase.java index d0d60bf06ec..0c975cf9c78 100644 --- a/lucene/test-framework/src/java/org/apache/lucene/index/BaseStoredFieldsFormatTestCase.java +++ b/lucene/test-framework/src/java/org/apache/lucene/index/BaseStoredFieldsFormatTestCase.java @@ -147,7 +147,7 @@ public abstract class BaseStoredFieldsFormatTestCase extends BaseIndexFileFormat System.out.println("TEST: cycle x=" + x + " r=" + r); } - int num = atLeast(1000); + int num = atLeast(100); for(int iter=0;iter delIDs = Collections.synchronizedSet(new HashSet()); final Set delPackIDs = Collections.synchronizedSet(new HashSet()); final List allSubDocs = Collections.synchronizedList(new ArrayList()); - final long stopTime = System.currentTimeMillis() + RUN_TIME_SEC*1000; + final long stopTime = System.currentTimeMillis() + RUN_TIME_MSEC; final Thread[] indexThreads = launchIndexingThreads(docs, NUM_INDEX_THREADS, stopTime, delIDs, delPackIDs, allSubDocs); diff --git a/lucene/test-framework/src/java/org/apache/lucene/store/BaseLockFactoryTestCase.java b/lucene/test-framework/src/java/org/apache/lucene/store/BaseLockFactoryTestCase.java index 33af38ff3e4..7a93ca251c8 100644 --- a/lucene/test-framework/src/java/org/apache/lucene/store/BaseLockFactoryTestCase.java +++ b/lucene/test-framework/src/java/org/apache/lucene/store/BaseLockFactoryTestCase.java @@ -115,7 +115,7 @@ public abstract class BaseLockFactoryTestCase extends LuceneTestCase { final AtomicInteger atomicCounter = new AtomicInteger(0); final ReentrantLock assertingLock = new ReentrantLock(); int numThreads = 2 + random().nextInt(10); - final int runs = atLeast(10000); + final int runs = atLeast(1000); CyclicBarrier barrier = new CyclicBarrier(numThreads); Thread[] threads = new Thread[numThreads]; for (int i = 0; i < threads.length; i++) { @@ -168,8 +168,9 @@ public abstract class BaseLockFactoryTestCase extends LuceneTestCase { addDoc(w); w.close(); - WriterThread writer = new WriterThread(100, dir); - SearcherThread searcher = new SearcherThread(100, dir); + int numIterations = atLeast(20); + WriterThread writer = new WriterThread(numIterations, dir); + SearcherThread searcher = new SearcherThread(numIterations, dir); writer.start(); searcher.start(); diff --git a/lucene/test-framework/src/java/org/apache/lucene/util/BaseBitSetTestCase.java b/lucene/test-framework/src/java/org/apache/lucene/util/BaseBitSetTestCase.java index 5f8cc00c998..002ebcf85b7 100644 --- a/lucene/test-framework/src/java/org/apache/lucene/util/BaseBitSetTestCase.java +++ b/lucene/test-framework/src/java/org/apache/lucene/util/BaseBitSetTestCase.java @@ -134,7 +134,7 @@ public abstract class BaseBitSetTestCase extends LuceneTestCas for (float percentSet : new float[] {0, 0.01f, 0.1f, 0.5f, 0.9f, 0.99f, 1f}) { BitSet set1 = new JavaUtilBitSet(randomSet(numBits, percentSet), numBits); T set2 = copyOf(set1, numBits); - final int iters = 1 + random().nextInt(100); + final int iters = atLeast(10); for (int i = 0; i < iters; ++i) { final int from = random().nextInt(numBits); final int to = random().nextInt(numBits + 1); diff --git a/lucene/test-framework/src/test/org/apache/lucene/codecs/compressing/TestCompressingStoredFieldsFormat.java b/lucene/test-framework/src/test/org/apache/lucene/codecs/compressing/TestCompressingStoredFieldsFormat.java index ddce7560437..1775e6d8711 100644 --- a/lucene/test-framework/src/test/org/apache/lucene/codecs/compressing/TestCompressingStoredFieldsFormat.java +++ b/lucene/test-framework/src/test/org/apache/lucene/codecs/compressing/TestCompressingStoredFieldsFormat.java @@ -46,14 +46,18 @@ public class TestCompressingStoredFieldsFormat extends BaseStoredFieldsFormatTes @Override protected Codec getCodec() { - return CompressingCodec.randomInstance(random()); + if (TEST_NIGHTLY) { + return CompressingCodec.randomInstance(random()); + } else { + return CompressingCodec.reasonableInstance(random()); + } } public void testDeletePartiallyWrittenFilesIfAbort() throws IOException { Directory dir = newDirectory(); IndexWriterConfig iwConf = newIndexWriterConfig(new MockAnalyzer(random())); iwConf.setMaxBufferedDocs(RandomNumbers.randomIntBetween(random(), 2, 30)); - iwConf.setCodec(CompressingCodec.randomInstance(random())); + iwConf.setCodec(getCodec()); // disable CFS because this test checks file names iwConf.setMergePolicy(newLogMergePolicy(false)); iwConf.setUseCompoundFile(false); diff --git a/lucene/test-framework/src/test/org/apache/lucene/codecs/compressing/TestCompressingTermVectorsFormat.java b/lucene/test-framework/src/test/org/apache/lucene/codecs/compressing/TestCompressingTermVectorsFormat.java index bf78f28f164..e3477e9fee3 100644 --- a/lucene/test-framework/src/test/org/apache/lucene/codecs/compressing/TestCompressingTermVectorsFormat.java +++ b/lucene/test-framework/src/test/org/apache/lucene/codecs/compressing/TestCompressingTermVectorsFormat.java @@ -43,7 +43,11 @@ public class TestCompressingTermVectorsFormat extends BaseTermVectorsFormatTestC @Override protected Codec getCodec() { - return CompressingCodec.randomInstance(random()); + if (TEST_NIGHTLY) { + return CompressingCodec.randomInstance(random()); + } else { + return CompressingCodec.reasonableInstance(random()); + } } // https://issues.apache.org/jira/browse/LUCENE-5156