lucene-java-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rm...@apache.org
Subject svn commit: r990293 - in /lucene/java/branches/lucene_3_0: ./ contrib/ contrib/analyzers/ contrib/analyzers/common/ contrib/analyzers/common/src/test/ contrib/analyzers/smartcn/ contrib/highlighter/ contrib/highlighter/src/test/ contrib/instantiated/sr...
Date Fri, 27 Aug 2010 22:36:38 GMT
Author: rmuir
Date: Fri Aug 27 22:36:38 2010
New Revision: 990293

URL: http://svn.apache.org/viewvc?rev=990293&view=rev
Log:
LUCENE-2627: MMapDirectory bug when file size is exact multiple of chunk size

Added:
    lucene/java/branches/lucene_3_0/src/test/org/apache/lucene/store/TestMultiMMap.java
      - copied, changed from r990286, lucene/dev/branches/branch_3x/lucene/src/test/org/apache/lucene/store/TestMultiMMap.java
Modified:
    lucene/java/branches/lucene_3_0/   (props changed)
    lucene/java/branches/lucene_3_0/CHANGES.txt
    lucene/java/branches/lucene_3_0/build.xml   (props changed)
    lucene/java/branches/lucene_3_0/contrib/   (props changed)
    lucene/java/branches/lucene_3_0/contrib/CHANGES.txt   (props changed)
    lucene/java/branches/lucene_3_0/contrib/analyzers/   (props changed)
    lucene/java/branches/lucene_3_0/contrib/analyzers/common/   (props changed)
    lucene/java/branches/lucene_3_0/contrib/analyzers/common/src/test/   (props changed)
    lucene/java/branches/lucene_3_0/contrib/analyzers/smartcn/   (props changed)
    lucene/java/branches/lucene_3_0/contrib/highlighter/   (props changed)
    lucene/java/branches/lucene_3_0/contrib/highlighter/src/test/   (props changed)
    lucene/java/branches/lucene_3_0/contrib/instantiated/src/test/org/apache/lucene/store/instantiated/TestIndicesEquals.java
  (props changed)
    lucene/java/branches/lucene_3_0/src/   (props changed)
    lucene/java/branches/lucene_3_0/src/java/org/apache/lucene/analysis/Tokenizer.java   (props
changed)
    lucene/java/branches/lucene_3_0/src/java/org/apache/lucene/search/MultiTermQueryWrapperFilter.java
  (props changed)
    lucene/java/branches/lucene_3_0/src/java/org/apache/lucene/store/MMapDirectory.java
    lucene/java/branches/lucene_3_0/src/test/org/apache/lucene/analysis/TestISOLatin1AccentFilter.java
  (props changed)
    lucene/java/branches/lucene_3_0/src/test/org/apache/lucene/document/TestDateTools.java
  (props changed)
    lucene/java/branches/lucene_3_0/src/test/org/apache/lucene/document/TestNumberTools.java
  (props changed)
    lucene/java/branches/lucene_3_0/src/test/org/apache/lucene/index/   (props changed)
    lucene/java/branches/lucene_3_0/src/test/org/apache/lucene/index/TestBackwardsCompatibility.java
  (props changed)
    lucene/java/branches/lucene_3_0/src/test/org/apache/lucene/search/TestCachingWrapperFilter.java
  (props changed)
    lucene/java/branches/lucene_3_0/src/test/org/apache/lucene/search/spans/TestPayloadSpans.java
  (props changed)
    lucene/java/branches/lucene_3_0/src/test/org/apache/lucene/search/spans/TestSpans.java
  (props changed)
    lucene/java/branches/lucene_3_0/src/test/org/apache/lucene/util/TestAttributeSource.java
  (props changed)

Propchange: lucene/java/branches/lucene_3_0/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Fri Aug 27 22:36:38 2010
@@ -1,5 +1,5 @@
-/lucene/dev/branches/branch_3x/lucene:941394,946651,948430,957490,984210,988629
-/lucene/dev/trunk/lucene:929738,932398,935522,938989,939611,939649,940730,945420,946599,948082,948429,949288,949976,949997,950458,950613,951521,963781,965103,984187
+/lucene/dev/branches/branch_3x/lucene:941394,946651,948430,957490,984210,988629,990286
+/lucene/dev/trunk/lucene:929738,932398,935522,938989,939611,939649,940730,945420,946599,948082,948429,949288,949976,949997,950458,950613,951521,963781,965103,984187,990281
 /lucene/java/branches/lucene_2_4:748824
 /lucene/java/branches/lucene_2_9:817269-818600,825998,829134,829881,831036,896850,909334,940987,948516
 /lucene/java/branches/lucene_2_9_back_compat_tests:818601-821336

Modified: lucene/java/branches/lucene_3_0/CHANGES.txt
URL: http://svn.apache.org/viewvc/lucene/java/branches/lucene_3_0/CHANGES.txt?rev=990293&r1=990292&r2=990293&view=diff
==============================================================================
--- lucene/java/branches/lucene_3_0/CHANGES.txt (original)
+++ lucene/java/branches/lucene_3_0/CHANGES.txt Fri Aug 27 22:36:38 2010
@@ -33,6 +33,9 @@ Bug fixes
 * LUCENE-2620: Fixed a bug in WildcardQuery where too many asterisks
   would result in unbearably slow performance.  (Nick Barkas via Robert Muir)
 
+* LUCENE-2627: Fixed bug in MMapDirectory chunking when a file is an
+  exact multiple of the chunk size.  (Robert Muir)
+
 ======================= Release 3.0.2 2010-06-18 =======================
 
 Changes in backwards compatibility policy

Propchange: lucene/java/branches/lucene_3_0/build.xml
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Fri Aug 27 22:36:38 2010
@@ -1,5 +1,5 @@
-/lucene/dev/branches/branch_3x/lucene/build.xml:941394,946651,948430,957490,984210,988629
-/lucene/dev/trunk/lucene/build.xml:929738,932398,935522,938989,939611,939649,940730,945420,946599,948082,948429,949288,949976,949997,950458,950613,951521,963781,965103,984187
+/lucene/dev/branches/branch_3x/lucene/build.xml:941394,946651,948430,957490,984210,988629,990286
+/lucene/dev/trunk/lucene/build.xml:929738,932398,935522,938989,939611,939649,940730,945420,946599,948082,948429,949288,949976,949997,950458,950613,951521,963781,965103,984187,990281
 /lucene/java/branches/lucene_2_4/build.xml:748824
 /lucene/java/branches/lucene_2_9/build.xml:817269-818600,825998,829134,829881,831036,896850,909334,940987,948516
 /lucene/java/branches/lucene_2_9_back_compat_tests/build.xml:818601-821336

Propchange: lucene/java/branches/lucene_3_0/contrib/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Fri Aug 27 22:36:38 2010
@@ -1,5 +1,5 @@
-/lucene/dev/branches/branch_3x/lucene/contrib:941394,946651,948430,957490,984210,988629
-/lucene/dev/trunk/lucene/contrib:929738,932398,935522,938989,939611,939649,940730,945420,946599,948082,948429,949288,949976,949997,950458,950613,951521,963781,965103,984187
+/lucene/dev/branches/branch_3x/lucene/contrib:941394,946651,948430,957490,984210,988629,990286
+/lucene/dev/trunk/lucene/contrib:929738,932398,935522,938989,939611,939649,940730,945420,946599,948082,948429,949288,949976,949997,950458,950613,951521,963781,965103,984187,990281
 /lucene/java/branches/lucene_2_4/contrib:748824
 /lucene/java/branches/lucene_2_9/contrib:817269-818600,825998,829134,829816,829881,831036,896850,909334,940987,948516
 /lucene/java/branches/lucene_2_9_back_compat_tests/contrib:818601-821336

Propchange: lucene/java/branches/lucene_3_0/contrib/CHANGES.txt
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Fri Aug 27 22:36:38 2010
@@ -1,5 +1,5 @@
-/lucene/dev/branches/branch_3x/lucene/contrib/CHANGES.txt:941394,946651,948430,957490,984210,988629
-/lucene/dev/trunk/lucene/contrib/CHANGES.txt:929738,932398,935522,938989,939611,939649,940730,945420,946599,948082,948429,949288,949976,949997,950458,950613,951521,963781,965103,984187
+/lucene/dev/branches/branch_3x/lucene/contrib/CHANGES.txt:941394,946651,948430,957490,984210,988629,990286
+/lucene/dev/trunk/lucene/contrib/CHANGES.txt:929738,932398,935522,938989,939611,939649,940730,945420,946599,948082,948429,949288,949976,949997,950458,950613,951521,963781,965103,984187,990281
 /lucene/java/branches/lucene_2_4/contrib/CHANGES.txt:748824
 /lucene/java/branches/lucene_2_9/contrib/CHANGES.txt:817269-818600,825998,826775,829134,829816,829881,831036,896850,909334,940987,948516
 /lucene/java/branches/lucene_2_9_back_compat_tests/contrib/CHANGES.txt:818601-821336

Propchange: lucene/java/branches/lucene_3_0/contrib/analyzers/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Fri Aug 27 22:36:38 2010
@@ -1,3 +1,3 @@
-/lucene/dev/branches/branch_3x/lucene/contrib/analyzers:941394,946651,957490,984210,988629
-/lucene/dev/trunk/lucene/contrib/analyzers:929738,935522,939611,940730,948429,949288,949976,949997,950458,950613,951521,963781,965103,984187
+/lucene/dev/branches/branch_3x/lucene/contrib/analyzers:941394,946651,957490,984210,988629,990286
+/lucene/dev/trunk/lucene/contrib/analyzers:929738,935522,939611,940730,948429,949288,949976,949997,950458,950613,951521,963781,965103,984187,990281
 /lucene/java/trunk/contrib/analyzers:887670,889579,889866,890439,891205,891377,920270

Propchange: lucene/java/branches/lucene_3_0/contrib/analyzers/common/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Fri Aug 27 22:36:38 2010
@@ -1,2 +1,2 @@
-/lucene/dev/branches/branch_3x/lucene/contrib/analyzers/common:988629
-/lucene/dev/trunk/lucene/contrib/analyzers/common:984187
+/lucene/dev/branches/branch_3x/lucene/contrib/analyzers/common:988629,990286
+/lucene/dev/trunk/lucene/contrib/analyzers/common:984187,990281

Propchange: lucene/java/branches/lucene_3_0/contrib/analyzers/common/src/test/
------------------------------------------------------------------------------
--- svn:mergeinfo (added)
+++ svn:mergeinfo Fri Aug 27 22:36:38 2010
@@ -0,0 +1 @@
+/lucene/dev/trunk/lucene/contrib/analyzers/common/src/test:990281

Propchange: lucene/java/branches/lucene_3_0/contrib/analyzers/smartcn/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Fri Aug 27 22:36:38 2010
@@ -1,2 +1,2 @@
-/lucene/dev/branches/branch_3x/lucene/contrib/analyzers/smartcn:988629
-/lucene/dev/trunk/lucene/contrib/analyzers/smartcn:984187
+/lucene/dev/branches/branch_3x/lucene/contrib/analyzers/smartcn:988629,990286
+/lucene/dev/trunk/lucene/contrib/analyzers/smartcn:984187,990281

Propchange: lucene/java/branches/lucene_3_0/contrib/highlighter/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Fri Aug 27 22:36:38 2010
@@ -1,2 +1,2 @@
-/lucene/dev/branches/branch_3x/lucene/contrib/highlighter:988629
-/lucene/dev/trunk/lucene/contrib/highlighter:984187
+/lucene/dev/branches/branch_3x/lucene/contrib/highlighter:988629,990286
+/lucene/dev/trunk/lucene/contrib/highlighter:984187,990281

Propchange: lucene/java/branches/lucene_3_0/contrib/highlighter/src/test/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Fri Aug 27 22:36:38 2010
@@ -1,5 +1,5 @@
-/lucene/dev/branches/branch_3x/lucene/contrib/highlighter/src/test:941394,946651,948430,957490,984210,988629
-/lucene/dev/trunk/lucene/contrib/highlighter/src/test:929738,932398,935522,938989,939611,939649,940730,945420,946599,948082,948429,949288,949976,949997,950458,950613,951521,963781,965103,984187
+/lucene/dev/branches/branch_3x/lucene/contrib/highlighter/src/test:941394,946651,948430,957490,984210,988629,990286
+/lucene/dev/trunk/lucene/contrib/highlighter/src/test:929738,932398,935522,938989,939611,939649,940730,945420,946599,948082,948429,949288,949976,949997,950458,950613,951521,963781,965103,984187,990281
 /lucene/java/branches/lucene_2_4/contrib/highlighter/src/test:748824
 /lucene/java/branches/lucene_2_9/contrib/highlighter/src/test:817269-818600,825998,826775,829134,829816,829881,831036,896850,909334,940987,948516
 /lucene/java/branches/lucene_2_9_back_compat_tests/contrib/highlighter/src/test:818601-821336

Propchange: lucene/java/branches/lucene_3_0/contrib/instantiated/src/test/org/apache/lucene/store/instantiated/TestIndicesEquals.java
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Fri Aug 27 22:36:38 2010
@@ -1,5 +1,5 @@
-/lucene/dev/branches/branch_3x/lucene/contrib/instantiated/src/test/org/apache/lucene/store/instantiated/TestIndicesEquals.java:941394,946651,948430,957490,984210,988629
-/lucene/dev/trunk/lucene/contrib/instantiated/src/test/org/apache/lucene/store/instantiated/TestIndicesEquals.java:929738,932398,935522,938989,939611,939649,940730,945420,946599,948082,948429,949288,949976,949997,950458,950613,951521,963781,965103,984187
+/lucene/dev/branches/branch_3x/lucene/contrib/instantiated/src/test/org/apache/lucene/store/instantiated/TestIndicesEquals.java:941394,946651,948430,957490,984210,988629,990286
+/lucene/dev/trunk/lucene/contrib/instantiated/src/test/org/apache/lucene/store/instantiated/TestIndicesEquals.java:929738,932398,935522,938989,939611,939649,940730,945420,946599,948082,948429,949288,949976,949997,950458,950613,951521,963781,965103,984187,990281
 /lucene/java/branches/lucene_2_4/contrib/instantiated/src/test/org/apache/lucene/store/instantiated/TestIndicesEquals.java:748824
 /lucene/java/branches/lucene_2_9/contrib/instantiated/src/test/org/apache/lucene/store/instantiated/TestIndicesEquals.java:817269-818600,825998,829134,829816,829881,831036,896850,909334,940987,948516
 /lucene/java/branches/lucene_2_9_back_compat_tests/contrib/instantiated/src/test/org/apache/lucene/store/instantiated/TestIndicesEquals.java:818601-821336

Propchange: lucene/java/branches/lucene_3_0/src/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Fri Aug 27 22:36:38 2010
@@ -1,5 +1,5 @@
-/lucene/dev/branches/branch_3x/lucene/src:941394,946651,948430,957490,984210,988629
-/lucene/dev/trunk/lucene/src:929738,932398,935522,938989,939611,939649,940730,945420,946599,948082,948429,949288,949976,949997,950458,950613,951521,953407,963781,965103,984187
+/lucene/dev/branches/branch_3x/lucene/src:941394,946651,948430,957490,984210,988629,990286
+/lucene/dev/trunk/lucene/src:929738,932398,935522,938989,939611,939649,940730,945420,946599,948082,948429,949288,949976,949997,950458,950613,951521,953407,963781,965103,984187,990281
 /lucene/java/branches/lucene_2_4/src:748824
 /lucene/java/branches/lucene_2_9/src:817269-818600,825998,829134,829881,831036,896850,909334,940987,948516
 /lucene/java/branches/lucene_2_9_back_compat_tests/src:818601-821336

Propchange: lucene/java/branches/lucene_3_0/src/java/org/apache/lucene/analysis/Tokenizer.java
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Fri Aug 27 22:36:38 2010
@@ -1,5 +1,5 @@
-/lucene/dev/branches/branch_3x/lucene/src/java/org/apache/lucene/analysis/Tokenizer.java:941394,946651,948430,957490,984210,988629
-/lucene/dev/trunk/lucene/src/java/org/apache/lucene/analysis/Tokenizer.java:929738,932398,935522,938989,939611,939649,940730,945420,946599,948082,948429,949288,949976,949997,950458,950613,951521,953407,963781,965103,984187
+/lucene/dev/branches/branch_3x/lucene/src/java/org/apache/lucene/analysis/Tokenizer.java:941394,946651,948430,957490,984210,988629,990286
+/lucene/dev/trunk/lucene/src/java/org/apache/lucene/analysis/Tokenizer.java:929738,932398,935522,938989,939611,939649,940730,945420,946599,948082,948429,949288,949976,949997,950458,950613,951521,953407,963781,965103,984187,990281
 /lucene/java/branches/lucene_2_4/src/java/org/apache/lucene/analysis/Tokenizer.java:748824
 /lucene/java/branches/lucene_2_9/src/java/org/apache/lucene/analysis/Tokenizer.java:817269-818600,825998,829134,829881,831036,896850,909334,940987,948516
 /lucene/java/branches/lucene_2_9_back_compat_tests/src/java/org/apache/lucene/analysis/Tokenizer.java:818601-821336

Propchange: lucene/java/branches/lucene_3_0/src/java/org/apache/lucene/search/MultiTermQueryWrapperFilter.java
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Fri Aug 27 22:36:38 2010
@@ -1,5 +1,5 @@
-/lucene/dev/branches/branch_3x/lucene/src/java/org/apache/lucene/search/MultiTermQueryWrapperFilter.java:941394,946651,948430,957490,984210,988629
-/lucene/dev/trunk/lucene/src/java/org/apache/lucene/search/MultiTermQueryWrapperFilter.java:929738,932398,935522,938989,939611,939649,940730,945420,946599,948082,948429,949288,949976,949997,950458,950613,951521,953407,963781,965103,984187
+/lucene/dev/branches/branch_3x/lucene/src/java/org/apache/lucene/search/MultiTermQueryWrapperFilter.java:941394,946651,948430,957490,984210,988629,990286
+/lucene/dev/trunk/lucene/src/java/org/apache/lucene/search/MultiTermQueryWrapperFilter.java:929738,932398,935522,938989,939611,939649,940730,945420,946599,948082,948429,949288,949976,949997,950458,950613,951521,953407,963781,965103,984187,990281
 /lucene/java/branches/lucene_2_4/src/java/org/apache/lucene/search/MultiTermQueryWrapperFilter.java:748824
 /lucene/java/branches/lucene_2_9/src/java/org/apache/lucene/search/MultiTermQueryWrapperFilter.java:817269-818600,825998,829134,829881,831036,896850,909334,940987,948516
 /lucene/java/branches/lucene_2_9_back_compat_tests/src/java/org/apache/lucene/search/MultiTermQueryWrapperFilter.java:818601-821336

Modified: lucene/java/branches/lucene_3_0/src/java/org/apache/lucene/store/MMapDirectory.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/lucene_3_0/src/java/org/apache/lucene/store/MMapDirectory.java?rev=990293&r1=990292&r2=990293&view=diff
==============================================================================
--- lucene/java/branches/lucene_3_0/src/java/org/apache/lucene/store/MMapDirectory.java (original)
+++ lucene/java/branches/lucene_3_0/src/java/org/apache/lucene/store/MMapDirectory.java Fri
Aug 27 22:36:38 2010
@@ -288,7 +288,7 @@ public class MMapDirectory extends FSDir
            + raf.toString());
       
       int nrBuffers = (int) (length / maxBufSize);
-      if (((long) nrBuffers * maxBufSize) < length) nrBuffers++;
+      if (((long) nrBuffers * maxBufSize) <= length) nrBuffers++;
       
       this.buffers = new ByteBuffer[nrBuffers];
       this.bufSizes = new int[nrBuffers];

Propchange: lucene/java/branches/lucene_3_0/src/test/org/apache/lucene/analysis/TestISOLatin1AccentFilter.java
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Fri Aug 27 22:36:38 2010
@@ -1,5 +1,5 @@
-/lucene/dev/branches/branch_3x/lucene/src/test/org/apache/lucene/analysis/TestISOLatin1AccentFilter.java:941394,946651,948430,957490,984210,988629
-/lucene/dev/trunk/lucene/src/test/org/apache/lucene/analysis/TestISOLatin1AccentFilter.java:929738,932398,935522,938989,939611,939649,940730,945420,946599,948082,948429,949288,949976,949997,950458,950613,951521,953407,963781,965103,984187
+/lucene/dev/branches/branch_3x/lucene/src/test/org/apache/lucene/analysis/TestISOLatin1AccentFilter.java:941394,946651,948430,957490,984210,988629,990286
+/lucene/dev/trunk/lucene/src/test/org/apache/lucene/analysis/TestISOLatin1AccentFilter.java:929738,932398,935522,938989,939611,939649,940730,945420,946599,948082,948429,949288,949976,949997,950458,950613,951521,953407,963781,965103,984187,990281
 /lucene/java/branches/lucene_2_4/src/test/org/apache/lucene/analysis/TestISOLatin1AccentFilter.java:748824
 /lucene/java/branches/lucene_2_9/src/test/org/apache/lucene/analysis/TestISOLatin1AccentFilter.java:825998,829134,829881,831036,896850,909334,940987,948516
 /lucene/java/trunk/src/test/org/apache/lucene/analysis/TestISOLatin1AccentFilter.java:881213,881315,881466,881819,882374,882672,882807,882888,882977,883074-883075,883554,884870,886257,886911,887347,887532,887602,887670,888247,889431-889432,889579,889866,890439,890967,890988,891189,891205,891209,891363,891377,893093,894348,897672,899627,900196,908477,908975,909360,909398,910034,910078,912407,915399,919060,920270

Propchange: lucene/java/branches/lucene_3_0/src/test/org/apache/lucene/document/TestDateTools.java
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Fri Aug 27 22:36:38 2010
@@ -1,5 +1,5 @@
-/lucene/dev/branches/branch_3x/lucene/src/test/org/apache/lucene/document/TestDateTools.java:941394,946651,948430,957490,984210,988629
-/lucene/dev/trunk/lucene/src/test/org/apache/lucene/document/TestDateTools.java:929738,932398,935522,938989,939611,939649,940730,945420,946599,948082,948429,949288,949976,949997,950458,950613,951521,953407,963781,965103,984187
+/lucene/dev/branches/branch_3x/lucene/src/test/org/apache/lucene/document/TestDateTools.java:941394,946651,948430,957490,984210,988629,990286
+/lucene/dev/trunk/lucene/src/test/org/apache/lucene/document/TestDateTools.java:929738,932398,935522,938989,939611,939649,940730,945420,946599,948082,948429,949288,949976,949997,950458,950613,951521,953407,963781,965103,984187,990281
 /lucene/java/branches/lucene_2_4/src/test/org/apache/lucene/document/TestDateTools.java:748824
 /lucene/java/branches/lucene_2_9/src/test/org/apache/lucene/document/TestDateTools.java:825998,829134,829881,831036,896850,909334,940987,948516
 /lucene/java/trunk/src/test/org/apache/lucene/document/TestDateTools.java:881213,881315,881466,881819,882374,882672,882807,882888,882977,883074-883075,883554,884870,886257,886911,887347,887532,887602,887670,888247,889431-889432,889579,889866,890439,890967,890988,891189,891205,891209,891363,891377,893093,894348,897672,899627,900196,908477,908975,909360,909398,910034,910078,912407,915399,919060,920270

Propchange: lucene/java/branches/lucene_3_0/src/test/org/apache/lucene/document/TestNumberTools.java
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Fri Aug 27 22:36:38 2010
@@ -1,5 +1,5 @@
-/lucene/dev/branches/branch_3x/lucene/src/test/org/apache/lucene/document/TestNumberTools.java:941394,946651,948430,957490,984210,988629
-/lucene/dev/trunk/lucene/src/test/org/apache/lucene/document/TestNumberTools.java:929738,932398,935522,938989,939611,939649,940730,945420,946599,948082,948429,949288,949976,949997,950458,950613,951521,953407,963781,965103,984187
+/lucene/dev/branches/branch_3x/lucene/src/test/org/apache/lucene/document/TestNumberTools.java:941394,946651,948430,957490,984210,988629,990286
+/lucene/dev/trunk/lucene/src/test/org/apache/lucene/document/TestNumberTools.java:929738,932398,935522,938989,939611,939649,940730,945420,946599,948082,948429,949288,949976,949997,950458,950613,951521,953407,963781,965103,984187,990281
 /lucene/java/branches/lucene_2_4/src/test/org/apache/lucene/document/TestNumberTools.java:748824
 /lucene/java/branches/lucene_2_9/src/test/org/apache/lucene/document/TestNumberTools.java:825998,829134,829881,831036,896850,909334,940987,948516
 /lucene/java/trunk/src/test/org/apache/lucene/document/TestNumberTools.java:881213,881315,881466,881819,882374,882672,882807,882888,882977,883074-883075,883554,884870,886257,886911,887347,887532,887602,887670,888247,889431-889432,889579,889866,890439,890967,890988,891189,891205,891209,891363,891377,893093,894348,897672,899627,900196,908477,908975,909360,909398,910034,910078,912407,915399,919060,920270

Propchange: lucene/java/branches/lucene_3_0/src/test/org/apache/lucene/index/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Fri Aug 27 22:36:38 2010
@@ -1,3 +1,3 @@
-/lucene/dev/branches/branch_3x/lucene/src/test/org/apache/lucene/index:941394,946651,957490,984210,988629
-/lucene/dev/trunk/lucene/src/test/org/apache/lucene/index:929738,935522,940730,948429,949288,949976,949997,950458,950613,951521,953407,963781,965103,984187
+/lucene/dev/branches/branch_3x/lucene/src/test/org/apache/lucene/index:941394,946651,957490,984210,988629,990286
+/lucene/dev/trunk/lucene/src/test/org/apache/lucene/index:929738,935522,940730,948429,949288,949976,949997,950458,950613,951521,953407,963781,965103,984187,990281
 /lucene/java/trunk/src/test/org/apache/lucene/index:887670,889579,889866,890439,891205,891377,920270

Propchange: lucene/java/branches/lucene_3_0/src/test/org/apache/lucene/index/TestBackwardsCompatibility.java
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Fri Aug 27 22:36:38 2010
@@ -1,5 +1,5 @@
-/lucene/dev/branches/branch_3x/lucene/src/test/org/apache/lucene/index/TestBackwardsCompatibility.java:941394,946651,948430,957490,984210,988629
-/lucene/dev/trunk/lucene/src/test/org/apache/lucene/index/TestBackwardsCompatibility.java:929738,932398,935522,938989,939611,939649,940730,945420,946599,948082,948429,949288,949976,949997,950458,950613,951521,953407,963781,965103,984187
+/lucene/dev/branches/branch_3x/lucene/src/test/org/apache/lucene/index/TestBackwardsCompatibility.java:941394,946651,948430,957490,984210,988629,990286
+/lucene/dev/trunk/lucene/src/test/org/apache/lucene/index/TestBackwardsCompatibility.java:929738,932398,935522,938989,939611,939649,940730,945420,946599,948082,948429,949288,949976,949997,950458,950613,951521,953407,963781,965103,984187,990281
 /lucene/java/branches/lucene_2_4/src/test/org/apache/lucene/index/TestBackwardsCompatibility.java:748824
 /lucene/java/branches/lucene_2_9/src/test/org/apache/lucene/index/TestBackwardsCompatibility.java:825998,829134,829881,831036,896850,909334,940987,948516
 /lucene/java/trunk/src/test/org/apache/lucene/index/TestBackwardsCompatibility.java:881213,881315,881466,881819,882374,882672,882807,882888,882977,883074-883075,883554,884870,886257,886911,887347,887532,887602,887670,888247,889431-889432,889579,889866,890439,890967,890988,891189,891205,891209,891363,891377,893093,894348,897672,899627,900196,908477,908975,909360,909398,910034,910078,912407,915399,919060,920270

Propchange: lucene/java/branches/lucene_3_0/src/test/org/apache/lucene/search/TestCachingWrapperFilter.java
------------------------------------------------------------------------------
--- svn:mergeinfo (added)
+++ svn:mergeinfo Fri Aug 27 22:36:38 2010
@@ -0,0 +1 @@
+/lucene/dev/trunk/lucene/src/test/org/apache/lucene/search/TestCachingWrapperFilter.java:990281

Propchange: lucene/java/branches/lucene_3_0/src/test/org/apache/lucene/search/spans/TestPayloadSpans.java
------------------------------------------------------------------------------
--- svn:mergeinfo (added)
+++ svn:mergeinfo Fri Aug 27 22:36:38 2010
@@ -0,0 +1 @@
+/lucene/dev/trunk/lucene/src/test/org/apache/lucene/search/spans/TestPayloadSpans.java:990281

Propchange: lucene/java/branches/lucene_3_0/src/test/org/apache/lucene/search/spans/TestSpans.java
------------------------------------------------------------------------------
--- svn:mergeinfo (added)
+++ svn:mergeinfo Fri Aug 27 22:36:38 2010
@@ -0,0 +1 @@
+/lucene/dev/trunk/lucene/src/test/org/apache/lucene/search/spans/TestSpans.java:990281

Copied: lucene/java/branches/lucene_3_0/src/test/org/apache/lucene/store/TestMultiMMap.java
(from r990286, lucene/dev/branches/branch_3x/lucene/src/test/org/apache/lucene/store/TestMultiMMap.java)
URL: http://svn.apache.org/viewvc/lucene/java/branches/lucene_3_0/src/test/org/apache/lucene/store/TestMultiMMap.java?p2=lucene/java/branches/lucene_3_0/src/test/org/apache/lucene/store/TestMultiMMap.java&p1=lucene/dev/branches/branch_3x/lucene/src/test/org/apache/lucene/store/TestMultiMMap.java&r1=990286&r2=990293&rev=990293&view=diff
==============================================================================
--- lucene/dev/branches/branch_3x/lucene/src/test/org/apache/lucene/store/TestMultiMMap.java
(original)
+++ lucene/java/branches/lucene_3_0/src/test/org/apache/lucene/store/TestMultiMMap.java Fri
Aug 27 22:36:38 2010
@@ -20,10 +20,11 @@ package org.apache.lucene.store;
 import java.io.File;
 import java.util.Random;
 
+import org.apache.lucene.analysis.WhitespaceAnalyzer;
 import org.apache.lucene.document.Document;
 import org.apache.lucene.document.Field;
 import org.apache.lucene.index.IndexReader;
-import org.apache.lucene.index.RandomIndexWriter;
+import org.apache.lucene.index.IndexWriter;
 import org.apache.lucene.util.LuceneTestCase;
 import org.apache.lucene.util._TestUtil;
 
@@ -46,8 +47,8 @@ public class TestMultiMMap extends Lucen
   
   public void testRandomChunkSizes() throws Exception {
     Random random = newRandom();
-    for (int i = 0; i < 10*RANDOM_MULTIPLIER; i++)
-      assertChunking(random, _TestUtil.nextInt(random, 1, 1000*RANDOM_MULTIPLIER));
+    for (int i = 0; i < 10; i++)
+      assertChunking(random, nextInt(random, 10, 100));
   }
   
   private void assertChunking(Random random, int chunkSize) throws Exception {
@@ -59,23 +60,26 @@ public class TestMultiMMap extends Lucen
     // we will map a lot, try to turn on the unmap hack
     if (MMapDirectory.UNMAP_SUPPORTED)
       dir.setUseUnmap(true);
-    RandomIndexWriter writer = new RandomIndexWriter(random, dir);
+    IndexWriter writer = new IndexWriter(dir, new WhitespaceAnalyzer(), IndexWriter.MaxFieldLength.UNLIMITED);
+    writer.setMaxBufferedDocs(nextInt(random, 100, 1000));
     Document doc = new Document();
     Field docid = new Field("docid", "0", Field.Store.YES, Field.Index.NOT_ANALYZED);
     Field junk = new Field("junk", "", Field.Store.YES, Field.Index.NOT_ANALYZED);
     doc.add(docid);
     doc.add(junk);
     
-    int numDocs = 1000*RANDOM_MULTIPLIER;
+    int numDocs = 1000;
     for (int i = 0; i < numDocs; i++) {
       docid.setValue("" + i);
-      junk.setValue(_TestUtil.randomUnicodeString(random));
+      junk.setValue(randomUnicodeString(random));
       writer.addDocument(doc);
     }
-    IndexReader reader = writer.getReader();
+    writer.optimize();
     writer.close();
     
-    int numAsserts = 100*RANDOM_MULTIPLIER;
+    IndexReader reader = IndexReader.open(dir, true);
+    
+    int numAsserts = 100;
     for (int i = 0; i < numAsserts; i++) {
       int docID = random.nextInt(numDocs);
       assertEquals("" + docID, reader.document(docID).get("docid"));
@@ -83,4 +87,39 @@ public class TestMultiMMap extends Lucen
     reader.close();
     dir.close();
   }
+  
+  /** start and end are BOTH inclusive */
+  public static int nextInt(Random r, int start, int end) {
+    return start + r.nextInt(end-start+1);
+  }
+
+  /** Returns random string, including full unicode range. */
+  public static String randomUnicodeString(Random r) {
+    return randomUnicodeString(r, 20);
+  }
+
+  public static String randomUnicodeString(Random r, int maxLength) {
+    final int end = r.nextInt(maxLength);
+    if (end == 0) {
+      // allow 0 length
+      return "";
+    }
+    final char[] buffer = new char[end];
+    for (int i = 0; i < end; i++) {
+      int t = r.nextInt(5);
+
+      if (0 == t && i < end - 1) {
+        // Make a surrogate pair
+        // High surrogate
+        buffer[i++] = (char) nextInt(r, 0xd800, 0xdbff);
+        // Low surrogate
+        buffer[i] = (char) nextInt(r, 0xdc00, 0xdfff);
+      }
+      else if (t <= 1) buffer[i] = (char) r.nextInt(0x80);
+      else if (2 == t) buffer[i] = (char) nextInt(r, 0x80, 0x800);
+      else if (3 == t) buffer[i] = (char) nextInt(r, 0x800, 0xd7ff);
+      else if (4 == t) buffer[i] = (char) nextInt(r, 0xe000, 0xffff);
+    }
+    return new String(buffer, 0, end);
+  }
 }

Propchange: lucene/java/branches/lucene_3_0/src/test/org/apache/lucene/util/TestAttributeSource.java
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Fri Aug 27 22:36:38 2010
@@ -1,5 +1,5 @@
-/lucene/dev/branches/branch_3x/lucene/src/test/org/apache/lucene/util/TestAttributeSource.java:941394,946651,948430,957490,984210,988629
-/lucene/dev/trunk/lucene/src/test/org/apache/lucene/util/TestAttributeSource.java:929738,932398,935522,938989,939611,939649,940730,945420,946599,948082,948429,949288,949976,949997,950458,950613,951521,953407,963781,965103,984187
+/lucene/dev/branches/branch_3x/lucene/src/test/org/apache/lucene/util/TestAttributeSource.java:941394,946651,948430,957490,984210,988629,990286
+/lucene/dev/trunk/lucene/src/test/org/apache/lucene/util/TestAttributeSource.java:929738,932398,935522,938989,939611,939649,940730,945420,946599,948082,948429,949288,949976,949997,950458,950613,951521,953407,963781,965103,984187,990281
 /lucene/java/branches/lucene_2_4/src/test/org/apache/lucene/util/TestAttributeSource.java:748824
 /lucene/java/branches/lucene_2_9/src/test/org/apache/lucene/util/TestAttributeSource.java:817269-818600,825998,829134,829881,831036,896850,909334,940987,948516
 /lucene/java/branches/lucene_2_9_back_compat_tests/src/test/org/apache/lucene/util/TestAttributeSource.java:818601-821336



Mime
View raw message