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 05:07:06 UTC
svn commit: r1433282 - in /lucene/dev/branches/branch_4x: ./ lucene/
lucene/core/ lucene/core/src/test/org/apache/lucene/index/
Author: sarowe
Date: Tue Jan 15 04:07:05 2013
New Revision: 1433282
URL: http://svn.apache.org/viewvc?rev=1433282&view=rev
Log:
Add 4.1 indexes to TestBackwardsCompatibility (merged trunk r1433281)
Added:
lucene/dev/branches/branch_4x/lucene/core/src/test/org/apache/lucene/index/index.41.cfs.zip
- copied unchanged from r1433281, lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/index.41.cfs.zip
lucene/dev/branches/branch_4x/lucene/core/src/test/org/apache/lucene/index/index.41.nocfs.zip
- copied unchanged from r1433281, lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/index.41.nocfs.zip
Modified:
lucene/dev/branches/branch_4x/ (props changed)
lucene/dev/branches/branch_4x/lucene/ (props changed)
lucene/dev/branches/branch_4x/lucene/core/ (props changed)
lucene/dev/branches/branch_4x/lucene/core/src/test/org/apache/lucene/index/TestBackwardsCompatibility.java (contents, props changed)
Modified: lucene/dev/branches/branch_4x/lucene/core/src/test/org/apache/lucene/index/TestBackwardsCompatibility.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/lucene/core/src/test/org/apache/lucene/index/TestBackwardsCompatibility.java?rev=1433282&r1=1433281&r2=1433282&view=diff
==============================================================================
--- lucene/dev/branches/branch_4x/lucene/core/src/test/org/apache/lucene/index/TestBackwardsCompatibility.java (original)
+++ lucene/dev/branches/branch_4x/lucene/core/src/test/org/apache/lucene/index/TestBackwardsCompatibility.java Tue Jan 15 04:07:05 2013
@@ -82,14 +82,22 @@ import org.junit.BeforeClass;
@SuppressCodecs({"Lucene3x", "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 {
@@ -117,7 +125,9 @@ public class TestBackwardsCompatibility
*/
final static String[] oldNames = {"40.cfs",
- "40.nocfs",
+ "40.nocfs",
+ "41.cfs",
+ "41.nocfs",
};
final String[] unsupportedNames = {"19.cfs",
@@ -498,7 +508,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();