mirror of https://github.com/apache/lucene.git
make tests work again with bug fix in Reader getFieldNames
git-svn-id: https://svn.apache.org/repos/asf/lucene/java/trunk@150714 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
7b008b210d
commit
785e50ba82
|
@ -31,7 +31,7 @@ public class TestFieldInfos extends TestCase {
|
|||
FieldInfos fieldInfos = new FieldInfos();
|
||||
fieldInfos.add(testDoc);
|
||||
//Since the complement is stored as well in the fields map
|
||||
assertTrue(fieldInfos.size() == 7); //this is 7 b/c we are using the no-arg constructor
|
||||
assertTrue(fieldInfos.size() == 6); //this is 6 b/c we are using the no-arg constructor
|
||||
RAMDirectory dir = new RAMDirectory();
|
||||
String name = "testFile";
|
||||
IndexOutput output = dir.createOutput(name);
|
||||
|
|
|
@ -83,7 +83,7 @@ public class TestIndexReader extends TestCase
|
|||
// verify fields again
|
||||
reader = IndexReader.open(d);
|
||||
fieldNames = reader.getFieldNames();
|
||||
assertEquals(9, fieldNames.size()); // the following fields + an empty one (bug?!)
|
||||
assertEquals(8, fieldNames.size()); // the following fields
|
||||
assertTrue(fieldNames.contains("keyword"));
|
||||
assertTrue(fieldNames.contains("text"));
|
||||
assertTrue(fieldNames.contains("unindexed"));
|
||||
|
@ -105,7 +105,7 @@ public class TestIndexReader extends TestCase
|
|||
|
||||
// verify that only unindexed fields were returned
|
||||
Collection unindexedFieldNames = reader.getFieldNames(false);
|
||||
assertEquals(3, unindexedFieldNames.size()); // the following fields + an empty one
|
||||
assertEquals(2, unindexedFieldNames.size()); // the following fields
|
||||
assertTrue(unindexedFieldNames.contains("unindexed"));
|
||||
assertTrue(unindexedFieldNames.contains("unindexed2"));
|
||||
}
|
||||
|
|
|
@ -106,7 +106,7 @@ public class TestSegmentReader extends TestCase {
|
|||
public void testGetFieldNameVariations() {
|
||||
Collection result = reader.getFieldNames();
|
||||
assertTrue(result != null);
|
||||
assertTrue(result.size() == 7);
|
||||
assertTrue(result.size() == 6);
|
||||
for (Iterator iter = result.iterator(); iter.hasNext();) {
|
||||
String s = (String) iter.next();
|
||||
//System.out.println("Name: " + s);
|
||||
|
@ -122,7 +122,7 @@ public class TestSegmentReader extends TestCase {
|
|||
|
||||
result = reader.getFieldNames(false);
|
||||
assertTrue(result != null);
|
||||
assertTrue(result.size() == 2);
|
||||
assertTrue(result.size() == 1);
|
||||
//Get all indexed fields that are storing term vectors
|
||||
result = reader.getIndexedFieldNames(true);
|
||||
assertTrue(result != null);
|
||||
|
|
Loading…
Reference in New Issue