lucene-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rm...@apache.org
Subject svn commit: r1134358 [10/19] - in /lucene/dev/branches/flexscoring: ./ dev-tools/eclipse/ dev-tools/idea/.idea/ dev-tools/idea/lucene/contrib/spellchecker/ dev-tools/idea/modules/suggest/ dev-tools/idea/solr/ dev-tools/idea/solr/contrib/clustering/ dev...
Date Fri, 10 Jun 2011 15:58:49 GMT
Modified: lucene/dev/branches/flexscoring/lucene/src/test/org/apache/lucene/index/TestOmitNorms.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/flexscoring/lucene/src/test/org/apache/lucene/index/TestOmitNorms.java?rev=1134358&r1=1134357&r2=1134358&view=diff
==============================================================================
--- lucene/dev/branches/flexscoring/lucene/src/test/org/apache/lucene/index/TestOmitNorms.java (original)
+++ lucene/dev/branches/flexscoring/lucene/src/test/org/apache/lucene/index/TestOmitNorms.java Fri Jun 10 15:58:18 2011
@@ -64,7 +64,6 @@ public class TestOmitNorms extends Lucen
     writer.optimize();
     // flush
     writer.close();
-    _TestUtil.checkIndex(ram);
 
     SegmentReader reader = getOnlySegmentReader(IndexReader.open(ram, false));
     FieldInfos fi = reader.fieldInfos();
@@ -121,8 +120,6 @@ public class TestOmitNorms extends Lucen
     // flush
     writer.close();
 
-    _TestUtil.checkIndex(ram);
-
     SegmentReader reader = getOnlySegmentReader(IndexReader.open(ram, false));
     FieldInfos fi = reader.fieldInfos();
     assertTrue("OmitNorms field bit should be set.", fi.fieldInfo("f1").omitNorms);
@@ -170,8 +167,6 @@ public class TestOmitNorms extends Lucen
     // flush
     writer.close();
 
-    _TestUtil.checkIndex(ram);
-
     SegmentReader reader = getOnlySegmentReader(IndexReader.open(ram, false));
     FieldInfos fi = reader.fieldInfos();
     assertTrue("OmitNorms field bit should not be set.", !fi.fieldInfo("f1").omitNorms);
@@ -218,7 +213,6 @@ public class TestOmitNorms extends Lucen
     writer.close();
 
     assertNoNrm(ram);
-    _TestUtil.checkIndex(ram);
     ram.close();
   }
   

Modified: lucene/dev/branches/flexscoring/lucene/src/test/org/apache/lucene/index/TestOmitTf.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/flexscoring/lucene/src/test/org/apache/lucene/index/TestOmitTf.java?rev=1134358&r1=1134357&r2=1134358&view=diff
==============================================================================
--- lucene/dev/branches/flexscoring/lucene/src/test/org/apache/lucene/index/TestOmitTf.java (original)
+++ lucene/dev/branches/flexscoring/lucene/src/test/org/apache/lucene/index/TestOmitTf.java Fri Jun 10 15:58:18 2011
@@ -97,7 +97,6 @@ public class TestOmitTf extends LuceneTe
     writer.optimize();
     // flush
     writer.close();
-    _TestUtil.checkIndex(ram);
 
     SegmentReader reader = getOnlySegmentReader(IndexReader.open(ram, false));
     FieldInfos fi = reader.fieldInfos();
@@ -153,8 +152,6 @@ public class TestOmitTf extends LuceneTe
     // flush
     writer.close();
 
-    _TestUtil.checkIndex(ram);
-
     SegmentReader reader = getOnlySegmentReader(IndexReader.open(ram, false));
     FieldInfos fi = reader.fieldInfos();
     assertTrue("OmitTermFreqAndPositions field bit should be set.", fi.fieldInfo("f1").omitTermFreqAndPositions);
@@ -200,8 +197,6 @@ public class TestOmitTf extends LuceneTe
     // flush
     writer.close();
 
-    _TestUtil.checkIndex(ram);
-
     SegmentReader reader = getOnlySegmentReader(IndexReader.open(ram, false));
     FieldInfos fi = reader.fieldInfos();
     assertTrue("OmitTermFreqAndPositions field bit should not be set.", !fi.fieldInfo("f1").omitTermFreqAndPositions);
@@ -245,7 +240,6 @@ public class TestOmitTf extends LuceneTe
     writer.close();
 
     assertNoPrx(ram);
-    _TestUtil.checkIndex(ram);
     ram.close();
   }
  
@@ -282,7 +276,6 @@ public class TestOmitTf extends LuceneTe
     writer.optimize();
     // flush
     writer.close();
-    _TestUtil.checkIndex(dir);
 
     /*
      * Verify the index

Modified: lucene/dev/branches/flexscoring/lucene/src/test/org/apache/lucene/index/TestParallelReaderEmptyIndex.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/flexscoring/lucene/src/test/org/apache/lucene/index/TestParallelReaderEmptyIndex.java?rev=1134358&r1=1134357&r2=1134358&view=diff
==============================================================================
--- lucene/dev/branches/flexscoring/lucene/src/test/org/apache/lucene/index/TestParallelReaderEmptyIndex.java (original)
+++ lucene/dev/branches/flexscoring/lucene/src/test/org/apache/lucene/index/TestParallelReaderEmptyIndex.java Fri Jun 10 15:58:18 2011
@@ -62,7 +62,6 @@ public class TestParallelReaderEmptyInde
 		
     iwOut.optimize();
     iwOut.close();
-    _TestUtil.checkIndex(rdOut);
     rdOut.close();
     rd1.close();
     rd2.close();
@@ -122,7 +121,6 @@ public class TestParallelReaderEmptyInde
     iwOut.optimize();
     iwOut.close();
     
-    _TestUtil.checkIndex(rdOut);
     rdOut.close();
   }
 }

Modified: lucene/dev/branches/flexscoring/lucene/src/test/org/apache/lucene/index/TestPayloads.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/flexscoring/lucene/src/test/org/apache/lucene/index/TestPayloads.java?rev=1134358&r1=1134357&r2=1134358&view=diff
==============================================================================
--- lucene/dev/branches/flexscoring/lucene/src/test/org/apache/lucene/index/TestPayloads.java (original)
+++ lucene/dev/branches/flexscoring/lucene/src/test/org/apache/lucene/index/TestPayloads.java Fri Jun 10 15:58:18 2011
@@ -474,7 +474,7 @@ public class TestPayloads extends Lucene
     
     public void testThreadSafety() throws Exception {
         final int numThreads = 5;
-        final int numDocs = 50 * RANDOM_MULTIPLIER;
+        final int numDocs = atLeast(50);
         final ByteArrayPool pool = new ByteArrayPool(numThreads, 5);
         
         Directory dir = newDirectory();
@@ -615,8 +615,6 @@ public class TestPayloads extends Lucene
     writer.optimize();
     writer.close();
 
-    _TestUtil.checkIndex(dir);
-
     dir.close();
   }
 }

Modified: lucene/dev/branches/flexscoring/lucene/src/test/org/apache/lucene/index/TestPerFieldCodecSupport.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/flexscoring/lucene/src/test/org/apache/lucene/index/TestPerFieldCodecSupport.java?rev=1134358&r1=1134357&r2=1134358&view=diff
==============================================================================
--- lucene/dev/branches/flexscoring/lucene/src/test/org/apache/lucene/index/TestPerFieldCodecSupport.java (original)
+++ lucene/dev/branches/flexscoring/lucene/src/test/org/apache/lucene/index/TestPerFieldCodecSupport.java Fri Jun 10 15:58:18 2011
@@ -274,7 +274,8 @@ public class TestPerFieldCodecSupport ex
     Index[] indexValue = new Index[] { Index.ANALYZED, Index.ANALYZED_NO_NORMS,
         Index.NOT_ANALYZED, Index.NOT_ANALYZED_NO_NORMS };
     final int docsPerRound = 97;
-    for (int i = 0; i < 5; i++) {
+    int numRounds = atLeast(1);
+    for (int i = 0; i < numRounds; i++) {
       CodecProvider provider = new CodecProvider();
       Codec[] codecs = new Codec[] { new StandardCodec(),
           new SimpleTextCodec(), new MockSepCodec(),
@@ -284,7 +285,8 @@ public class TestPerFieldCodecSupport ex
       for (Codec codec : codecs) {
         provider.register(codec);
       }
-      for (int j = 0; j < 30 * RANDOM_MULTIPLIER; j++) {
+      int num = atLeast(30);
+      for (int j = 0; j < num; j++) {
         provider.setFieldCodec("" + j, codecs[random.nextInt(codecs.length)].name);
       }
       IndexWriterConfig config = newIndexWriterConfig(random,
@@ -294,7 +296,8 @@ public class TestPerFieldCodecSupport ex
       IndexWriter writer = newWriter(dir, config);
       for (int j = 0; j < docsPerRound; j++) {
         final Document doc = new Document();
-        for (int k = 0; k < 30 * RANDOM_MULTIPLIER; k++) {
+        num = atLeast(30);
+        for (int k = 0; k < num; k++) {
           Field field = newField("" + k, _TestUtil
               .randomRealisticUnicodeString(random, 128), indexValue[random
               .nextInt(indexValue.length)]);
@@ -308,7 +311,6 @@ public class TestPerFieldCodecSupport ex
       writer.commit();
       assertEquals((i + 1) * docsPerRound, writer.maxDoc());
       writer.close();
-      _TestUtil.checkIndex(dir, provider);
     }
     dir.close();
   }

Modified: lucene/dev/branches/flexscoring/lucene/src/test/org/apache/lucene/index/TestPersistentSnapshotDeletionPolicy.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/flexscoring/lucene/src/test/org/apache/lucene/index/TestPersistentSnapshotDeletionPolicy.java?rev=1134358&r1=1134357&r2=1134358&view=diff
==============================================================================
--- lucene/dev/branches/flexscoring/lucene/src/test/org/apache/lucene/index/TestPersistentSnapshotDeletionPolicy.java (original)
+++ lucene/dev/branches/flexscoring/lucene/src/test/org/apache/lucene/index/TestPersistentSnapshotDeletionPolicy.java Fri Jun 10 15:58:18 2011
@@ -30,9 +30,13 @@ import org.junit.Before;
 import org.junit.Test;
 
 public class TestPersistentSnapshotDeletionPolicy extends TestSnapshotDeletionPolicy {
+
   // Keep it a class member so that getDeletionPolicy can use it
   private Directory snapshotDir;
   
+  // so we can close it if called by SDP tests
+  private PersistentSnapshotDeletionPolicy psdp;
+  
   @Before
   @Override
   public void setUp() throws Exception {
@@ -43,15 +47,17 @@ public class TestPersistentSnapshotDelet
   @After
   @Override
   public void tearDown() throws Exception {
+    if (psdp != null) psdp.close();
     snapshotDir.close();
     super.tearDown();
   }
   
   @Override
   protected SnapshotDeletionPolicy getDeletionPolicy() throws IOException {
+    if (psdp != null) psdp.close();
     snapshotDir.close();
     snapshotDir = newDirectory();
-    return new PersistentSnapshotDeletionPolicy(
+    return psdp = new PersistentSnapshotDeletionPolicy(
         new KeepOnlyLastCommitDeletionPolicy(), snapshotDir, OpenMode.CREATE,
         TEST_VERSION_CURRENT);
   }
@@ -173,6 +179,8 @@ public class TestPersistentSnapshotDelet
      fail("should not have reached here - the snapshots directory should be locked!");
     } catch (LockObtainFailedException e) {
       // expected
+    } finally {
+      psdp.close();
     }
     
     // Reading the snapshots info should succeed though

Modified: lucene/dev/branches/flexscoring/lucene/src/test/org/apache/lucene/index/TestRollingUpdates.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/flexscoring/lucene/src/test/org/apache/lucene/index/TestRollingUpdates.java?rev=1134358&r1=1134357&r2=1134358&view=diff
==============================================================================
--- lucene/dev/branches/flexscoring/lucene/src/test/org/apache/lucene/index/TestRollingUpdates.java (original)
+++ lucene/dev/branches/flexscoring/lucene/src/test/org/apache/lucene/index/TestRollingUpdates.java Fri Jun 10 15:58:18 2011
@@ -36,7 +36,7 @@ public class TestRollingUpdates extends 
     final LineFileDocs docs = new LineFileDocs(random);
 
     final IndexWriter w = new IndexWriter(dir, newIndexWriterConfig(TEST_VERSION_CURRENT, new MockAnalyzer(random)));
-    final int SIZE = 200 * RANDOM_MULTIPLIER;
+    final int SIZE = atLeast(20);
     int id = 0;
     IndexReader r = null;
     final int numUpdates = (int) (SIZE * (2+random.nextDouble()));
@@ -82,9 +82,8 @@ public class TestRollingUpdates extends 
     for (int r = 0; r < 3; r++) {
       final IndexWriter w = new IndexWriter(dir, newIndexWriterConfig(
           TEST_VERSION_CURRENT, new MockAnalyzer(random)).setMaxBufferedDocs(2));
-      final int SIZE = 200 * RANDOM_MULTIPLIER;
-      final int numUpdates = (int) (SIZE * (2 + random.nextDouble()));
-      int numThreads = 3 + random.nextInt(12);
+      final int numUpdates = atLeast(20);
+      int numThreads = _TestUtil.nextInt(random, 2, 6);
       IndexingThread[] threads = new IndexingThread[numThreads];
       for (int i = 0; i < numThreads; i++) {
         threads[i] = new IndexingThread(docs, w, numUpdates);
@@ -97,6 +96,7 @@ public class TestRollingUpdates extends 
 
       w.close();
     }
+
     IndexReader open = IndexReader.open(dir);
     assertEquals(1, open.numDocs());
     open.close();
@@ -123,9 +123,10 @@ public class TestRollingUpdates extends 
           Document doc = new Document();// docs.nextDoc();
           doc.add(newField("id", "test", Index.NOT_ANALYZED));
           writer.updateDocument(new Term("id", "test"), doc);
-          if (random.nextInt(10) == 0) {
-            if (open == null)
+          if (random.nextInt(3) == 0) {
+            if (open == null) {
               open = IndexReader.open(writer, true);
+            }
             IndexReader reader = open.reopen();
             if (reader != open) {
               open.close();
@@ -134,11 +135,12 @@ public class TestRollingUpdates extends 
             assertEquals("iter: " + i + " numDocs: "+ open.numDocs() + " del: " + open.numDeletedDocs() + " max: " + open.maxDoc(), 1, open.numDocs());
           }
         }
-        open.close();
+        if (open != null) {
+          open.close();
+        }
       } catch (Exception e) {
-        fail(e.getMessage());
+        throw new RuntimeException(e);
       }
-      
     }
   }
 }

Modified: lucene/dev/branches/flexscoring/lucene/src/test/org/apache/lucene/index/TestSegmentMerger.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/flexscoring/lucene/src/test/org/apache/lucene/index/TestSegmentMerger.java?rev=1134358&r1=1134357&r2=1134358&view=diff
==============================================================================
--- lucene/dev/branches/flexscoring/lucene/src/test/org/apache/lucene/index/TestSegmentMerger.java (original)
+++ lucene/dev/branches/flexscoring/lucene/src/test/org/apache/lucene/index/TestSegmentMerger.java Fri Jun 10 15:58:18 2011
@@ -20,8 +20,12 @@ package org.apache.lucene.index;
 import org.apache.lucene.util.LuceneTestCase;
 import org.apache.lucene.store.BufferedIndexInput;
 import org.apache.lucene.store.Directory;
+import org.apache.lucene.analysis.MockAnalyzer;
 import org.apache.lucene.document.Document;
-import org.apache.lucene.index.codecs.CodecProvider;
+import org.apache.lucene.document.Field;
+import org.apache.lucene.document.Field.Index;
+import org.apache.lucene.document.Field.Store;
+import org.apache.lucene.index.IndexWriterConfig.OpenMode;
 import org.apache.lucene.util.BytesRef;
 
 import java.io.IOException;
@@ -127,4 +131,50 @@ public class TestSegmentMerger extends L
     TestSegmentReader.checkNorms(mergedReader);
     mergedReader.close();
   }
+  
+  // LUCENE-3143
+  public void testInvalidFilesToCreateCompound() throws Exception {
+    Directory dir = newDirectory();
+    IndexWriterConfig iwc = newIndexWriterConfig(TEST_VERSION_CURRENT, new MockAnalyzer(random));
+    IndexWriter w = new IndexWriter(dir, iwc);
+    
+    // Create an index w/ .del file
+    w.addDocument(new Document());
+    Document doc = new Document();
+    doc.add(new Field("c", "test", Store.NO, Index.ANALYZED));
+    w.addDocument(doc);
+    w.commit();
+    w.deleteDocuments(new Term("c", "test"));
+    w.close();
+    
+    // Assert that SM fails if .del exists
+    SegmentMerger sm = new SegmentMerger(dir, 1, "a", null, null, null);
+    try {
+      sm.createCompoundFile("b1", w.segmentInfos.info(0));
+      fail("should not have been able to create a .cfs with .del and .s* files");
+    } catch (AssertionError e) {
+      // expected
+    }
+    
+    // Create an index w/ .s*
+    w = new IndexWriter(dir, new IndexWriterConfig(TEST_VERSION_CURRENT, new MockAnalyzer(random)).setOpenMode(OpenMode.CREATE));
+    doc = new Document();
+    doc.add(new Field("c", "test", Store.NO, Index.ANALYZED));
+    w.addDocument(doc);
+    w.close();
+    IndexReader r = IndexReader.open(dir, false);
+    r.setNorm(0, "c", (byte) 1);
+    r.close();
+    
+    // Assert that SM fails if .s* exists
+    try {
+      sm.createCompoundFile("b2", w.segmentInfos.info(0));
+      fail("should not have been able to create a .cfs with .del and .s* files");
+    } catch (AssertionError e) {
+      // expected
+    }
+
+    dir.close();
+  }
+
 }

Modified: lucene/dev/branches/flexscoring/lucene/src/test/org/apache/lucene/index/TestStressAdvance.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/flexscoring/lucene/src/test/org/apache/lucene/index/TestStressAdvance.java?rev=1134358&r1=1134357&r2=1134358&view=diff
==============================================================================
--- lucene/dev/branches/flexscoring/lucene/src/test/org/apache/lucene/index/TestStressAdvance.java (original)
+++ lucene/dev/branches/flexscoring/lucene/src/test/org/apache/lucene/index/TestStressAdvance.java Fri Jun 10 15:58:18 2011
@@ -40,7 +40,8 @@ public class TestStressAdvance extends L
       doc.add(f);
       final Field idField = newField("id", "", Field.Store.YES, Field.Index.NOT_ANALYZED_NO_NORMS);
       doc.add(idField);
-      for(int id=0;id<5000*RANDOM_MULTIPLIER;id++) {
+      int num = atLeast(5000);
+      for(int id=0;id<num;id++) {
         if (random.nextInt(4) == 3) {
           f.setValue("a");
           aDocs.add(id);

Modified: lucene/dev/branches/flexscoring/lucene/src/test/org/apache/lucene/index/TestStressIndexing.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/flexscoring/lucene/src/test/org/apache/lucene/index/TestStressIndexing.java?rev=1134358&r1=1134357&r2=1134358&view=diff
==============================================================================
--- lucene/dev/branches/flexscoring/lucene/src/test/org/apache/lucene/index/TestStressIndexing.java (original)
+++ lucene/dev/branches/flexscoring/lucene/src/test/org/apache/lucene/index/TestStressIndexing.java Fri Jun 10 15:58:18 2011
@@ -27,7 +27,7 @@ public class TestStressIndexing extends 
   private static abstract class TimedThread extends Thread {
     volatile boolean failed;
     int count;
-    private static int RUN_TIME_SEC = 1 * RANDOM_MULTIPLIER;
+    private static int RUN_TIME_MSEC = atLeast(1000);
     private TimedThread[] allThreads;
 
     abstract public void doWork() throws Throwable;
@@ -38,7 +38,7 @@ public class TestStressIndexing extends 
 
     @Override
     public void run() {
-      final long stopTime = System.currentTimeMillis() + 1000*RUN_TIME_SEC;
+      final long stopTime = System.currentTimeMillis() + RUN_TIME_MSEC;
 
       count = 0;
 

Modified: lucene/dev/branches/flexscoring/lucene/src/test/org/apache/lucene/index/TestStressIndexing2.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/flexscoring/lucene/src/test/org/apache/lucene/index/TestStressIndexing2.java?rev=1134358&r1=1134357&r2=1134358&view=diff
==============================================================================
--- lucene/dev/branches/flexscoring/lucene/src/test/org/apache/lucene/index/TestStressIndexing2.java (original)
+++ lucene/dev/branches/flexscoring/lucene/src/test/org/apache/lucene/index/TestStressIndexing2.java Fri Jun 10 15:58:18 2011
@@ -93,7 +93,7 @@ public class TestStressIndexing2 extends
   public void testMultiConfig() throws Throwable {
     // test lots of smaller different params together
 
-    int num = 3 * RANDOM_MULTIPLIER;
+    int num = atLeast(3);
     for (int i = 0; i < num; i++) { // increase iterations for better testing
       if (VERBOSE) {
         System.out.println("\n\nTEST: top iter=" + i);

Modified: lucene/dev/branches/flexscoring/lucene/src/test/org/apache/lucene/index/TestThreadedOptimize.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/flexscoring/lucene/src/test/org/apache/lucene/index/TestThreadedOptimize.java?rev=1134358&r1=1134357&r2=1134358&view=diff
==============================================================================
--- lucene/dev/branches/flexscoring/lucene/src/test/org/apache/lucene/index/TestThreadedOptimize.java (original)
+++ lucene/dev/branches/flexscoring/lucene/src/test/org/apache/lucene/index/TestThreadedOptimize.java Fri Jun 10 15:58:18 2011
@@ -47,14 +47,13 @@ public class TestThreadedOptimize extend
     failed = true;
   }
 
-  public void runTest(Random random, Directory directory, MergeScheduler merger) throws Exception {
+  public void runTest(Random random, Directory directory) throws Exception {
 
     IndexWriter writer = new IndexWriter(
         directory,
         newIndexWriterConfig(TEST_VERSION_CURRENT, ANALYZER).
             setOpenMode(OpenMode.CREATE).
             setMaxBufferedDocs(2).
-            setMergeScheduler(merger).
             setMergePolicy(newLogMergePolicy())
     );
 
@@ -65,8 +64,8 @@ public class TestThreadedOptimize extend
 
       for(int i=0;i<200;i++) {
         Document d = new Document();
-        d.add(newField("id", Integer.toString(i), Field.Store.YES, Field.Index.NOT_ANALYZED));
-        d.add(newField("contents", English.intToEnglish(i), Field.Store.NO, Field.Index.ANALYZED));
+        d.add(newField("id", Integer.toString(i), Field.Store.YES, Field.Index.NOT_ANALYZED_NO_NORMS));
+        d.add(newField("contents", English.intToEnglish(i), Field.Store.NO, Field.Index.ANALYZED_NO_NORMS));
         writer.addDocument(d);
       }
 
@@ -86,8 +85,8 @@ public class TestThreadedOptimize extend
                 writerFinal.optimize(false);
                 for(int k=0;k<17*(1+iFinal);k++) {
                   Document d = new Document();
-                  d.add(newField("id", iterFinal + "_" + iFinal + "_" + j + "_" + k, Field.Store.YES, Field.Index.NOT_ANALYZED));
-                  d.add(newField("contents", English.intToEnglish(iFinal+k), Field.Store.NO, Field.Index.ANALYZED));
+                  d.add(newField("id", iterFinal + "_" + iFinal + "_" + j + "_" + k, Field.Store.YES, Field.Index.NOT_ANALYZED_NO_NORMS));
+                  d.add(newField("contents", English.intToEnglish(iFinal+k), Field.Store.NO, Field.Index.ANALYZED_NO_NORMS));
                   writerFinal.addDocument(d);
                 }
                 for(int k=0;k<9*(1+iFinal);k++)
@@ -135,8 +134,7 @@ public class TestThreadedOptimize extend
   */
   public void testThreadedOptimize() throws Exception {
     Directory directory = newDirectory();
-    runTest(random, directory, new SerialMergeScheduler());
-    runTest(random, directory, new ConcurrentMergeScheduler());
+    runTest(random, directory);
     directory.close();
   }
 }

Modified: lucene/dev/branches/flexscoring/lucene/src/test/org/apache/lucene/index/TestTieredMergePolicy.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/flexscoring/lucene/src/test/org/apache/lucene/index/TestTieredMergePolicy.java?rev=1134358&r1=1134357&r2=1134358&view=diff
==============================================================================
--- lucene/dev/branches/flexscoring/lucene/src/test/org/apache/lucene/index/TestTieredMergePolicy.java (original)
+++ lucene/dev/branches/flexscoring/lucene/src/test/org/apache/lucene/index/TestTieredMergePolicy.java Fri Jun 10 15:58:18 2011
@@ -66,7 +66,8 @@ public class TestTieredMergePolicy exten
   }
 
   public void testPartialOptimize() throws Exception {
-    for(int iter=0;iter<10*RANDOM_MULTIPLIER;iter++) {
+    int num = atLeast(10);
+    for(int iter=0;iter<num;iter++) {
       if (VERBOSE) {
         System.out.println("TEST: iter=" + iter);
       }

Modified: lucene/dev/branches/flexscoring/lucene/src/test/org/apache/lucene/index/TestTransactions.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/flexscoring/lucene/src/test/org/apache/lucene/index/TestTransactions.java?rev=1134358&r1=1134357&r2=1134358&view=diff
==============================================================================
--- lucene/dev/branches/flexscoring/lucene/src/test/org/apache/lucene/index/TestTransactions.java (original)
+++ lucene/dev/branches/flexscoring/lucene/src/test/org/apache/lucene/index/TestTransactions.java Fri Jun 10 15:58:18 2011
@@ -42,7 +42,7 @@ public class TestTransactions extends Lu
 
   private static abstract class TimedThread extends Thread {
     volatile boolean failed;
-    private static float RUN_TIME_SEC = 0.5f * RANDOM_MULTIPLIER;
+    private static float RUN_TIME_MSEC = atLeast(500);
     private TimedThread[] allThreads;
 
     abstract public void doWork() throws Throwable;
@@ -53,7 +53,7 @@ public class TestTransactions extends Lu
 
     @Override
     public void run() {
-      final long stopTime = System.currentTimeMillis() + (long) (1000*RUN_TIME_SEC);
+      final long stopTime = System.currentTimeMillis() + (long) (RUN_TIME_MSEC);
 
       try {
         do {

Modified: lucene/dev/branches/flexscoring/lucene/src/test/org/apache/lucene/index/codecs/preflex/TestSurrogates.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/flexscoring/lucene/src/test/org/apache/lucene/index/codecs/preflex/TestSurrogates.java?rev=1134358&r1=1134357&r2=1134358&view=diff
==============================================================================
--- lucene/dev/branches/flexscoring/lucene/src/test/org/apache/lucene/index/codecs/preflex/TestSurrogates.java (original)
+++ lucene/dev/branches/flexscoring/lucene/src/test/org/apache/lucene/index/codecs/preflex/TestSurrogates.java Fri Jun 10 15:58:18 2011
@@ -134,7 +134,7 @@ public class TestSurrogates extends Luce
       System.out.println("\nTEST: top now seek");
     }
 
-    int num = 100 * RANDOM_MULTIPLIER;
+    int num = atLeast(100);
     for (int iter = 0; iter < num; iter++) {
 
       // pick random field+term
@@ -197,7 +197,7 @@ public class TestSurrogates extends Luce
     }
 
     {
-      int num = 100 * RANDOM_MULTIPLIER;
+      int num = atLeast(100);
       for (int iter = 0; iter < num; iter++) {
       
         // seek to random spot
@@ -287,7 +287,7 @@ public class TestSurrogates extends Luce
 
     for(int f=0;f<numField;f++) {
       String field = "f" + f;
-      final int numTerms = 10000 * RANDOM_MULTIPLIER;
+      final int numTerms = atLeast(1000);
 
       final Set<String> uniqueTerms = new HashSet<String>();
 

Modified: lucene/dev/branches/flexscoring/lucene/src/test/org/apache/lucene/search/BaseTestRangeFilter.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/flexscoring/lucene/src/test/org/apache/lucene/search/BaseTestRangeFilter.java?rev=1134358&r1=1134357&r2=1134358&view=diff
==============================================================================
--- lucene/dev/branches/flexscoring/lucene/src/test/org/apache/lucene/search/BaseTestRangeFilter.java (original)
+++ lucene/dev/branches/flexscoring/lucene/src/test/org/apache/lucene/search/BaseTestRangeFilter.java Fri Jun 10 15:58:18 2011
@@ -67,7 +67,7 @@ public class BaseTestRangeFilter extends
   static TestIndex unsignedIndexDir;
   
   static int minId = 0;
-  static int maxId = 10000;
+  static int maxId = atLeast(500);
   
   static final int intLength = Integer.toString(Integer.MAX_VALUE).length();
   
@@ -115,9 +115,9 @@ public class BaseTestRangeFilter extends
     /* build an index */
     
     Document doc = new Document();
-    Field idField = newField(random, "id", "", Field.Store.YES, Field.Index.NOT_ANALYZED);
-    Field randField = newField(random, "rand", "", Field.Store.YES, Field.Index.NOT_ANALYZED);
-    Field bodyField = newField(random, "body", "", Field.Store.YES, Field.Index.NOT_ANALYZED);
+    Field idField = newField(random, "id", "", Field.Store.YES, Field.Index.NOT_ANALYZED_NO_NORMS);
+    Field randField = newField(random, "rand", "", Field.Store.YES, Field.Index.NOT_ANALYZED_NO_NORMS);
+    Field bodyField = newField(random, "body", "", Field.Store.NO, Field.Index.NOT_ANALYZED_NO_NORMS);
     doc.add(idField);
     doc.add(randField);
     doc.add(bodyField);

Modified: lucene/dev/branches/flexscoring/lucene/src/test/org/apache/lucene/search/TestBoolean2.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/flexscoring/lucene/src/test/org/apache/lucene/search/TestBoolean2.java?rev=1134358&r1=1134357&r2=1134358&view=diff
==============================================================================
--- lucene/dev/branches/flexscoring/lucene/src/test/org/apache/lucene/search/TestBoolean2.java (original)
+++ lucene/dev/branches/flexscoring/lucene/src/test/org/apache/lucene/search/TestBoolean2.java Fri Jun 10 15:58:18 2011
@@ -232,7 +232,7 @@ public class TestBoolean2 extends Lucene
     try {
 
       // increase number of iterations for more complete testing
-      int num = 50 * RANDOM_MULTIPLIER;
+      int num = atLeast(10);
       for (int i=0; i<num; i++) {
         int level = random.nextInt(3);
         q1 = randBoolQuery(new Random(random.nextLong()), random.nextBoolean(), level, field, vals, null);

Modified: lucene/dev/branches/flexscoring/lucene/src/test/org/apache/lucene/search/TestBooleanMinShouldMatch.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/flexscoring/lucene/src/test/org/apache/lucene/search/TestBooleanMinShouldMatch.java?rev=1134358&r1=1134357&r2=1134358&view=diff
==============================================================================
--- lucene/dev/branches/flexscoring/lucene/src/test/org/apache/lucene/search/TestBooleanMinShouldMatch.java (original)
+++ lucene/dev/branches/flexscoring/lucene/src/test/org/apache/lucene/search/TestBooleanMinShouldMatch.java Fri Jun 10 15:58:18 2011
@@ -24,6 +24,8 @@ import org.apache.lucene.index.IndexRead
 import org.apache.lucene.index.RandomIndexWriter;
 import org.apache.lucene.index.Term;
 import org.apache.lucene.store.Directory;
+import org.junit.AfterClass;
+import org.junit.BeforeClass;
 
 import java.text.DecimalFormat;
 import java.util.Random;
@@ -32,14 +34,12 @@ import java.util.Random;
  */
 public class TestBooleanMinShouldMatch extends LuceneTestCase {
 
-    private Directory index;
-    private IndexReader r;
-    private IndexSearcher s;
-
-    @Override
-    public void setUp() throws Exception {
-        super.setUp();
+    private static Directory index;
+    private static IndexReader r;
+    private static IndexSearcher s;
 
+    @BeforeClass
+    public static void beforeClass() throws Exception {
         String[] data = new String [] {
             "A 1 2 3 4 5 6",
             "Z       4 5 6",
@@ -70,12 +70,14 @@ public class TestBooleanMinShouldMatch e
 //System.out.println("Set up " + getName());
     }
     
-    @Override
-    public void tearDown() throws Exception {
+    @AfterClass
+    public static void afterClass() throws Exception {
       s.close();
+      s = null;
       r.close();
+      r = null;
       index.close();
-      super.tearDown();
+      index = null;
     }
 
 
@@ -312,7 +314,7 @@ public class TestBooleanMinShouldMatch e
 
 
       // increase number of iterations for more complete testing      
-      int num = 50 * RANDOM_MULTIPLIER;
+      int num = atLeast(10);
       for (int i=0; i<num; i++) {
         int lev = random.nextInt(maxLev);
         final long seed = random.nextLong();

Modified: lucene/dev/branches/flexscoring/lucene/src/test/org/apache/lucene/search/TestCustomSearcherSort.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/flexscoring/lucene/src/test/org/apache/lucene/search/TestCustomSearcherSort.java?rev=1134358&r1=1134357&r2=1134358&view=diff
==============================================================================
--- lucene/dev/branches/flexscoring/lucene/src/test/org/apache/lucene/search/TestCustomSearcherSort.java (original)
+++ lucene/dev/branches/flexscoring/lucene/src/test/org/apache/lucene/search/TestCustomSearcherSort.java Fri Jun 10 15:58:18 2011
@@ -39,7 +39,7 @@ public class TestCustomSearcherSort exte
   private IndexReader reader;
   private Query query = null;
   // reduced from 20000 to 2000 to speed up test...
-  private final static int INDEX_SIZE = 2000 * RANDOM_MULTIPLIER;
+  private final static int INDEX_SIZE = atLeast(2000);
   
   /**
    * Create index and query for test cases.

Modified: lucene/dev/branches/flexscoring/lucene/src/test/org/apache/lucene/search/TestDateFilter.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/flexscoring/lucene/src/test/org/apache/lucene/search/TestDateFilter.java?rev=1134358&r1=1134357&r2=1134358&view=diff
==============================================================================
--- lucene/dev/branches/flexscoring/lucene/src/test/org/apache/lucene/search/TestDateFilter.java (original)
+++ lucene/dev/branches/flexscoring/lucene/src/test/org/apache/lucene/search/TestDateFilter.java Fri Jun 10 15:58:18 2011
@@ -32,7 +32,6 @@ import java.io.IOException;
  * DateFilter JUnit tests.
  * 
  * 
- * @version $Revision$
  */
 public class TestDateFilter extends LuceneTestCase {
  

Modified: lucene/dev/branches/flexscoring/lucene/src/test/org/apache/lucene/search/TestDocBoost.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/flexscoring/lucene/src/test/org/apache/lucene/search/TestDocBoost.java?rev=1134358&r1=1134357&r2=1134358&view=diff
==============================================================================
--- lucene/dev/branches/flexscoring/lucene/src/test/org/apache/lucene/search/TestDocBoost.java (original)
+++ lucene/dev/branches/flexscoring/lucene/src/test/org/apache/lucene/search/TestDocBoost.java Fri Jun 10 15:58:18 2011
@@ -31,7 +31,6 @@ import org.apache.lucene.util.LuceneTest
 /** Document boost unit test.
  *
  *
- * @version $Revision$
  */
 public class TestDocBoost extends LuceneTestCase {
 

Modified: lucene/dev/branches/flexscoring/lucene/src/test/org/apache/lucene/search/TestFieldCache.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/flexscoring/lucene/src/test/org/apache/lucene/search/TestFieldCache.java?rev=1134358&r1=1134357&r2=1134358&view=diff
==============================================================================
--- lucene/dev/branches/flexscoring/lucene/src/test/org/apache/lucene/search/TestFieldCache.java (original)
+++ lucene/dev/branches/flexscoring/lucene/src/test/org/apache/lucene/search/TestFieldCache.java Fri Jun 10 15:58:18 2011
@@ -33,7 +33,7 @@ import java.io.PrintStream;
 
 public class TestFieldCache extends LuceneTestCase {
   protected IndexReader reader;
-  private static final int NUM_DOCS = 1000 * RANDOM_MULTIPLIER;
+  private static final int NUM_DOCS = atLeast(1000);
   private String[] unicodeStrings;
   private Directory directory;
 
@@ -185,7 +185,8 @@ public class TestFieldCache extends Luce
     }
 
     // seek the enum around (note this isn't a great test here)
-    for (int i = 0; i < 100 * RANDOM_MULTIPLIER; i++) {
+    int num = atLeast(100);
+    for (int i = 0; i < num; i++) {
       int k = _TestUtil.nextInt(random, 1, nTerms-1);
       BytesRef val1 = termsIndex.lookup(k, val);
       assertEquals(TermsEnum.SeekStatus.FOUND, tenum.seek(val1));
@@ -217,6 +218,7 @@ public class TestFieldCache extends Luce
     IndexReader r = IndexReader.open(writer, true);
     FieldCache.DocTerms terms = FieldCache.DEFAULT.getTerms(r, "foobar");
     FieldCache.DocTermsIndex termsIndex = FieldCache.DEFAULT.getTermsIndex(r, "foobar");
+    writer.close();
     r.close();
     dir.close();
   }

Modified: lucene/dev/branches/flexscoring/lucene/src/test/org/apache/lucene/search/TestFuzzyQuery2.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/flexscoring/lucene/src/test/org/apache/lucene/search/TestFuzzyQuery2.java?rev=1134358&r1=1134357&r2=1134358&view=diff
==============================================================================
--- lucene/dev/branches/flexscoring/lucene/src/test/org/apache/lucene/search/TestFuzzyQuery2.java (original)
+++ lucene/dev/branches/flexscoring/lucene/src/test/org/apache/lucene/search/TestFuzzyQuery2.java Fri Jun 10 15:58:18 2011
@@ -57,18 +57,21 @@ public class TestFuzzyQuery2 extends Luc
   /** epsilon for score comparisons */
   static final float epsilon = 0.00001f;
 
+  static int[][] mappings = new int[][] {
+    new int[] { 0x40, 0x41 },
+    new int[] { 0x40, 0x0195 },
+    new int[] { 0x40, 0x0906 },
+    new int[] { 0x40, 0x1040F },
+    new int[] { 0x0194, 0x0195 },
+    new int[] { 0x0194, 0x0906 },
+    new int[] { 0x0194, 0x1040F },
+    new int[] { 0x0905, 0x0906 },
+    new int[] { 0x0905, 0x1040F },
+    new int[] { 0x1040E, 0x1040F }
+  };
   public void testFromTestData() throws Exception {
     // TODO: randomize!
-    assertFromTestData(new int[] { 0x40, 0x41 });
-    assertFromTestData(new int[] { 0x40, 0x0195 });
-    assertFromTestData(new int[] { 0x40, 0x0906 });
-    assertFromTestData(new int[] { 0x40, 0x1040F });
-    assertFromTestData(new int[] { 0x0194, 0x0195 });
-    assertFromTestData(new int[] { 0x0194, 0x0906 });
-    assertFromTestData(new int[] { 0x0194, 0x1040F });
-    assertFromTestData(new int[] { 0x0905, 0x0906 });
-    assertFromTestData(new int[] { 0x0905, 0x1040F });
-    assertFromTestData(new int[] { 0x1040E, 0x1040F });
+    assertFromTestData(mappings[random.nextInt(mappings.length)]);
   }
 
   public void assertFromTestData(int codePointTable[]) throws Exception {

Modified: lucene/dev/branches/flexscoring/lucene/src/test/org/apache/lucene/search/TestMultiValuedNumericRangeQuery.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/flexscoring/lucene/src/test/org/apache/lucene/search/TestMultiValuedNumericRangeQuery.java?rev=1134358&r1=1134357&r2=1134358&view=diff
==============================================================================
--- lucene/dev/branches/flexscoring/lucene/src/test/org/apache/lucene/search/TestMultiValuedNumericRangeQuery.java (original)
+++ lucene/dev/branches/flexscoring/lucene/src/test/org/apache/lucene/search/TestMultiValuedNumericRangeQuery.java Fri Jun 10 15:58:18 2011
@@ -46,7 +46,7 @@ public class TestMultiValuedNumericRange
     
     DecimalFormat format = new DecimalFormat("00000000000", new DecimalFormatSymbols(Locale.US));
     
-    int num = 5000 * RANDOM_MULTIPLIER;
+    int num = atLeast(500);
     for (int l = 0; l < num; l++) {
       Document doc = new Document();
       for (int m=0, c=random.nextInt(10); m<=c; m++) {
@@ -60,7 +60,7 @@ public class TestMultiValuedNumericRange
     writer.close();
     
     IndexSearcher searcher=newSearcher(reader);
-    num = 50 * RANDOM_MULTIPLIER;
+    num = atLeast(50);
     for (int i = 0; i < num; i++) {
       int lower=random.nextInt(Integer.MAX_VALUE);
       int upper=random.nextInt(Integer.MAX_VALUE);

Modified: lucene/dev/branches/flexscoring/lucene/src/test/org/apache/lucene/search/TestNot.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/flexscoring/lucene/src/test/org/apache/lucene/search/TestNot.java?rev=1134358&r1=1134357&r2=1134358&view=diff
==============================================================================
--- lucene/dev/branches/flexscoring/lucene/src/test/org/apache/lucene/search/TestNot.java (original)
+++ lucene/dev/branches/flexscoring/lucene/src/test/org/apache/lucene/search/TestNot.java Fri Jun 10 15:58:18 2011
@@ -30,7 +30,6 @@ import org.apache.lucene.document.Field;
 /** Similarity unit test.
  *
  *
- * @version $Revision$
  */
 public class TestNot extends LuceneTestCase {
 

Modified: lucene/dev/branches/flexscoring/lucene/src/test/org/apache/lucene/search/TestNumericRangeQuery32.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/flexscoring/lucene/src/test/org/apache/lucene/search/TestNumericRangeQuery32.java?rev=1134358&r1=1134357&r2=1134358&view=diff
==============================================================================
--- lucene/dev/branches/flexscoring/lucene/src/test/org/apache/lucene/search/TestNumericRangeQuery32.java (original)
+++ lucene/dev/branches/flexscoring/lucene/src/test/org/apache/lucene/search/TestNumericRangeQuery32.java Fri Jun 10 15:58:18 2011
@@ -44,7 +44,7 @@ public class TestNumericRangeQuery32 ext
   // shift the starting of the values to the left, to also have negative values:
   private static final int startOffset = - 1 << 15;
   // number of docs to generate for testing
-  private static final int noDocs = 10000 * RANDOM_MULTIPLIER;
+  private static final int noDocs = atLeast(5000);
   
   private static Directory directory = null;
   private static IndexReader reader = null;
@@ -336,7 +336,7 @@ public class TestNumericRangeQuery32 ext
   private void testRandomTrieAndClassicRangeQuery(int precisionStep) throws Exception {
     String field="field"+precisionStep;
     int termCountT=0,termCountC=0;
-    int num = 10 * RANDOM_MULTIPLIER;
+    int num = atLeast(10);
     for (int i = 0; i < num; i++) {
       int lower=(int)(random.nextDouble()*noDocs*distance)+startOffset;
       int upper=(int)(random.nextDouble()*noDocs*distance)+startOffset;
@@ -414,7 +414,7 @@ public class TestNumericRangeQuery32 ext
   private void testRangeSplit(int precisionStep) throws Exception {
     String field="ascfield"+precisionStep;
     // 10 random tests
-    int  num = 10 * RANDOM_MULTIPLIER;
+    int  num = atLeast(10);
     for (int  i =0;  i< num; i++) {
       int lower=(int)(random.nextDouble()*noDocs - noDocs/2);
       int upper=(int)(random.nextDouble()*noDocs - noDocs/2);
@@ -490,7 +490,7 @@ public class TestNumericRangeQuery32 ext
     String field="field"+precisionStep;
     // 10 random tests, the index order is ascending,
     // so using a reverse sort field should retun descending documents
-    int num = 10 * RANDOM_MULTIPLIER;
+    int num = atLeast(10);
     for (int i = 0; i < num; i++) {
       int lower=(int)(random.nextDouble()*noDocs*distance)+startOffset;
       int upper=(int)(random.nextDouble()*noDocs*distance)+startOffset;

Modified: lucene/dev/branches/flexscoring/lucene/src/test/org/apache/lucene/search/TestNumericRangeQuery64.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/flexscoring/lucene/src/test/org/apache/lucene/search/TestNumericRangeQuery64.java?rev=1134358&r1=1134357&r2=1134358&view=diff
==============================================================================
--- lucene/dev/branches/flexscoring/lucene/src/test/org/apache/lucene/search/TestNumericRangeQuery64.java (original)
+++ lucene/dev/branches/flexscoring/lucene/src/test/org/apache/lucene/search/TestNumericRangeQuery64.java Fri Jun 10 15:58:18 2011
@@ -41,7 +41,7 @@ public class TestNumericRangeQuery64 ext
   // shift the starting of the values to the left, to also have negative values:
   private static final long startOffset = - 1L << 31;
   // number of docs to generate for testing
-  private static final int noDocs = 10000 * RANDOM_MULTIPLIER;
+  private static final int noDocs = atLeast(5000);
   
   private static Directory directory = null;
   private static IndexReader reader = null;
@@ -353,7 +353,7 @@ public class TestNumericRangeQuery64 ext
   private void testRandomTrieAndClassicRangeQuery(int precisionStep) throws Exception {
     String field="field"+precisionStep;
     int termCountT=0,termCountC=0;
-    int num = 10 * RANDOM_MULTIPLIER;
+    int num = atLeast(10);
     for (int i = 0; i < num; i++) {
       long lower=(long)(random.nextDouble()*noDocs*distance)+startOffset;
       long upper=(long)(random.nextDouble()*noDocs*distance)+startOffset;
@@ -436,7 +436,7 @@ public class TestNumericRangeQuery64 ext
   private void testRangeSplit(int precisionStep) throws Exception {
     String field="ascfield"+precisionStep;
     // 10 random tests
-    int num = 10 * RANDOM_MULTIPLIER;
+    int num = atLeast(10);
     for (int i = 0; i < num; i++) {
       long lower=(long)(random.nextDouble()*noDocs - noDocs/2);
       long upper=(long)(random.nextDouble()*noDocs - noDocs/2);
@@ -522,7 +522,7 @@ public class TestNumericRangeQuery64 ext
     String field="field"+precisionStep;
     // 10 random tests, the index order is ascending,
     // so using a reverse sort field should retun descending documents
-    int num = 10 * RANDOM_MULTIPLIER;
+    int num = atLeast(10);
     for (int i = 0; i < num; i++) {
       long lower=(long)(random.nextDouble()*noDocs*distance)+startOffset;
       long upper=(long)(random.nextDouble()*noDocs*distance)+startOffset;

Modified: lucene/dev/branches/flexscoring/lucene/src/test/org/apache/lucene/search/TestPhraseQuery.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/flexscoring/lucene/src/test/org/apache/lucene/search/TestPhraseQuery.java?rev=1134358&r1=1134357&r2=1134358&view=diff
==============================================================================
--- lucene/dev/branches/flexscoring/lucene/src/test/org/apache/lucene/search/TestPhraseQuery.java (original)
+++ lucene/dev/branches/flexscoring/lucene/src/test/org/apache/lucene/search/TestPhraseQuery.java Fri Jun 10 15:58:18 2011
@@ -27,6 +27,8 @@ import org.apache.lucene.queryParser.Que
 import org.apache.lucene.store.*;
 import org.apache.lucene.util.Version;
 import org.apache.lucene.util._TestUtil;
+import org.junit.AfterClass;
+import org.junit.BeforeClass;
 
 import java.io.IOException;
 import java.io.Reader;
@@ -45,14 +47,13 @@ public class TestPhraseQuery extends Luc
   /** threshold for comparing floats */
   public static final float SCORE_COMP_THRESH = 1e-6f;
   
-  private IndexSearcher searcher;
-  private IndexReader reader;
+  private static IndexSearcher searcher;
+  private static IndexReader reader;
   private PhraseQuery query;
-  private Directory directory;
+  private static Directory directory;
 
-  @Override
-  public void setUp() throws Exception {
-    super.setUp();
+  @BeforeClass
+  public static void beforeClass() throws Exception {
     directory = newDirectory();
     Analyzer analyzer = new Analyzer() {
       @Override
@@ -87,15 +88,22 @@ public class TestPhraseQuery extends Luc
     writer.close();
 
     searcher = newSearcher(reader);
+  }
+  
+  @Override
+  public void setUp() throws Exception {
+    super.setUp();
     query = new PhraseQuery();
   }
 
-  @Override
-  public void tearDown() throws Exception {
+  @AfterClass
+  public static void afterClass() throws Exception {
     searcher.close();
+    searcher = null;
     reader.close();
+    reader = null;
     directory.close();
-    super.tearDown();
+    directory = null;
   }
 
   public void testNotCloseEnough() throws Exception {
@@ -606,10 +614,10 @@ public class TestPhraseQuery extends Luc
 
     Random r = random;
 
-    int NUM_DOCS = 10 * RANDOM_MULTIPLIER;
+    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(r, 10000, 30000);
+      int termCount = atLeast(5000);
 
       List<String> doc = new ArrayList<String>();
 
@@ -656,7 +664,7 @@ public class TestPhraseQuery extends Luc
     w.close();
 
     // now search
-    int num = 100 * RANDOM_MULTIPLIER;
+    int num = atLeast(10);
     for(int i=0;i<num;i++) {
       int docID = r.nextInt(docs.size());
       List<String> doc = docs.get(docID);

Modified: lucene/dev/branches/flexscoring/lucene/src/test/org/apache/lucene/search/TestPositionIncrement.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/flexscoring/lucene/src/test/org/apache/lucene/search/TestPositionIncrement.java?rev=1134358&r1=1134357&r2=1134358&view=diff
==============================================================================
--- lucene/dev/branches/flexscoring/lucene/src/test/org/apache/lucene/search/TestPositionIncrement.java (original)
+++ lucene/dev/branches/flexscoring/lucene/src/test/org/apache/lucene/search/TestPositionIncrement.java Fri Jun 10 15:58:18 2011
@@ -54,7 +54,6 @@ import org.apache.lucene.util.BytesRef;
  * Term position unit test.
  *
  *
- * @version $Revision$
  */
 public class TestPositionIncrement extends LuceneTestCase {
 

Modified: lucene/dev/branches/flexscoring/lucene/src/test/org/apache/lucene/search/TestPrefixInBooleanQuery.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/flexscoring/lucene/src/test/org/apache/lucene/search/TestPrefixInBooleanQuery.java?rev=1134358&r1=1134357&r2=1134358&view=diff
==============================================================================
--- lucene/dev/branches/flexscoring/lucene/src/test/org/apache/lucene/search/TestPrefixInBooleanQuery.java (original)
+++ lucene/dev/branches/flexscoring/lucene/src/test/org/apache/lucene/search/TestPrefixInBooleanQuery.java Fri Jun 10 15:58:18 2011
@@ -24,6 +24,8 @@ import org.apache.lucene.index.IndexRead
 import org.apache.lucene.index.RandomIndexWriter;
 import org.apache.lucene.index.Term;
 import org.apache.lucene.store.Directory;
+import org.junit.AfterClass;
+import org.junit.BeforeClass;
 
 /**
  * https://issues.apache.org/jira/browse/LUCENE-1974
@@ -38,53 +40,48 @@ import org.apache.lucene.store.Directory
 public class TestPrefixInBooleanQuery extends LuceneTestCase {
 
   private static final String FIELD = "name";
-  private Directory directory;
-  private IndexReader reader;
-  private IndexSearcher searcher;
-
-  @Override
-  public void setUp() throws Exception {
-    super.setUp();
+  private static Directory directory;
+  private static IndexReader reader;
+  private static IndexSearcher searcher;
+
+  @BeforeClass
+  public static void beforeClass() throws Exception {
     directory = newDirectory();
     RandomIndexWriter writer = new RandomIndexWriter(random, directory);
 
+    Document doc = new Document();
+    Field field = newField(FIELD, "meaninglessnames", Field.Store.NO,
+        Field.Index.NOT_ANALYZED_NO_NORMS);
+    doc.add(field);
+    
     for (int i = 0; i < 5137; ++i) {
-      Document doc = new Document();
-      doc.add(newField(FIELD, "meaninglessnames", Field.Store.YES,
-                        Field.Index.NOT_ANALYZED));
-      writer.addDocument(doc);
-    }
-    { 
-      Document doc = new Document();
-      doc.add(newField(FIELD, "tangfulin", Field.Store.YES,
-                        Field.Index.NOT_ANALYZED));
       writer.addDocument(doc);
     }
+    
+    field.setValue("tangfulin");
+    writer.addDocument(doc);
 
+    field.setValue("meaninglessnames");
     for (int i = 5138; i < 11377; ++i) {
-      Document doc = new Document();
-      doc.add(newField(FIELD, "meaninglessnames", Field.Store.YES,
-                        Field.Index.NOT_ANALYZED));
-      writer.addDocument(doc);
-    }
-    {
-      Document doc = new Document();
-      doc.add(newField(FIELD, "tangfulin", Field.Store.YES,
-                        Field.Index.NOT_ANALYZED));
       writer.addDocument(doc);
     }
     
+    field.setValue("tangfulin");
+    writer.addDocument(doc);
+    
     reader = writer.getReader();
     searcher = newSearcher(reader);
     writer.close();
   }
   
-  @Override
-  public void tearDown() throws Exception {
+  @AfterClass
+  public static void afterClass() throws Exception {
     searcher.close();
+    searcher = null;
     reader.close();
+    reader = null;
     directory.close();
-    super.tearDown();
+    directory = null;
   }
   
   public void testPrefixQuery() throws Exception {

Modified: lucene/dev/branches/flexscoring/lucene/src/test/org/apache/lucene/search/TestPrefixRandom.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/flexscoring/lucene/src/test/org/apache/lucene/search/TestPrefixRandom.java?rev=1134358&r1=1134357&r2=1134358&view=diff
==============================================================================
--- lucene/dev/branches/flexscoring/lucene/src/test/org/apache/lucene/search/TestPrefixRandom.java (original)
+++ lucene/dev/branches/flexscoring/lucene/src/test/org/apache/lucene/search/TestPrefixRandom.java Fri Jun 10 15:58:18 2011
@@ -59,7 +59,7 @@ public class TestPrefixRandom extends Lu
     // we generate aweful prefixes: good for testing.
     // but for preflex codec, the test can be very slow, so use less iterations.
     final String codec = CodecProvider.getDefault().getFieldCodec("field");
-    int num = codec.equals("PreFlex") ? 200 * RANDOM_MULTIPLIER : 2000 * RANDOM_MULTIPLIER;
+    int num = codec.equals("PreFlex") ? 200 * RANDOM_MULTIPLIER : atLeast(2000);
     for (int i = 0; i < num; i++) {
       field.setValue(_TestUtil.randomUnicodeString(random, 10));
       writer.addDocument(doc);
@@ -114,7 +114,7 @@ public class TestPrefixRandom extends Lu
   
   /** test a bunch of random prefixes */
   public void testPrefixes() throws Exception {
-      int num = 1000 * RANDOM_MULTIPLIER;
+      int num = atLeast(1000);
       for (int i = 0; i < num; i++)
         assertSame(_TestUtil.randomUnicodeString(random, 5));
   }

Modified: lucene/dev/branches/flexscoring/lucene/src/test/org/apache/lucene/search/TestRegexpRandom.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/flexscoring/lucene/src/test/org/apache/lucene/search/TestRegexpRandom.java?rev=1134358&r1=1134357&r2=1134358&view=diff
==============================================================================
--- lucene/dev/branches/flexscoring/lucene/src/test/org/apache/lucene/search/TestRegexpRandom.java (original)
+++ lucene/dev/branches/flexscoring/lucene/src/test/org/apache/lucene/search/TestRegexpRandom.java Fri Jun 10 15:58:18 2011
@@ -33,7 +33,7 @@ import org.apache.lucene.util.LuceneTest
 import org.apache.lucene.util._TestUtil;
 
 /**
- * Create an index with terms from 0000-9999.
+ * Create an index with terms from 000-999.
  * Generates random regexps according to simple patterns,
  * and validates the correct number of hits are returned.
  */
@@ -51,11 +51,11 @@ public class TestRegexpRandom extends Lu
         .setMaxBufferedDocs(_TestUtil.nextInt(random, 50, 1000)));
     
     Document doc = new Document();
-    Field field = newField("field", "", Field.Store.NO, Field.Index.ANALYZED);
+    Field field = newField("field", "", Field.Store.NO, Field.Index.ANALYZED_NO_NORMS);
     doc.add(field);
     
-    NumberFormat df = new DecimalFormat("0000", new DecimalFormatSymbols(Locale.ENGLISH));
-    for (int i = 0; i < 10000; i++) {
+    NumberFormat df = new DecimalFormat("000", new DecimalFormatSymbols(Locale.ENGLISH));
+    for (int i = 0; i < 1000; i++) {
       field.setValue(df.format(i));
       writer.addDocument(doc);
     }
@@ -98,56 +98,42 @@ public class TestRegexpRandom extends Lu
   }
   
   public void testRegexps() throws Exception {
-    int num = 100 * RANDOM_MULTIPLIER;
+    int num = atLeast(1);
     for (int i = 0; i < num; i++) {
-      assertPatternHits("NNNN", 1);
-      assertPatternHits(".NNN", 10);
-      assertPatternHits("N.NN", 10);
-      assertPatternHits("NN.N", 10);
-      assertPatternHits("NNN.", 10);
+      assertPatternHits("NNN", 1);
+      assertPatternHits(".NN", 10);
+      assertPatternHits("N.N", 10);
+      assertPatternHits("NN.", 10);
     }
     
-    num = 10 * RANDOM_MULTIPLIER;
     for (int i = 0; i < num; i++) {
-      assertPatternHits(".{1,2}NN", 100);
-      assertPatternHits("N.{1,2}N", 100);
-      assertPatternHits("NN.{1,2}", 100);
-      assertPatternHits(".{1,3}N", 1000);
-      assertPatternHits("N.{1,3}", 1000);
-      assertPatternHits(".{1,4}", 10000);
-      
-      assertPatternHits("NNN[3-7]", 5);
-      assertPatternHits("NN[2-6][3-7]", 25);
-      assertPatternHits("N[1-5][2-6][3-7]", 125);
-      assertPatternHits("[0-4][3-7][4-8][5-9]", 625);
-      assertPatternHits("[3-7][2-6][0-4]N", 125);
-      assertPatternHits("[2-6][3-7]NN", 25);
-      assertPatternHits("[3-7]NNN", 5);
-      
-      assertPatternHits("NNN.*", 10);
-      assertPatternHits("NN.*", 100);
-      assertPatternHits("N.*", 1000);
-      assertPatternHits(".*", 10000);
-      
-      assertPatternHits(".*NNN", 10);
-      assertPatternHits(".*NN", 100);
-      assertPatternHits(".*N", 1000);
+      assertPatternHits(".{1,2}N", 100);
+      assertPatternHits("N.{1,2}", 100);
+      assertPatternHits(".{1,3}", 1000);
+      
+      assertPatternHits("NN[3-7]", 5);
+      assertPatternHits("N[2-6][3-7]", 25);
+      assertPatternHits("[1-5][2-6][3-7]", 125);
+      assertPatternHits("[0-4][3-7][4-8]", 125);
+      assertPatternHits("[2-6][0-4]N", 25);
+      assertPatternHits("[2-6]NN", 5);
+      
+      assertPatternHits("NN.*", 10);
+      assertPatternHits("N.*", 100);
+      assertPatternHits(".*", 1000);
       
-      assertPatternHits("N.*NN", 10);
-      assertPatternHits("NN.*N", 10);
+      assertPatternHits(".*NN", 10);
+      assertPatternHits(".*N", 100);
+      
+      assertPatternHits("N.*N", 10);
       
       // combo of ? and * operators
-      assertPatternHits(".NN.*", 100);
-      assertPatternHits("N.N.*", 100);
-      assertPatternHits("NN..*", 100);
-      assertPatternHits(".N..*", 1000);
-      assertPatternHits("N...*", 1000);
-      
-      assertPatternHits(".*NN.", 100);
-      assertPatternHits(".*N..", 1000);
-      assertPatternHits(".*...", 10000);
-      assertPatternHits(".*.N.", 1000);
-      assertPatternHits(".*..N", 1000);
+      assertPatternHits(".N.*", 100);
+      assertPatternHits("N..*", 100);
+      
+      assertPatternHits(".*N.", 100);
+      assertPatternHits(".*..", 1000);
+      assertPatternHits(".*.N", 100);
     }
   }
 }

Modified: lucene/dev/branches/flexscoring/lucene/src/test/org/apache/lucene/search/TestRegexpRandom2.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/flexscoring/lucene/src/test/org/apache/lucene/search/TestRegexpRandom2.java?rev=1134358&r1=1134357&r2=1134358&view=diff
==============================================================================
--- lucene/dev/branches/flexscoring/lucene/src/test/org/apache/lucene/search/TestRegexpRandom2.java (original)
+++ lucene/dev/branches/flexscoring/lucene/src/test/org/apache/lucene/search/TestRegexpRandom2.java Fri Jun 10 15:58:18 2011
@@ -35,6 +35,7 @@ import org.apache.lucene.index.RandomInd
 import org.apache.lucene.index.codecs.CodecProvider;
 import org.apache.lucene.store.Directory;
 import org.apache.lucene.util.BytesRef;
+import org.apache.lucene.util.CharsRef;
 import org.apache.lucene.util.LuceneTestCase;
 import org.apache.lucene.util.UnicodeUtil;
 import org.apache.lucene.util._TestUtil;
@@ -65,7 +66,7 @@ public class TestRegexpRandom2 extends L
     Field field = newField("field", "", Field.Store.NO, Field.Index.NOT_ANALYZED);
     doc.add(field);
     List<String> terms = new ArrayList<String>();
-    int num = 2000 * RANDOM_MULTIPLIER;
+    int num = atLeast(200);
     for (int i = 0; i < num; i++) {
       String s = _TestUtil.randomUnicodeString(random);
       field.setValue(s);
@@ -114,7 +115,7 @@ public class TestRegexpRandom2 extends L
 
     private class SimpleAutomatonTermsEnum extends FilteredTermsEnum {
       CharacterRunAutomaton runAutomaton = new CharacterRunAutomaton(automaton);
-      UnicodeUtil.UTF16Result utf16 = new UnicodeUtil.UTF16Result();
+      CharsRef utf16 = new CharsRef(10);
 
       private SimpleAutomatonTermsEnum(TermsEnum tenum) throws IOException {
         super(tenum);
@@ -124,7 +125,7 @@ public class TestRegexpRandom2 extends L
       @Override
       protected AcceptStatus accept(BytesRef term) throws IOException {
         UnicodeUtil.UTF8toUTF16(term.bytes, term.offset, term.length, utf16);
-        return runAutomaton.run(utf16.result, 0, utf16.length) ? 
+        return runAutomaton.run(utf16.chars, 0, utf16.length) ? 
             AcceptStatus.YES : AcceptStatus.NO;
       }
     }
@@ -139,7 +140,7 @@ public class TestRegexpRandom2 extends L
   public void testRegexps() throws Exception {
     // we generate aweful regexps: good for testing.
     // but for preflex codec, the test can be very slow, so use less iterations.
-    int num = CodecProvider.getDefault().getFieldCodec("field").equals("PreFlex") ? 100 * RANDOM_MULTIPLIER : 1000 * RANDOM_MULTIPLIER;
+    int num = CodecProvider.getDefault().getFieldCodec("field").equals("PreFlex") ? 100 * RANDOM_MULTIPLIER : atLeast(1000);
     for (int i = 0; i < num; i++) {
       String reg = AutomatonTestUtil.randomRegexp(random);
       assertSame(reg);

Modified: lucene/dev/branches/flexscoring/lucene/src/test/org/apache/lucene/search/TestScorerPerf.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/flexscoring/lucene/src/test/org/apache/lucene/search/TestScorerPerf.java?rev=1134358&r1=1134357&r2=1134358&view=diff
==============================================================================
--- lucene/dev/branches/flexscoring/lucene/src/test/org/apache/lucene/search/TestScorerPerf.java (original)
+++ lucene/dev/branches/flexscoring/lucene/src/test/org/apache/lucene/search/TestScorerPerf.java Fri Jun 10 15:58:18 2011
@@ -314,9 +314,9 @@ public class TestScorerPerf extends Luce
     // test many small sets... the bugs will be found on boundary conditions
     createDummySearcher();
     validate=true;
-    sets=randBitSets(1000 * RANDOM_MULTIPLIER, 10 * RANDOM_MULTIPLIER);
-    doConjunctions(10000 * RANDOM_MULTIPLIER, 5 * RANDOM_MULTIPLIER);
-    doNestedConjunctions(10000 * RANDOM_MULTIPLIER, 3 * RANDOM_MULTIPLIER, 3 * RANDOM_MULTIPLIER);
+    sets=randBitSets(atLeast(1000), atLeast(10));
+    doConjunctions(atLeast(10000), atLeast(5));
+    doNestedConjunctions(atLeast(10000), atLeast(3), atLeast(3));
     s.close();
     d.close();
   }

Modified: lucene/dev/branches/flexscoring/lucene/src/test/org/apache/lucene/search/TestSearchWithThreads.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/flexscoring/lucene/src/test/org/apache/lucene/search/TestSearchWithThreads.java?rev=1134358&r1=1134357&r2=1134358&view=diff
==============================================================================
--- lucene/dev/branches/flexscoring/lucene/src/test/org/apache/lucene/search/TestSearchWithThreads.java (original)
+++ lucene/dev/branches/flexscoring/lucene/src/test/org/apache/lucene/search/TestSearchWithThreads.java Fri Jun 10 15:58:18 2011
@@ -31,9 +31,9 @@ import org.apache.lucene.util.LuceneTest
 
 public class TestSearchWithThreads extends LuceneTestCase {
   
-  final int NUM_DOCS = 10000;
+  final int NUM_DOCS = atLeast(10000);
   final int NUM_SEARCH_THREADS = 5;
-  final int RUN_TIME_MSEC = 1000 * RANDOM_MULTIPLIER;
+  final int RUN_TIME_MSEC = atLeast(1000);
 
   public void test() throws Exception {
     final Directory dir = newDirectory();
@@ -47,7 +47,7 @@ public class TestSearchWithThreads exten
     final Field body = newField("body", "", Field.Index.ANALYZED);
     doc.add(body);
     final StringBuilder sb = new StringBuilder();
-    for(int docCount=0;docCount<NUM_DOCS*RANDOM_MULTIPLIER;docCount++) {
+    for(int docCount=0;docCount<NUM_DOCS;docCount++) {
       final int numTerms = random.nextInt(10);
       for(int termCount=0;termCount<numTerms;termCount++) {
         sb.append(random.nextBoolean() ? "aaa" : "bbb");

Modified: lucene/dev/branches/flexscoring/lucene/src/test/org/apache/lucene/search/TestSetNorm.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/flexscoring/lucene/src/test/org/apache/lucene/search/TestSetNorm.java?rev=1134358&r1=1134357&r2=1134358&view=diff
==============================================================================
--- lucene/dev/branches/flexscoring/lucene/src/test/org/apache/lucene/search/TestSetNorm.java (original)
+++ lucene/dev/branches/flexscoring/lucene/src/test/org/apache/lucene/search/TestSetNorm.java Fri Jun 10 15:58:18 2011
@@ -31,7 +31,6 @@ import org.apache.lucene.store.Directory
 /** Document boost unit test.
  *
  *
- * @version $Revision$
  */
 public class TestSetNorm extends LuceneTestCase {
 

Modified: lucene/dev/branches/flexscoring/lucene/src/test/org/apache/lucene/search/TestSimilarity.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/flexscoring/lucene/src/test/org/apache/lucene/search/TestSimilarity.java?rev=1134358&r1=1134357&r2=1134358&view=diff
==============================================================================
--- lucene/dev/branches/flexscoring/lucene/src/test/org/apache/lucene/search/TestSimilarity.java (original)
+++ lucene/dev/branches/flexscoring/lucene/src/test/org/apache/lucene/search/TestSimilarity.java Fri Jun 10 15:58:18 2011
@@ -36,7 +36,6 @@ import org.apache.lucene.search.Explanat
 /** Similarity unit test.
  *
  *
- * @version $Revision$
  */
 public class TestSimilarity extends LuceneTestCase {
   

Modified: lucene/dev/branches/flexscoring/lucene/src/test/org/apache/lucene/search/TestSort.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/flexscoring/lucene/src/test/org/apache/lucene/search/TestSort.java?rev=1134358&r1=1134357&r2=1134358&view=diff
==============================================================================
--- lucene/dev/branches/flexscoring/lucene/src/test/org/apache/lucene/search/TestSort.java (original)
+++ lucene/dev/branches/flexscoring/lucene/src/test/org/apache/lucene/search/TestSort.java Fri Jun 10 15:58:18 2011
@@ -25,6 +25,7 @@ import java.util.concurrent.Executors;
 import java.util.concurrent.TimeUnit;
 
 import org.apache.lucene.analysis.MockAnalyzer;
+import org.apache.lucene.document.IndexDocValuesField;
 import org.apache.lucene.document.Document;
 import org.apache.lucene.document.Field;
 import org.apache.lucene.index.CorruptIndexException;
@@ -35,6 +36,8 @@ import org.apache.lucene.index.IndexWrit
 import org.apache.lucene.index.MultiReader;
 import org.apache.lucene.index.RandomIndexWriter;
 import org.apache.lucene.index.Term;
+import org.apache.lucene.index.codecs.CodecProvider;
+import org.apache.lucene.index.values.ValueType;
 import org.apache.lucene.queryParser.ParseException;
 import org.apache.lucene.search.BooleanClause.Occur;
 import org.apache.lucene.search.FieldValueHitQueue.Entry;
@@ -61,8 +64,9 @@ import org.apache.lucene.util._TestUtil;
  */
 
 public class TestSort extends LuceneTestCase {
-
-  private static final int NUM_STRINGS = 6000 * RANDOM_MULTIPLIER;
+  // true if our codec supports docvalues: true unless codec is preflex (3.x)
+  boolean supportsDocValues = CodecProvider.getDefault().getDefaultFieldCodec().equals("PreFlex") == false;
+  private static final int NUM_STRINGS = atLeast(6000);
   private IndexSearcher full;
   private IndexSearcher searchX;
   private IndexSearcher searchY;
@@ -118,13 +122,28 @@ public class TestSort extends LuceneTest
         Document doc = new Document();
         doc.add (new Field ("tracer",   data[i][0], Field.Store.YES, Field.Index.NO));
         doc.add (new Field ("contents", data[i][1], Field.Store.NO, Field.Index.ANALYZED));
-        if (data[i][2] != null) doc.add (new Field ("int",      data[i][2], Field.Store.NO, Field.Index.NOT_ANALYZED));
-        if (data[i][3] != null) doc.add (new Field ("float",    data[i][3], Field.Store.NO, Field.Index.NOT_ANALYZED));
+        if (data[i][2] != null) {
+          Field f = supportsDocValues ? 
+              IndexDocValuesField.set(new Field ("int",      data[i][2], Field.Store.NO, Field.Index.NOT_ANALYZED), ValueType.INTS)
+                               : new Field ("int",      data[i][2], Field.Store.NO, Field.Index.NOT_ANALYZED);
+          doc.add(f);
+        }
+        if (data[i][3] != null) {
+          Field f = supportsDocValues ?
+              IndexDocValuesField.set(new Field ("float",    data[i][3], Field.Store.NO, Field.Index.NOT_ANALYZED), ValueType.FLOAT_32)
+                              :  new Field ("float",    data[i][3], Field.Store.NO, Field.Index.NOT_ANALYZED);
+          doc.add(f);
+        }
         if (data[i][4] != null) doc.add (new Field ("string",   data[i][4], Field.Store.NO, Field.Index.NOT_ANALYZED));
         if (data[i][5] != null) doc.add (new Field ("custom",   data[i][5], Field.Store.NO, Field.Index.NOT_ANALYZED));
         if (data[i][6] != null) doc.add (new Field ("i18n",     data[i][6], Field.Store.NO, Field.Index.NOT_ANALYZED));
         if (data[i][7] != null) doc.add (new Field ("long",     data[i][7], Field.Store.NO, Field.Index.NOT_ANALYZED));
-        if (data[i][8] != null) doc.add (new Field ("double",     data[i][8], Field.Store.NO, Field.Index.NOT_ANALYZED));
+        if (data[i][8] != null) {
+          Field f = supportsDocValues ?
+              IndexDocValuesField.set(new Field ("double",     data[i][8], Field.Store.NO, Field.Index.NOT_ANALYZED), ValueType.FLOAT_64)
+                              :  new Field ("double",     data[i][8], Field.Store.NO, Field.Index.NOT_ANALYZED);
+          doc.add(f);
+        }
         if (data[i][9] != null) doc.add (new Field ("short",     data[i][9], Field.Store.NO, Field.Index.NOT_ANALYZED));
         if (data[i][10] != null) doc.add (new Field ("byte",     data[i][10], Field.Store.NO, Field.Index.NOT_ANALYZED));
         if (data[i][11] != null) doc.add (new Field ("parser",     data[i][11], Field.Store.NO, Field.Index.NOT_ANALYZED));
@@ -217,6 +236,7 @@ public class TestSort extends LuceneTest
   @Override
   public void setUp() throws Exception {
     super.setUp();
+    
     full = getFullIndex();
     searchX = getXIndex();
     searchY = getYIndex();
@@ -228,6 +248,7 @@ public class TestSort extends LuceneTest
     queryG = new TermQuery (new Term ("contents", "g"));
     queryM = new TermQuery (new Term ("contents", "m"));
     sort = new Sort();
+    
   }
   
   private ArrayList<Directory> dirs = new ArrayList<Directory>();
@@ -256,12 +277,16 @@ public class TestSort extends LuceneTest
     assertMatches (full, queryY, sort, "BDFHJ");
   }
 
+  private static SortField useDocValues(SortField field) {
+    field.setUseIndexValues(true);
+    return field;
+  }
   // test sorts where the type of field is specified
   public void testTypedSort() throws Exception {
     sort.setSort (new SortField ("int", SortField.INT), SortField.FIELD_DOC );
     assertMatches (full, queryX, sort, "IGAEC");
     assertMatches (full, queryY, sort, "DHFJB");
-
+    
     sort.setSort (new SortField ("float", SortField.FLOAT), SortField.FIELD_DOC );
     assertMatches (full, queryX, sort, "GCIEA");
     assertMatches (full, queryY, sort, "DHJFB");
@@ -273,7 +298,7 @@ public class TestSort extends LuceneTest
     sort.setSort (new SortField ("double", SortField.DOUBLE), SortField.FIELD_DOC );
     assertMatches (full, queryX, sort, "AGICE");
     assertMatches (full, queryY, sort, "DJHBF");
-
+    
     sort.setSort (new SortField ("byte", SortField.BYTE), SortField.FIELD_DOC );
     assertMatches (full, queryX, sort, "CIGAE");
     assertMatches (full, queryY, sort, "DHFBJ");
@@ -285,6 +310,20 @@ public class TestSort extends LuceneTest
     sort.setSort (new SortField ("string", SortField.STRING), SortField.FIELD_DOC );
     assertMatches (full, queryX, sort, "AIGEC");
     assertMatches (full, queryY, sort, "DJHFB");
+    
+    if (supportsDocValues) {
+      sort.setSort (useDocValues(new SortField ("int", SortField.INT)), SortField.FIELD_DOC );
+      assertMatches (full, queryX, sort, "IGAEC");
+      assertMatches (full, queryY, sort, "DHFJB");
+      
+      sort.setSort (useDocValues(new SortField ("float", SortField.FLOAT)), SortField.FIELD_DOC );
+      assertMatches (full, queryX, sort, "GCIEA");
+      assertMatches (full, queryY, sort, "DHJFB");
+      
+      sort.setSort (useDocValues(new SortField ("double", SortField.DOUBLE)), SortField.FIELD_DOC );
+      assertMatches (full, queryX, sort, "AGICE");
+      assertMatches (full, queryY, sort, "DJHBF");
+    }
   }
   
   private static class SortMissingLastTestHelper {
@@ -458,12 +497,18 @@ public class TestSort extends LuceneTest
 
     sort.setSort (new SortField ("int", SortField.INT), SortField.FIELD_DOC );
     assertMatches (empty, queryX, sort, "");
+    
+    sort.setSort (useDocValues(new SortField ("int", SortField.INT)), SortField.FIELD_DOC );
+    assertMatches (empty, queryX, sort, "");
 
     sort.setSort (new SortField ("string", SortField.STRING, true), SortField.FIELD_DOC );
     assertMatches (empty, queryX, sort, "");
 
     sort.setSort (new SortField ("float", SortField.FLOAT), new SortField ("string", SortField.STRING) );
     assertMatches (empty, queryX, sort, "");
+    
+    sort.setSort (useDocValues(new SortField ("float", SortField.FLOAT)), new SortField ("string", SortField.STRING) );
+    assertMatches (empty, queryX, sort, "");
   }
 
   static class MyFieldComparator extends FieldComparator {
@@ -543,10 +588,20 @@ public class TestSort extends LuceneTest
     sort.setSort (new SortField ("float", SortField.FLOAT, true) );
     assertMatches (full, queryX, sort, "AECIG");
     assertMatches (full, queryY, sort, "BFJHD");
-
+    
     sort.setSort (new SortField ("string", SortField.STRING, true) );
     assertMatches (full, queryX, sort, "CEGIA");
     assertMatches (full, queryY, sort, "BFHJD");
+    
+    if (supportsDocValues) {
+      sort.setSort (useDocValues(new SortField ("int", SortField.INT, true)) );
+      assertMatches (full, queryX, sort, "CAEGI");
+      assertMatches (full, queryY, sort, "BJFHD");
+    
+      sort.setSort (useDocValues(new SortField ("float", SortField.FLOAT, true)) );
+      assertMatches (full, queryX, sort, "AECIG");
+      assertMatches (full, queryY, sort, "BFJHD");
+    }
   }
 
   // test sorting when the sort field is empty (undefined) for some of the documents
@@ -566,6 +621,14 @@ public class TestSort extends LuceneTest
     sort.setSort (new SortField ("float", SortField.FLOAT) );
     assertMatches (full, queryF, sort, "ZJI");
 
+    if (supportsDocValues) {
+      sort.setSort (useDocValues(new SortField ("int", SortField.INT)) );
+      assertMatches (full, queryF, sort, "IZJ");
+    
+      sort.setSort (useDocValues(new SortField ("float", SortField.FLOAT)) );
+      assertMatches (full, queryF, sort, "ZJI");
+    }
+
     // using a nonexisting field as first sort key shouldn't make a difference:
     sort.setSort (new SortField ("nosuchfield", SortField.STRING),
         new SortField ("float", SortField.FLOAT) );
@@ -887,7 +950,7 @@ public class TestSort extends LuceneTest
     sort.setSort(new SortField("int", SortField.INT));
     expected = isFull ? "IDHFGJABEC" : "IDHFGJAEBC";
     assertMatches(multi, queryA, sort, expected);
-
+    
     sort.setSort(new SortField ("float", SortField.FLOAT), SortField.FIELD_DOC);
     assertMatches(multi, queryA, sort, "GDHJCIEFAB");
 
@@ -928,6 +991,39 @@ public class TestSort extends LuceneTest
     sort.setSort(new SortField ("string", SortField.STRING, true));
     assertMatches(multi, queryF, sort, "IJZ");
 
+    if (supportsDocValues) {
+      sort.setSort(useDocValues(new SortField ("int", SortField.INT)));
+      expected = isFull ? "IDHFGJABEC" : "IDHFGJAEBC";
+      assertMatches(multi, queryA, sort, expected);
+
+      sort.setSort(useDocValues(new SortField ("int", SortField.INT)), SortField.FIELD_DOC);
+      expected = isFull ? "IDHFGJABEC" : "IDHFGJAEBC";
+      assertMatches(multi, queryA, sort, expected);
+
+      sort.setSort(useDocValues(new SortField("int", SortField.INT)));
+      expected = isFull ? "IDHFGJABEC" : "IDHFGJAEBC";
+      assertMatches(multi, queryA, sort, expected);
+    
+      sort.setSort(useDocValues(new SortField ("float", SortField.FLOAT)), SortField.FIELD_DOC);
+      assertMatches(multi, queryA, sort, "GDHJCIEFAB");
+
+      sort.setSort(useDocValues(new SortField("float", SortField.FLOAT)));
+      assertMatches(multi, queryA, sort, "GDHJCIEFAB");
+    
+      sort.setSort(useDocValues(new SortField("int", SortField.INT, true)));
+      expected = isFull ? "CABEJGFHDI" : "CAEBJGFHDI";
+      assertMatches(multi, queryA, sort, expected);
+    
+      sort.setSort(useDocValues(new SortField("int", SortField.INT)), useDocValues(new SortField("float", SortField.FLOAT)));
+      assertMatches(multi, queryA, sort, "IDHFGJEABC");
+    
+      sort.setSort(useDocValues(new SortField ("int", SortField.INT)));
+      assertMatches(multi, queryF, sort, "IZJ");
+
+      sort.setSort(useDocValues(new SortField ("int", SortField.INT, true)));
+      assertMatches(multi, queryF, sort, "JZI");
+    }
+    
     // up to this point, all of the searches should have "sane" 
     // FieldCache behavior, and should have reused hte cache in several cases
     assertSaneFieldCaches(getName() + " various");

Modified: lucene/dev/branches/flexscoring/lucene/src/test/org/apache/lucene/search/TestSubScorerFreqs.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/flexscoring/lucene/src/test/org/apache/lucene/search/TestSubScorerFreqs.java?rev=1134358&r1=1134357&r2=1134358&view=diff
==============================================================================
--- lucene/dev/branches/flexscoring/lucene/src/test/org/apache/lucene/search/TestSubScorerFreqs.java (original)
+++ lucene/dev/branches/flexscoring/lucene/src/test/org/apache/lucene/search/TestSubScorerFreqs.java Fri Jun 10 15:58:18 2011
@@ -43,7 +43,8 @@ public class TestSubScorerFreqs extends 
     RandomIndexWriter w = new RandomIndexWriter(
                                                 random, dir, newIndexWriterConfig(TEST_VERSION_CURRENT, new MockAnalyzer(random)).setMergePolicy(newLogMergePolicy()));
     // make sure we have more than one segment occationally
-    for (int i = 0; i < 31 * RANDOM_MULTIPLIER; i++) {
+    int num = atLeast(31);
+    for (int i = 0; i < num; i++) {
       Document doc = new Document();
       doc.add(newField("f", "a b c d b c d c d d", Field.Store.NO,
           Field.Index.ANALYZED));

Modified: lucene/dev/branches/flexscoring/lucene/src/test/org/apache/lucene/search/TestThreadSafe.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/flexscoring/lucene/src/test/org/apache/lucene/search/TestThreadSafe.java?rev=1134358&r1=1134357&r2=1134358&view=diff
==============================================================================
--- lucene/dev/branches/flexscoring/lucene/src/test/org/apache/lucene/search/TestThreadSafe.java (original)
+++ lucene/dev/branches/flexscoring/lucene/src/test/org/apache/lucene/search/TestThreadSafe.java Fri Jun 10 15:58:18 2011
@@ -142,7 +142,7 @@ public class TestThreadSafe extends Luce
     buildDir(dir1, 15, 5, 2000);
 
     // do many small tests so the thread locals go away inbetween
-    int num = 10 * RANDOM_MULTIPLIER;
+    int num = atLeast(10);
     for (int i = 0; i < num; i++) {
       ir1 = IndexReader.open(dir1, false);
       doTest(10,10);

Modified: lucene/dev/branches/flexscoring/lucene/src/test/org/apache/lucene/search/TestWildcardRandom.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/flexscoring/lucene/src/test/org/apache/lucene/search/TestWildcardRandom.java?rev=1134358&r1=1134357&r2=1134358&view=diff
==============================================================================
--- lucene/dev/branches/flexscoring/lucene/src/test/org/apache/lucene/search/TestWildcardRandom.java (original)
+++ lucene/dev/branches/flexscoring/lucene/src/test/org/apache/lucene/search/TestWildcardRandom.java Fri Jun 10 15:58:18 2011
@@ -33,7 +33,7 @@ import org.apache.lucene.util.LuceneTest
 import org.apache.lucene.util._TestUtil;
 
 /**
- * Create an index with terms from 0000-9999.
+ * Create an index with terms from 000-999.
  * Generates random wildcards according to patterns,
  * and validates the correct number of hits are returned.
  */
@@ -51,11 +51,11 @@ public class TestWildcardRandom extends 
         .setMaxBufferedDocs(_TestUtil.nextInt(random, 50, 1000)));
     
     Document doc = new Document();
-    Field field = newField("field", "", Field.Store.NO, Field.Index.ANALYZED);
+    Field field = newField("field", "", Field.Store.NO, Field.Index.ANALYZED_NO_NORMS);
     doc.add(field);
     
-    NumberFormat df = new DecimalFormat("0000", new DecimalFormatSymbols(Locale.ENGLISH));
-    for (int i = 0; i < 10000; i++) {
+    NumberFormat df = new DecimalFormat("000", new DecimalFormatSymbols(Locale.ENGLISH));
+    for (int i = 0; i < 1000; i++) {
       field.setValue(df.format(i));
       writer.addDocument(doc);
     }
@@ -99,48 +99,35 @@ public class TestWildcardRandom extends 
   }
   
   public void testWildcards() throws Exception {;
-    int num = 100 * RANDOM_MULTIPLIER;
+    int num = atLeast(1);
     for (int i = 0; i < num; i++) {
-      assertPatternHits("NNNN", 1);
-      assertPatternHits("?NNN", 10);
-      assertPatternHits("N?NN", 10);
-      assertPatternHits("NN?N", 10);
-      assertPatternHits("NNN?", 10);
+      assertPatternHits("NNN", 1);
+      assertPatternHits("?NN", 10);
+      assertPatternHits("N?N", 10);
+      assertPatternHits("NN?", 10);
     }
     
-    num = 10 * RANDOM_MULTIPLIER;
     for (int i = 0; i < num; i++) {
-      assertPatternHits("??NN", 100);
-      assertPatternHits("N??N", 100);
-      assertPatternHits("NN??", 100);
-      assertPatternHits("???N", 1000);
-      assertPatternHits("N???", 1000);
-      assertPatternHits("????", 10000);
+      assertPatternHits("??N", 100);
+      assertPatternHits("N??", 100);
+      assertPatternHits("???", 1000);
       
-      assertPatternHits("NNN*", 10);
-      assertPatternHits("NN*", 100);
-      assertPatternHits("N*", 1000);
-      assertPatternHits("*", 10000);
+      assertPatternHits("NN*", 10);
+      assertPatternHits("N*", 100);
+      assertPatternHits("*", 1000);
       
-      assertPatternHits("*NNN", 10);
-      assertPatternHits("*NN", 100);
-      assertPatternHits("*N", 1000);
+      assertPatternHits("*NN", 10);
+      assertPatternHits("*N", 100);
       
-      assertPatternHits("N*NN", 10);
-      assertPatternHits("NN*N", 10);
+      assertPatternHits("N*N", 10);
       
       // combo of ? and * operators
-      assertPatternHits("?NN*", 100);
-      assertPatternHits("N?N*", 100);
-      assertPatternHits("NN?*", 100);
-      assertPatternHits("?N?*", 1000);
-      assertPatternHits("N??*", 1000);
+      assertPatternHits("?N*", 100);
+      assertPatternHits("N?*", 100);
       
-      assertPatternHits("*NN?", 100);
-      assertPatternHits("*N??", 1000);
-      assertPatternHits("*???", 10000);
-      assertPatternHits("*?N?", 1000);
-      assertPatternHits("*??N", 1000);
+      assertPatternHits("*N?", 100);
+      assertPatternHits("*??", 1000);
+      assertPatternHits("*?N", 100);
     }
   }
 }

Modified: lucene/dev/branches/flexscoring/lucene/src/test/org/apache/lucene/search/cache/TestEntryCreators.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/flexscoring/lucene/src/test/org/apache/lucene/search/cache/TestEntryCreators.java?rev=1134358&r1=1134357&r2=1134358&view=diff
==============================================================================
--- lucene/dev/branches/flexscoring/lucene/src/test/org/apache/lucene/search/cache/TestEntryCreators.java (original)
+++ lucene/dev/branches/flexscoring/lucene/src/test/org/apache/lucene/search/cache/TestEntryCreators.java Fri Jun 10 15:58:18 2011
@@ -37,7 +37,7 @@ import static org.hamcrest.CoreMatchers.
 
 public class TestEntryCreators extends LuceneTestCase {
   protected IndexReader reader;
-  private static final int NUM_DOCS = 500 * RANDOM_MULTIPLIER;
+  private static final int NUM_DOCS = atLeast(500);
   private Directory directory;
 
   static class NumberTypeTester {

Modified: lucene/dev/branches/flexscoring/lucene/src/test/org/apache/lucene/search/function/FunctionTestSetup.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/flexscoring/lucene/src/test/org/apache/lucene/search/function/FunctionTestSetup.java?rev=1134358&r1=1134357&r2=1134358&view=diff
==============================================================================
--- lucene/dev/branches/flexscoring/lucene/src/test/org/apache/lucene/search/function/FunctionTestSetup.java (original)
+++ lucene/dev/branches/flexscoring/lucene/src/test/org/apache/lucene/search/function/FunctionTestSetup.java Fri Jun 10 15:58:18 2011
@@ -27,15 +27,14 @@ import org.apache.lucene.index.IndexWrit
 import org.apache.lucene.store.Directory;
 import org.apache.lucene.util.LuceneTestCase;
 import org.apache.lucene.util._TestUtil;
-import org.junit.After;
-import org.junit.Before;
+import org.junit.AfterClass;
 import org.junit.Ignore;
 
 /**
  * Setup for function tests
  */
 @Ignore
-public class FunctionTestSetup extends LuceneTestCase {
+public abstract class FunctionTestSetup extends LuceneTestCase {
 
   /**
    * Actual score computation order is slightly different than assumptios
@@ -67,32 +66,17 @@ public class FunctionTestSetup extends L
           "text for the test, but oh much much safer. ",
   };
   
-  protected Directory dir;
-  protected Analyzer anlzr;
+  protected static Directory dir;
+  protected static Analyzer anlzr;
   
-  private final boolean doMultiSegment;
-
-  public FunctionTestSetup(boolean doMultiSegment) {
-    this.doMultiSegment = doMultiSegment;
-  }
-
-  public FunctionTestSetup() {
-    this(false);
-  }
-
-  @Override
-  @After
-  public void tearDown() throws Exception {
+  @AfterClass
+  public static void afterClassFunctionTestSetup() throws Exception {
     dir.close();
     dir = null;
     anlzr = null;
-    super.tearDown();
   }
 
-  @Override
-  @Before
-  public void setUp() throws Exception {
-    super.setUp();
+  protected static void createIndex(boolean doMultiSegment) throws Exception {
     if (VERBOSE) {
       System.out.println("TEST: setUp");
     }
@@ -130,7 +114,7 @@ public class FunctionTestSetup extends L
     }
   }
 
-  private void addDoc(RandomIndexWriter iw, int i) throws Exception {
+  private static void addDoc(RandomIndexWriter iw, int i) throws Exception {
     Document d = new Document();
     Fieldable f;
     int scoreAndID = i + 1;
@@ -156,7 +140,7 @@ public class FunctionTestSetup extends L
   }
 
   // 17 --> ID00017
-  protected String id2String(int scoreAndID) {
+  protected static String id2String(int scoreAndID) {
     String s = "000000000" + scoreAndID;
     int n = ("" + N_DOCS).length() + 3;
     int k = s.length() - n;
@@ -164,17 +148,17 @@ public class FunctionTestSetup extends L
   }
 
   // some text line for regular search
-  private String textLine(int docNum) {
+  private static String textLine(int docNum) {
     return DOC_TEXT_LINES[docNum % DOC_TEXT_LINES.length];
   }
 
   // extract expected doc score from its ID Field: "ID7" --> 7.0
-  protected float expectedFieldScore(String docIDFieldVal) {
+  protected static float expectedFieldScore(String docIDFieldVal) {
     return Float.parseFloat(docIDFieldVal.substring(2));
   }
 
   // debug messages (change DBG to true for anything to print) 
-  protected void log(Object o) {
+  protected static void log(Object o) {
     if (VERBOSE) {
       System.out.println(o.toString());
     }

Modified: lucene/dev/branches/flexscoring/lucene/src/test/org/apache/lucene/search/function/TestCustomScoreQuery.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/flexscoring/lucene/src/test/org/apache/lucene/search/function/TestCustomScoreQuery.java?rev=1134358&r1=1134357&r2=1134358&view=diff
==============================================================================
--- lucene/dev/branches/flexscoring/lucene/src/test/org/apache/lucene/search/function/TestCustomScoreQuery.java (original)
+++ lucene/dev/branches/flexscoring/lucene/src/test/org/apache/lucene/search/function/TestCustomScoreQuery.java Fri Jun 10 15:58:18 2011
@@ -20,6 +20,7 @@ package org.apache.lucene.search.functio
 import org.apache.lucene.queryParser.QueryParser;
 import org.apache.lucene.queryParser.ParseException;
 import org.apache.lucene.search.*;
+import org.junit.BeforeClass;
 import org.junit.Test;
 import java.io.IOException;
 import java.util.HashMap;
@@ -33,9 +34,9 @@ import org.apache.lucene.index.Term;
  */
 public class TestCustomScoreQuery extends FunctionTestSetup {
 
-  /* @override constructor */
-  public TestCustomScoreQuery() {
-    super(true);
+  @BeforeClass
+  public static void beforeClass() throws Exception {
+    createIndex(true);
   }
 
   /**
@@ -193,7 +194,7 @@ public class TestCustomScoreQuery extend
     final Query q = new CustomExternalQuery(q1);
     log(q);
 
-    IndexSearcher s = new IndexSearcher(dir);
+    IndexSearcher s = new IndexSearcher(dir, true);
     TopDocs hits = s.search(q, 1000);
     assertEquals(N_DOCS, hits.totalHits);
     for(int i=0;i<N_DOCS;i++) {

Modified: lucene/dev/branches/flexscoring/lucene/src/test/org/apache/lucene/search/function/TestFieldScoreQuery.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/flexscoring/lucene/src/test/org/apache/lucene/search/function/TestFieldScoreQuery.java?rev=1134358&r1=1134357&r2=1134358&view=diff
==============================================================================
--- lucene/dev/branches/flexscoring/lucene/src/test/org/apache/lucene/search/function/TestFieldScoreQuery.java (original)
+++ lucene/dev/branches/flexscoring/lucene/src/test/org/apache/lucene/search/function/TestFieldScoreQuery.java Fri Jun 10 15:58:18 2011
@@ -26,6 +26,7 @@ import org.apache.lucene.search.QueryUti
 import org.apache.lucene.search.ScoreDoc;
 import org.apache.lucene.search.TopDocs;
 import org.apache.lucene.util.ReaderUtil;
+import org.junit.BeforeClass;
 import org.junit.Test;
 
 /**
@@ -41,9 +42,9 @@ import org.junit.Test;
  */
 public class TestFieldScoreQuery extends FunctionTestSetup {
 
-  /* @override constructor */
-  public TestFieldScoreQuery() {
-    super(true);
+  @BeforeClass
+  public static void beforeClass() throws Exception {
+    createIndex(true);
   }
 
   /** Test that FieldScoreQuery of Type.BYTE returns docs in expected order. */



Mime
View raw message