You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by sa...@apache.org on 2013/01/15 04:56:19 UTC

svn commit: r1433281 - in /lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index: TestBackwardsCompatibility.java index.41.cfs.zip index.41.nocfs.zip

Author: sarowe
Date: Tue Jan 15 03:56:18 2013
New Revision: 1433281

URL: http://svn.apache.org/viewvc?rev=1433281&view=rev
Log:
Add 4.1 indexes to TestBackwardsCompatibility

Added:
    lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/index.41.cfs.zip   (with props)
    lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/index.41.nocfs.zip   (with props)
Modified:
    lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/TestBackwardsCompatibility.java

Modified: lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/TestBackwardsCompatibility.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/TestBackwardsCompatibility.java?rev=1433281&r1=1433280&r2=1433281&view=diff
==============================================================================
--- lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/TestBackwardsCompatibility.java (original)
+++ lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/TestBackwardsCompatibility.java Tue Jan 15 03:56:18 2013
@@ -81,14 +81,22 @@ import org.junit.BeforeClass;
 @SuppressCodecs({"MockFixedIntBlock", "MockVariableIntBlock", "MockSep", "MockRandom"})
 public class TestBackwardsCompatibility extends LuceneTestCase {
 
-  // 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.
+  // Uncomment these cases & run them on an older Lucene version,
+  // to generate indexes to test backwards compatibility.  These
+  // indexes will be created under directory /tmp/idx/.
+  //
+  // However, you must first disable the Lucene TestSecurityManager,
+  // which will otherwise disallow writing outside of the build/
+  // directory - to do this, comment out the "java.security.manager"
+  // <sysproperty> under the "test-macro" <macrodef>.
+  //
+  // Zip up the generated indexes:
+  //
+  //    cd /tmp/idx/index.cfs   ; zip index.<VERSION>.cfs.zip *
+  //    cd /tmp/idx/index.nocfs ; zip index.<VERSION>.nocfs.zip *
+  //
+  // Then move those 2 zip files to your trunk checkout and add them
+  // to the oldNames array.
 
   /*
   public void testCreateCFS() throws IOException {
@@ -149,6 +157,8 @@ public class TestBackwardsCompatibility 
   
   final static String[] oldNames = {"40.cfs",
                                     "40.nocfs",
+                                    "41.cfs",
+                                    "41.nocfs",
   };
   
   final String[] unsupportedNames = {"19.cfs",
@@ -537,7 +547,7 @@ public class TestBackwardsCompatibility 
 
   public File createIndex(String dirName, boolean doCFS, boolean fullyMerged) throws IOException {
     // we use a real directory name that is not cleaned up, because this method is only used to create backwards indexes:
-    File indexDir = new File("/tmp/4x", dirName);
+    File indexDir = new File("/tmp/idx", dirName);
     _TestUtil.rmDir(indexDir);
     Directory dir = newFSDirectory(indexDir);
     LogByteSizeMergePolicy mp = new LogByteSizeMergePolicy();

Added: lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/index.41.cfs.zip
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/index.41.cfs.zip?rev=1433281&view=auto
==============================================================================
Binary file - no diff available.

Added: lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/index.41.nocfs.zip
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/index.41.nocfs.zip?rev=1433281&view=auto
==============================================================================
Binary file - no diff available.