lucene-java-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hoss...@apache.org
Subject svn commit: r801066 - in /lucene/java/trunk/src/test/org/apache/lucene: analysis/ index/ search/ search/function/ search/spans/ util/ util/cache/
Date Wed, 05 Aug 2009 05:43:44 GMT
Author: hossman
Date: Wed Aug  5 05:43:43 2009
New Revision: 801066

URL: http://svn.apache.org/viewvc?rev=801066&view=rev
Log:
some standardization of tests: All tests now inherit from LuceneTestCase, and all setUp/tearDown
methods call super.setUp/tearDown.  This doesn't have any noticable effects on any test, but
it does give us a better safety net with the existing (and future) assertions in LuceneTestCase

Modified:
    lucene/java/trunk/src/test/org/apache/lucene/analysis/TestCharFilter.java
    lucene/java/trunk/src/test/org/apache/lucene/analysis/TestCharacterCache.java
    lucene/java/trunk/src/test/org/apache/lucene/analysis/TestTeeTokenFilter.java
    lucene/java/trunk/src/test/org/apache/lucene/index/TestParallelTermEnum.java
    lucene/java/trunk/src/test/org/apache/lucene/index/TestTransactionRollback.java
    lucene/java/trunk/src/test/org/apache/lucene/search/TestBooleanMinShouldMatch.java
    lucene/java/trunk/src/test/org/apache/lucene/search/TestDateSort.java
    lucene/java/trunk/src/test/org/apache/lucene/search/TestDisjunctionMaxQuery.java
    lucene/java/trunk/src/test/org/apache/lucene/search/TestFieldCacheTermsFilter.java
    lucene/java/trunk/src/test/org/apache/lucene/search/TestFilteredQuery.java
    lucene/java/trunk/src/test/org/apache/lucene/search/TestFilteredSearch.java
    lucene/java/trunk/src/test/org/apache/lucene/search/TestSearchHitsWithDeletions.java
    lucene/java/trunk/src/test/org/apache/lucene/search/TestSloppyPhraseQuery.java
    lucene/java/trunk/src/test/org/apache/lucene/search/TestTermScorer.java
    lucene/java/trunk/src/test/org/apache/lucene/search/TestTimeLimitedCollector.java
    lucene/java/trunk/src/test/org/apache/lucene/search/TestTimeLimitingCollector.java
    lucene/java/trunk/src/test/org/apache/lucene/search/function/FunctionTestSetup.java
    lucene/java/trunk/src/test/org/apache/lucene/search/function/TestCustomScoreQuery.java
    lucene/java/trunk/src/test/org/apache/lucene/search/function/TestDocValues.java
    lucene/java/trunk/src/test/org/apache/lucene/search/function/TestFieldScoreQuery.java
    lucene/java/trunk/src/test/org/apache/lucene/search/function/TestOrdValues.java
    lucene/java/trunk/src/test/org/apache/lucene/search/spans/TestPayloadSpans.java
    lucene/java/trunk/src/test/org/apache/lucene/util/ArrayUtilTest.java
    lucene/java/trunk/src/test/org/apache/lucene/util/TestSortedVIntList.java
    lucene/java/trunk/src/test/org/apache/lucene/util/cache/TestSimpleLRUCache.java

Modified: lucene/java/trunk/src/test/org/apache/lucene/analysis/TestCharFilter.java
URL: http://svn.apache.org/viewvc/lucene/java/trunk/src/test/org/apache/lucene/analysis/TestCharFilter.java?rev=801066&r1=801065&r2=801066&view=diff
==============================================================================
--- lucene/java/trunk/src/test/org/apache/lucene/analysis/TestCharFilter.java (original)
+++ lucene/java/trunk/src/test/org/apache/lucene/analysis/TestCharFilter.java Wed Aug  5 05:43:43
2009
@@ -19,9 +19,9 @@
 
 import java.io.StringReader;
 
-import junit.framework.TestCase;
+import org.apache.lucene.util.LuceneTestCase;
 
-public class TestCharFilter extends TestCase {
+public class TestCharFilter extends LuceneTestCase {
 
   public void testCharFilter1() throws Exception {
     CharStream cs = new CharFilter1( CharReader.get( new StringReader("") ) );

Modified: lucene/java/trunk/src/test/org/apache/lucene/analysis/TestCharacterCache.java
URL: http://svn.apache.org/viewvc/lucene/java/trunk/src/test/org/apache/lucene/analysis/TestCharacterCache.java?rev=801066&r1=801065&r2=801066&view=diff
==============================================================================
--- lucene/java/trunk/src/test/org/apache/lucene/analysis/TestCharacterCache.java (original)
+++ lucene/java/trunk/src/test/org/apache/lucene/analysis/TestCharacterCache.java Wed Aug
 5 05:43:43 2009
@@ -16,11 +16,11 @@
  */
 package org.apache.lucene.analysis;
 
-import junit.framework.TestCase;
+import org.apache.lucene.util.LuceneTestCase;
 /**
  * Testcase for {@link CharacterCache}
  */
-public class TestCharacterCache extends TestCase {
+public class TestCharacterCache extends LuceneTestCase {
 
   public void testValueOf() {
     for (int i = 0; i < 256; i++) {

Modified: lucene/java/trunk/src/test/org/apache/lucene/analysis/TestTeeTokenFilter.java
URL: http://svn.apache.org/viewvc/lucene/java/trunk/src/test/org/apache/lucene/analysis/TestTeeTokenFilter.java?rev=801066&r1=801065&r2=801066&view=diff
==============================================================================
--- lucene/java/trunk/src/test/org/apache/lucene/analysis/TestTeeTokenFilter.java (original)
+++ lucene/java/trunk/src/test/org/apache/lucene/analysis/TestTeeTokenFilter.java Wed Aug
 5 05:43:43 2009
@@ -40,7 +40,8 @@
     super(s);
   }
 
-  protected void setUp() {
+  protected void setUp() throws Exception {
+    super.setUp();
     tokens1 = new String[]{"The", "quick", "Burgundy", "Fox", "jumped", "over", "the", "lazy",
"Red", "Dogs"};
     tokens2 = new String[]{"The", "Lazy", "Dogs", "should", "stay", "on", "the", "porch"};
     buffer1 = new StringBuffer();
@@ -55,10 +56,6 @@
     }
   }
 
-  protected void tearDown() {
-
-  }
-
   public void test() throws IOException {
 
     SinkTokenizer sink1 = new SinkTokenizer(null) {

Modified: lucene/java/trunk/src/test/org/apache/lucene/index/TestParallelTermEnum.java
URL: http://svn.apache.org/viewvc/lucene/java/trunk/src/test/org/apache/lucene/index/TestParallelTermEnum.java?rev=801066&r1=801065&r2=801066&view=diff
==============================================================================
--- lucene/java/trunk/src/test/org/apache/lucene/index/TestParallelTermEnum.java (original)
+++ lucene/java/trunk/src/test/org/apache/lucene/index/TestParallelTermEnum.java Wed Aug 
5 05:43:43 2009
@@ -34,7 +34,6 @@
 
     protected void setUp() throws Exception {
         super.setUp();
-        super.setUp();
         Document doc;
 
         RAMDirectory rd1 = new RAMDirectory();
@@ -68,7 +67,6 @@
 
     protected void tearDown() throws Exception {
         super.tearDown();
-        super.tearDown();
 
         ir1.close();
         ir2.close();

Modified: lucene/java/trunk/src/test/org/apache/lucene/index/TestTransactionRollback.java
URL: http://svn.apache.org/viewvc/lucene/java/trunk/src/test/org/apache/lucene/index/TestTransactionRollback.java?rev=801066&r1=801065&r2=801066&view=diff
==============================================================================
--- lucene/java/trunk/src/test/org/apache/lucene/index/TestTransactionRollback.java (original)
+++ lucene/java/trunk/src/test/org/apache/lucene/index/TestTransactionRollback.java Wed Aug
 5 05:43:43 2009
@@ -26,7 +26,7 @@
 import java.util.Map;
 import java.util.HashMap;
 
-import junit.framework.TestCase;
+import org.apache.lucene.util.LuceneTestCase;
 
 import org.apache.lucene.analysis.WhitespaceAnalyzer;
 import org.apache.lucene.document.Document;
@@ -42,7 +42,7 @@
  * A "keep all" deletion policy is used to ensure we keep all commit points for testing purposes
  */
 
-public class TestTransactionRollback extends TestCase {
+public class TestTransactionRollback extends LuceneTestCase {
 	
   private static final String FIELD_RECORD_ID = "record_id";
   private Directory dir;
@@ -122,6 +122,7 @@
   */
 
   protected void setUp() throws Exception {
+    super.setUp();
     dir = new MockRAMDirectory();
 		
     //Build index, of records 1 to 100, committing after each batch of 10

Modified: lucene/java/trunk/src/test/org/apache/lucene/search/TestBooleanMinShouldMatch.java
URL: http://svn.apache.org/viewvc/lucene/java/trunk/src/test/org/apache/lucene/search/TestBooleanMinShouldMatch.java?rev=801066&r1=801065&r2=801066&view=diff
==============================================================================
--- lucene/java/trunk/src/test/org/apache/lucene/search/TestBooleanMinShouldMatch.java (original)
+++ lucene/java/trunk/src/test/org/apache/lucene/search/TestBooleanMinShouldMatch.java Wed
Aug  5 05:43:43 2009
@@ -42,8 +42,6 @@
     public IndexSearcher s;
 
     public void setUp() throws Exception {
-
-
         super.setUp();
 
 

Modified: lucene/java/trunk/src/test/org/apache/lucene/search/TestDateSort.java
URL: http://svn.apache.org/viewvc/lucene/java/trunk/src/test/org/apache/lucene/search/TestDateSort.java?rev=801066&r1=801065&r2=801066&view=diff
==============================================================================
--- lucene/java/trunk/src/test/org/apache/lucene/search/TestDateSort.java (original)
+++ lucene/java/trunk/src/test/org/apache/lucene/search/TestDateSort.java Wed Aug  5 05:43:43
2009
@@ -19,7 +19,7 @@
 
 import java.util.Arrays;
 
-import junit.framework.TestCase;
+import org.apache.lucene.util.LuceneTestCase;
 
 import org.apache.lucene.analysis.WhitespaceAnalyzer;
 import org.apache.lucene.document.DateTools;
@@ -38,7 +38,7 @@
  * Test date sorting, i.e. auto-sorting of fields with type "long".
  * See http://issues.apache.org/jira/browse/LUCENE-1045 
  */
-public class TestDateSort extends TestCase {
+public class TestDateSort extends LuceneTestCase {
 
   private static final String TEXT_FIELD = "text";
   private static final String DATE_TIME_FIELD = "dateTime";
@@ -46,6 +46,7 @@
   private static Directory directory;
 
   public void setUp() throws Exception {
+    super.setUp();
     // Create an index writer.
     directory = new RAMDirectory();
     IndexWriter writer = new IndexWriter(directory, new WhitespaceAnalyzer(), true,

Modified: lucene/java/trunk/src/test/org/apache/lucene/search/TestDisjunctionMaxQuery.java
URL: http://svn.apache.org/viewvc/lucene/java/trunk/src/test/org/apache/lucene/search/TestDisjunctionMaxQuery.java?rev=801066&r1=801065&r2=801066&view=diff
==============================================================================
--- lucene/java/trunk/src/test/org/apache/lucene/search/TestDisjunctionMaxQuery.java (original)
+++ lucene/java/trunk/src/test/org/apache/lucene/search/TestDisjunctionMaxQuery.java Wed Aug
 5 05:43:43 2009
@@ -71,7 +71,6 @@
     public IndexSearcher s;
 
     public void setUp() throws Exception {
-
         super.setUp();
 
         index = new RAMDirectory();

Modified: lucene/java/trunk/src/test/org/apache/lucene/search/TestFieldCacheTermsFilter.java
URL: http://svn.apache.org/viewvc/lucene/java/trunk/src/test/org/apache/lucene/search/TestFieldCacheTermsFilter.java?rev=801066&r1=801065&r2=801066&view=diff
==============================================================================
--- lucene/java/trunk/src/test/org/apache/lucene/search/TestFieldCacheTermsFilter.java (original)
+++ lucene/java/trunk/src/test/org/apache/lucene/search/TestFieldCacheTermsFilter.java Wed
Aug  5 05:43:43 2009
@@ -17,7 +17,8 @@
  * limitations under the License.
  */
 
-import junit.framework.TestCase;
+import org.apache.lucene.util.LuceneTestCase;
+
 import org.apache.lucene.analysis.KeywordAnalyzer;
 import org.apache.lucene.document.Document;
 import org.apache.lucene.document.Field;
@@ -34,7 +35,7 @@
  *
  * @see org.apache.lucene.search.FieldCacheTermsFilter
  */
-public class TestFieldCacheTermsFilter extends TestCase {
+public class TestFieldCacheTermsFilter extends LuceneTestCase {
   public void testMissingTerms() throws Exception {
     String fieldName = "field1";
     MockRAMDirectory rd = new MockRAMDirectory();

Modified: lucene/java/trunk/src/test/org/apache/lucene/search/TestFilteredQuery.java
URL: http://svn.apache.org/viewvc/lucene/java/trunk/src/test/org/apache/lucene/search/TestFilteredQuery.java?rev=801066&r1=801065&r2=801066&view=diff
==============================================================================
--- lucene/java/trunk/src/test/org/apache/lucene/search/TestFilteredQuery.java (original)
+++ lucene/java/trunk/src/test/org/apache/lucene/search/TestFilteredQuery.java Wed Aug  5
05:43:43 2009
@@ -39,16 +39,15 @@
  * @version $Id$
  * @since   1.4
  */
-public class TestFilteredQuery
-extends LuceneTestCase {
+public class TestFilteredQuery extends LuceneTestCase {
 
   private IndexSearcher searcher;
   private RAMDirectory directory;
   private Query query;
   private Filter filter;
 
-  public void setUp()
-  throws Exception {
+  public void setUp() throws Exception {
+    super.setUp();
     directory = new RAMDirectory();
     IndexWriter writer = new IndexWriter (directory, new WhitespaceAnalyzer(), true, IndexWriter.MaxFieldLength.LIMITED);
 
@@ -96,6 +95,7 @@
   throws Exception {
     searcher.close();
     directory.close();
+    super.tearDown();
   }
 
   public void testFilteredQuery()

Modified: lucene/java/trunk/src/test/org/apache/lucene/search/TestFilteredSearch.java
URL: http://svn.apache.org/viewvc/lucene/java/trunk/src/test/org/apache/lucene/search/TestFilteredSearch.java?rev=801066&r1=801065&r2=801066&view=diff
==============================================================================
--- lucene/java/trunk/src/test/org/apache/lucene/search/TestFilteredSearch.java (original)
+++ lucene/java/trunk/src/test/org/apache/lucene/search/TestFilteredSearch.java Wed Aug  5
05:43:43 2009
@@ -19,7 +19,7 @@
 
 import java.io.IOException;
 
-import junit.framework.TestCase;
+import org.apache.lucene.util.LuceneTestCase;
 
 import org.apache.lucene.analysis.WhitespaceAnalyzer;
 import org.apache.lucene.document.Document;
@@ -34,8 +34,7 @@
 /**
  *
  */
-public class TestFilteredSearch extends TestCase
-{
+public class TestFilteredSearch extends LuceneTestCase {
 
   public TestFilteredSearch(String name) {
     super(name);

Modified: lucene/java/trunk/src/test/org/apache/lucene/search/TestSearchHitsWithDeletions.java
URL: http://svn.apache.org/viewvc/lucene/java/trunk/src/test/org/apache/lucene/search/TestSearchHitsWithDeletions.java?rev=801066&r1=801065&r2=801066&view=diff
==============================================================================
--- lucene/java/trunk/src/test/org/apache/lucene/search/TestSearchHitsWithDeletions.java (original)
+++ lucene/java/trunk/src/test/org/apache/lucene/search/TestSearchHitsWithDeletions.java Wed
Aug  5 05:43:43 2009
@@ -19,7 +19,7 @@
 
 import java.util.ConcurrentModificationException;
 
-import junit.framework.TestCase;
+import org.apache.lucene.util.LuceneTestCase;
 
 import org.apache.lucene.analysis.WhitespaceAnalyzer;
 import org.apache.lucene.document.Document;
@@ -39,7 +39,7 @@
  * See {@link http://issues.apache.org/jira/browse/LUCENE-1096}.
  * @deprecated Hits will be removed in Lucene 3.0
  */
-public class TestSearchHitsWithDeletions extends TestCase {
+public class TestSearchHitsWithDeletions extends LuceneTestCase {
 
   private static boolean VERBOSE = false;  
   private static final String TEXT_FIELD = "text";
@@ -48,6 +48,7 @@
   private static Directory directory;
 
   public void setUp() throws Exception {
+    super.setUp();
     // Create an index writer.
     directory = new RAMDirectory();
     IndexWriter writer = new IndexWriter(directory, new WhitespaceAnalyzer(), true, IndexWriter.MaxFieldLength.LIMITED);

Modified: lucene/java/trunk/src/test/org/apache/lucene/search/TestSloppyPhraseQuery.java
URL: http://svn.apache.org/viewvc/lucene/java/trunk/src/test/org/apache/lucene/search/TestSloppyPhraseQuery.java?rev=801066&r1=801065&r2=801066&view=diff
==============================================================================
--- lucene/java/trunk/src/test/org/apache/lucene/search/TestSloppyPhraseQuery.java (original)
+++ lucene/java/trunk/src/test/org/apache/lucene/search/TestSloppyPhraseQuery.java Wed Aug
 5 05:43:43 2009
@@ -17,7 +17,7 @@
  * limitations under the License.
  */
 
-import junit.framework.TestCase;
+import org.apache.lucene.util.LuceneTestCase;
 
 import org.apache.lucene.analysis.WhitespaceAnalyzer;
 import org.apache.lucene.document.Document;
@@ -29,7 +29,7 @@
 import org.apache.lucene.search.PhraseQuery;
 import org.apache.lucene.store.RAMDirectory;
 
-public class TestSloppyPhraseQuery extends TestCase {
+public class TestSloppyPhraseQuery extends LuceneTestCase {
 
   private static final String S_1 = "A A A";
   private static final String S_2 = "A 1 2 3 A 4 5 6 A";

Modified: lucene/java/trunk/src/test/org/apache/lucene/search/TestTermScorer.java
URL: http://svn.apache.org/viewvc/lucene/java/trunk/src/test/org/apache/lucene/search/TestTermScorer.java?rev=801066&r1=801065&r2=801066&view=diff
==============================================================================
--- lucene/java/trunk/src/test/org/apache/lucene/search/TestTermScorer.java (original)
+++ lucene/java/trunk/src/test/org/apache/lucene/search/TestTermScorer.java Wed Aug  5 05:43:43
2009
@@ -45,8 +45,7 @@
         super(s);
     }
 
-    protected void setUp() throws Exception
-    {
+    protected void setUp() throws Exception {
         super.setUp();
         directory = new RAMDirectory();
 

Modified: lucene/java/trunk/src/test/org/apache/lucene/search/TestTimeLimitedCollector.java
URL: http://svn.apache.org/viewvc/lucene/java/trunk/src/test/org/apache/lucene/search/TestTimeLimitedCollector.java?rev=801066&r1=801065&r2=801066&view=diff
==============================================================================
--- lucene/java/trunk/src/test/org/apache/lucene/search/TestTimeLimitedCollector.java (original)
+++ lucene/java/trunk/src/test/org/apache/lucene/search/TestTimeLimitedCollector.java Wed
Aug  5 05:43:43 2009
@@ -59,6 +59,7 @@
    * initializes searcher with a document set
    */
   protected void setUp() throws Exception {
+    super.setUp();
     final String docText[] = {
         "docThatNeverMatchesSoWeCanRequireLastDocCollectedToBeGreaterThanZero",
         "one blah three",
@@ -92,6 +93,7 @@
 
   public void tearDown() throws Exception {
     searcher.close();
+    super.tearDown();
   }
 
   private void add(String value, IndexWriter iw) throws IOException {

Modified: lucene/java/trunk/src/test/org/apache/lucene/search/TestTimeLimitingCollector.java
URL: http://svn.apache.org/viewvc/lucene/java/trunk/src/test/org/apache/lucene/search/TestTimeLimitingCollector.java?rev=801066&r1=801065&r2=801066&view=diff
==============================================================================
--- lucene/java/trunk/src/test/org/apache/lucene/search/TestTimeLimitingCollector.java (original)
+++ lucene/java/trunk/src/test/org/apache/lucene/search/TestTimeLimitingCollector.java Wed
Aug  5 05:43:43 2009
@@ -61,6 +61,7 @@
    * initializes searcher with a document set
    */
   protected void setUp() throws Exception {
+    super.setUp();
     final String docText[] = {
         "docThatNeverMatchesSoWeCanRequireLastDocCollectedToBeGreaterThanZero",
         "one blah three",
@@ -94,6 +95,7 @@
 
   public void tearDown() throws Exception {
     searcher.close();
+    super.tearDown();
   }
 
   private void add(String value, IndexWriter iw) throws IOException {

Modified: lucene/java/trunk/src/test/org/apache/lucene/search/function/FunctionTestSetup.java
URL: http://svn.apache.org/viewvc/lucene/java/trunk/src/test/org/apache/lucene/search/function/FunctionTestSetup.java?rev=801066&r1=801065&r2=801066&view=diff
==============================================================================
--- lucene/java/trunk/src/test/org/apache/lucene/search/function/FunctionTestSetup.java (original)
+++ lucene/java/trunk/src/test/org/apache/lucene/search/function/FunctionTestSetup.java Wed
Aug  5 05:43:43 2009
@@ -76,7 +76,6 @@
   /* @override */
   protected void tearDown() throws Exception {
     super.tearDown();
-    super.tearDown();
     dir = null;
     anlzr = null;
   }

Modified: lucene/java/trunk/src/test/org/apache/lucene/search/function/TestCustomScoreQuery.java
URL: http://svn.apache.org/viewvc/lucene/java/trunk/src/test/org/apache/lucene/search/function/TestCustomScoreQuery.java?rev=801066&r1=801065&r2=801066&view=diff
==============================================================================
--- lucene/java/trunk/src/test/org/apache/lucene/search/function/TestCustomScoreQuery.java
(original)
+++ lucene/java/trunk/src/test/org/apache/lucene/search/function/TestCustomScoreQuery.java
Wed Aug  5 05:43:43 2009
@@ -39,17 +39,6 @@
     super(name);
   }
 
-  /* @override */
-  protected void tearDown() throws Exception {
-    super.tearDown();
-  }
-
-  /* @override */
-  protected void setUp() throws Exception {
-    // prepare a small index with just a few documents.  
-    super.setUp();
-  }
-
   /** Test that CustomScoreQuery of Type.BYTE returns the expected scores. */
   public void testCustomScoreByte () throws CorruptIndexException, Exception {
     // INT field values are small enough to be parsed as byte

Modified: lucene/java/trunk/src/test/org/apache/lucene/search/function/TestDocValues.java
URL: http://svn.apache.org/viewvc/lucene/java/trunk/src/test/org/apache/lucene/search/function/TestDocValues.java?rev=801066&r1=801065&r2=801066&view=diff
==============================================================================
--- lucene/java/trunk/src/test/org/apache/lucene/search/function/TestDocValues.java (original)
+++ lucene/java/trunk/src/test/org/apache/lucene/search/function/TestDocValues.java Wed Aug
 5 05:43:43 2009
@@ -30,17 +30,6 @@
     super(name);
   }
 
-  /* @override */
-  protected void tearDown() throws Exception {
-    super.tearDown();
-  }
-
-  /* @override */
-  protected void setUp() throws Exception {
-    // prepare a small index with just a few documents.
-    super.setUp();
-  }
-
   public void testGetMinValue() {
     float[] innerArray = new float[] { 1.0f, 2.0f, -1.0f, 100.0f };
     DocValuesTestImpl docValues = new DocValuesTestImpl(innerArray);
@@ -124,4 +113,4 @@
 
   }
 
-}
\ No newline at end of file
+}

Modified: lucene/java/trunk/src/test/org/apache/lucene/search/function/TestFieldScoreQuery.java
URL: http://svn.apache.org/viewvc/lucene/java/trunk/src/test/org/apache/lucene/search/function/TestFieldScoreQuery.java?rev=801066&r1=801065&r2=801066&view=diff
==============================================================================
--- lucene/java/trunk/src/test/org/apache/lucene/search/function/TestFieldScoreQuery.java
(original)
+++ lucene/java/trunk/src/test/org/apache/lucene/search/function/TestFieldScoreQuery.java
Wed Aug  5 05:43:43 2009
@@ -44,17 +44,6 @@
     super(name);
   }
 
-  /* @override */
-  protected void tearDown() throws Exception {
-    super.tearDown();
-  }
-
-  /* @override */
-  protected void setUp() throws Exception {
-    // prepare a small index with just a few documents.  
-    super.setUp();
-  }
-
   /** Test that FieldScoreQuery of Type.BYTE returns docs in expected order. */
   public void testRankByte () throws CorruptIndexException, Exception {
     // INT field values are small enough to be parsed as byte

Modified: lucene/java/trunk/src/test/org/apache/lucene/search/function/TestOrdValues.java
URL: http://svn.apache.org/viewvc/lucene/java/trunk/src/test/org/apache/lucene/search/function/TestOrdValues.java?rev=801066&r1=801065&r2=801066&view=diff
==============================================================================
--- lucene/java/trunk/src/test/org/apache/lucene/search/function/TestOrdValues.java (original)
+++ lucene/java/trunk/src/test/org/apache/lucene/search/function/TestOrdValues.java Wed Aug
 5 05:43:43 2009
@@ -42,17 +42,6 @@
     super(name);
   }
 
-  /* @override */
-  protected void tearDown() throws Exception {
-    super.tearDown();
-  }
-
-  /* @override */
-  protected void setUp() throws Exception {
-    // prepare a small index with just a few documents.  
-    super.setUp();
-  }
-
   /** Test OrdFieldSource */
   public void testOrdFieldRank () throws CorruptIndexException, Exception {
     doTestRank(ID_FIELD,true);

Modified: lucene/java/trunk/src/test/org/apache/lucene/search/spans/TestPayloadSpans.java
URL: http://svn.apache.org/viewvc/lucene/java/trunk/src/test/org/apache/lucene/search/spans/TestPayloadSpans.java?rev=801066&r1=801065&r2=801066&view=diff
==============================================================================
--- lucene/java/trunk/src/test/org/apache/lucene/search/spans/TestPayloadSpans.java (original)
+++ lucene/java/trunk/src/test/org/apache/lucene/search/spans/TestPayloadSpans.java Wed Aug
 5 05:43:43 2009
@@ -66,10 +66,6 @@
     indexReader = searcher.getIndexReader();
   }
 
-  protected void tearDown() {
-
-  }
-
   public void testSpanTermQuery() throws Exception {
     SpanTermQuery stq;
     Spans spans;
@@ -534,4 +530,4 @@
       return result;
     }
   }
-}
\ No newline at end of file
+}

Modified: lucene/java/trunk/src/test/org/apache/lucene/util/ArrayUtilTest.java
URL: http://svn.apache.org/viewvc/lucene/java/trunk/src/test/org/apache/lucene/util/ArrayUtilTest.java?rev=801066&r1=801065&r2=801066&view=diff
==============================================================================
--- lucene/java/trunk/src/test/org/apache/lucene/util/ArrayUtilTest.java (original)
+++ lucene/java/trunk/src/test/org/apache/lucene/util/ArrayUtilTest.java Wed Aug  5 05:43:43
2009
@@ -1,13 +1,13 @@
 package org.apache.lucene.util;
 
-import junit.framework.TestCase;
+import org.apache.lucene.util.LuceneTestCase;
 
 
 /**
  *
  *
  **/
-public class ArrayUtilTest extends TestCase {
+public class ArrayUtilTest extends LuceneTestCase {
 
   public void testParseInt() throws Exception {
     int test;

Modified: lucene/java/trunk/src/test/org/apache/lucene/util/TestSortedVIntList.java
URL: http://svn.apache.org/viewvc/lucene/java/trunk/src/test/org/apache/lucene/util/TestSortedVIntList.java?rev=801066&r1=801065&r2=801066&view=diff
==============================================================================
--- lucene/java/trunk/src/test/org/apache/lucene/util/TestSortedVIntList.java (original)
+++ lucene/java/trunk/src/test/org/apache/lucene/util/TestSortedVIntList.java Wed Aug  5 05:43:43
2009
@@ -20,13 +20,14 @@
 import java.io.IOException;
 import java.util.BitSet;
 
-import junit.framework.TestCase;
+import org.apache.lucene.util.LuceneTestCase;
+
 import junit.framework.TestSuite;
 import junit.textui.TestRunner;
 
 import org.apache.lucene.search.DocIdSetIterator;
 
-public class TestSortedVIntList extends TestCase {
+public class TestSortedVIntList extends LuceneTestCase {
   /** Main for running test case by itself. */
   public static void main(String args[]) {
     TestRunner.run(new TestSuite(TestSortedVIntList.class));

Modified: lucene/java/trunk/src/test/org/apache/lucene/util/cache/TestSimpleLRUCache.java
URL: http://svn.apache.org/viewvc/lucene/java/trunk/src/test/org/apache/lucene/util/cache/TestSimpleLRUCache.java?rev=801066&r1=801065&r2=801066&view=diff
==============================================================================
--- lucene/java/trunk/src/test/org/apache/lucene/util/cache/TestSimpleLRUCache.java (original)
+++ lucene/java/trunk/src/test/org/apache/lucene/util/cache/TestSimpleLRUCache.java Wed Aug
 5 05:43:43 2009
@@ -17,9 +17,9 @@
 * limitations under the License.
 */
 
-import junit.framework.TestCase;
+import org.apache.lucene.util.LuceneTestCase;
 
-public class TestSimpleLRUCache extends TestCase {
+public class TestSimpleLRUCache extends LuceneTestCase {
 
   public void testLRUCache() throws Exception {
     final int n = 100;



Mime
View raw message