Skip to content

armgit / solr

Public Imported from GitHub
0

Apache Solr open-source search software

LUCENE-1120: also add 2.3 index tests to the backwards compatibility test

Michael McCandlesseb415f517143
diff --git a/src/test/org/apache/lucene/index/TestBackwardsCompatibility.java b/src/test/org/apache/lucene/index/TestBackwardsCompatibility.java
index 6e14aeb8deb..52d8bd8eb14 100644
--- a/src/test/org/apache/lucene/index/TestBackwardsCompatibility.java
+++ b/src/test/org/apache/lucene/index/TestBackwardsCompatibility.java
@@ -48,16 +48,22 @@ import org.apache.lucene.document.Field;
public class TestBackwardsCompatibility extends LuceneTestCase
{
- // Uncomment these cases & run in a pre-lockless checkout
- // to create indices:
+ // Uncomment these cases & run them on an older Lucene
+ // version, to generate an index to test backwards
+ // compatibility. Then, cd to build/test/index.cfs and
+ // run "zip index.<VERSION>.cfs.zip *"; cd to
+ // build/test/index.nocfs and run "zip
+ // index.<VERSION>.nocfs.zip *". Then move those 2 zip
+ // files to your trunk checkout and add them to the
+ // oldNames array.
/*
public void testCreatePreLocklessCFS() throws IOException {
- createIndex("src/test/org/apache/lucene/index/index.cfs", true);
+ createIndex("index.cfs", true);
}
public void testCreatePreLocklessNoCFS() throws IOException {
- createIndex("src/test/org/apache/lucene/index/index.nocfs", false);
+ createIndex("index.nocfs", false);
}
*/
@@ -116,7 +122,10 @@ public class TestBackwardsCompatibility extends LuceneTestCase
"21.cfs",
"21.nocfs",
"22.cfs",
- "22.nocfs"};
+ "22.nocfs",
+ "23.cfs",
+ "23.nocfs",
+ };
public void testSearchOldIndex() throws IOException {
for(int i=0;i<oldNames.length;i++) {
diff --git a/src/test/org/apache/lucene/index/index.23.cfs.zip b/src/test/org/apache/lucene/index/index.23.cfs.zip
new file mode 100644
index 00000000000..5854655c991
Binary files /dev/null and b/src/test/org/apache/lucene/index/index.23.cfs.zip differ
diff --git a/src/test/org/apache/lucene/index/index.23.nocfs.zip b/src/test/org/apache/lucene/index/index.23.nocfs.zip
new file mode 100644
index 00000000000..0876921c01a
Binary files /dev/null and b/src/test/org/apache/lucene/index/index.23.nocfs.zip differ