mirror of https://github.com/apache/lucene.git
LUCENE-3661: hack test for simpletext case
git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/branches/lucene3661@1233981 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
af670f2025
commit
0a09551f34
|
@ -497,17 +497,25 @@ public class TestBackwardsCompatibility extends LuceneTestCase {
|
|||
writer.deleteDocuments(searchTerm);
|
||||
writer.close();
|
||||
|
||||
// Now verify file names:
|
||||
// Now verify file names... TODO: fix this test better, we could populate from
|
||||
// separateFiles() or something.
|
||||
String[] expected = new String[] {"_0.cfs", "_0.cfe",
|
||||
"_0_1.del",
|
||||
"segments_2",
|
||||
"segments.gen"};
|
||||
|
||||
String[] expectedSimpleText = new String[] {"_0.cfs", "_0.cfe",
|
||||
"_0_1.liv",
|
||||
"segments_2",
|
||||
"segments.gen"};
|
||||
|
||||
String[] actual = dir.listAll();
|
||||
Arrays.sort(expected);
|
||||
Arrays.sort(expectedSimpleText);
|
||||
Arrays.sort(actual);
|
||||
if (!Arrays.equals(expected, actual)) {
|
||||
fail("incorrect filenames in index: expected:\n " + asString(expected) + "\n actual:\n " + asString(actual));
|
||||
if (!Arrays.equals(expected, actual) && !Arrays.equals(expectedSimpleText, actual)) {
|
||||
fail("incorrect filenames in index: expected:\n " + asString(expected)
|
||||
+ "\n or " + asString(expectedSimpleText) + "\n actual:\n " + asString(actual));
|
||||
}
|
||||
dir.close();
|
||||
} finally {
|
||||
|
|
Loading…
Reference in New Issue