lucene-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rm...@apache.org
Subject svn commit: r1641973 - in /lucene/dev/branches/branch_5x: ./ lucene/ lucene/test-framework/ lucene/test-framework/src/java/org/apache/lucene/index/ lucene/test-framework/src/java/org/apache/lucene/store/ lucene/test-framework/src/java/org/apache/lucene...
Date Thu, 27 Nov 2014 00:46:01 GMT
Author: rmuir
Date: Thu Nov 27 00:46:01 2014
New Revision: 1641973

URL: http://svn.apache.org/r1641973
Log:
more test speedups

Modified:
    lucene/dev/branches/branch_5x/   (props changed)
    lucene/dev/branches/branch_5x/lucene/   (props changed)
    lucene/dev/branches/branch_5x/lucene/test-framework/   (props changed)
    lucene/dev/branches/branch_5x/lucene/test-framework/src/java/org/apache/lucene/index/BaseIndexFileFormatTestCase.java
    lucene/dev/branches/branch_5x/lucene/test-framework/src/java/org/apache/lucene/store/MockDirectoryWrapper.java
    lucene/dev/branches/branch_5x/lucene/test-framework/src/java/org/apache/lucene/util/LuceneTestCase.java
    lucene/dev/branches/branch_5x/lucene/test-framework/src/java/org/apache/lucene/util/ThrottledIndexOutput.java

Modified: lucene/dev/branches/branch_5x/lucene/test-framework/src/java/org/apache/lucene/index/BaseIndexFileFormatTestCase.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_5x/lucene/test-framework/src/java/org/apache/lucene/index/BaseIndexFileFormatTestCase.java?rev=1641973&r1=1641972&r2=1641973&view=diff
==============================================================================
--- lucene/dev/branches/branch_5x/lucene/test-framework/src/java/org/apache/lucene/index/BaseIndexFileFormatTestCase.java
(original)
+++ lucene/dev/branches/branch_5x/lucene/test-framework/src/java/org/apache/lucene/index/BaseIndexFileFormatTestCase.java
Thu Nov 27 00:46:01 2014
@@ -211,6 +211,7 @@ abstract class BaseIndexFileFormatTestCa
   }
 
   /** Test the accuracy of the ramBytesUsed estimations. */
+  @Slow
   public void testRamBytesUsed() throws IOException {
     if (Codec.getDefault() instanceof RandomCodec) {
       // this test relies on the fact that two segments will be written with

Modified: lucene/dev/branches/branch_5x/lucene/test-framework/src/java/org/apache/lucene/store/MockDirectoryWrapper.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_5x/lucene/test-framework/src/java/org/apache/lucene/store/MockDirectoryWrapper.java?rev=1641973&r1=1641972&r2=1641973&view=diff
==============================================================================
--- lucene/dev/branches/branch_5x/lucene/test-framework/src/java/org/apache/lucene/store/MockDirectoryWrapper.java
(original)
+++ lucene/dev/branches/branch_5x/lucene/test-framework/src/java/org/apache/lucene/store/MockDirectoryWrapper.java
Thu Nov 27 00:46:01 2014
@@ -127,7 +127,7 @@ public class MockDirectoryWrapper extend
     // not be reproducible from the original seed
     this.randomState = new Random(random.nextInt());
     this.throttledOutput = new ThrottledIndexOutput(ThrottledIndexOutput
-        .mBitsToBytes(40 + randomState.nextInt(10)), 5 + randomState.nextInt(5), null);
+        .mBitsToBytes(40 + randomState.nextInt(10)), 1 + randomState.nextInt(5), null);
     init();
   }
 
@@ -180,7 +180,7 @@ public class MockDirectoryWrapper extend
   public static enum Throttling {
     /** always emulate a slow hard disk. could be very slow! */
     ALWAYS,
-    /** sometimes (2% of the time) emulate a slow hard disk. */
+    /** sometimes (0.5% of the time) emulate a slow hard disk. */
     SOMETIMES,
     /** never throttle output */
     NEVER

Modified: lucene/dev/branches/branch_5x/lucene/test-framework/src/java/org/apache/lucene/util/LuceneTestCase.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_5x/lucene/test-framework/src/java/org/apache/lucene/util/LuceneTestCase.java?rev=1641973&r1=1641972&r2=1641973&view=diff
==============================================================================
--- lucene/dev/branches/branch_5x/lucene/test-framework/src/java/org/apache/lucene/util/LuceneTestCase.java
(original)
+++ lucene/dev/branches/branch_5x/lucene/test-framework/src/java/org/apache/lucene/util/LuceneTestCase.java
Thu Nov 27 00:46:01 2014
@@ -1315,7 +1315,7 @@ public abstract class LuceneTestCase ext
     }
     
     if (rarely(random) && !bare) { 
-      final double maxMBPerSec = 10 + 5*(random.nextDouble()-0.5);
+      final double maxMBPerSec = TestUtil.nextInt(random, 20, 40);
       if (LuceneTestCase.VERBOSE) {
         System.out.println("LuceneTestCase: will rate limit output IndexOutput to " + maxMBPerSec
+ " MB/sec");
       }

Modified: lucene/dev/branches/branch_5x/lucene/test-framework/src/java/org/apache/lucene/util/ThrottledIndexOutput.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_5x/lucene/test-framework/src/java/org/apache/lucene/util/ThrottledIndexOutput.java?rev=1641973&r1=1641972&r2=1641973&view=diff
==============================================================================
--- lucene/dev/branches/branch_5x/lucene/test-framework/src/java/org/apache/lucene/util/ThrottledIndexOutput.java
(original)
+++ lucene/dev/branches/branch_5x/lucene/test-framework/src/java/org/apache/lucene/util/ThrottledIndexOutput.java
Thu Nov 27 00:46:01 2014
@@ -53,7 +53,7 @@ public class ThrottledIndexOutput extend
   }
 
   public static final int mBitsToBytes(int mbits) {
-    return mbits * 125000;
+    return mbits * 125000000;
   }
 
   public ThrottledIndexOutput(int bytesPerSecond, long flushDelayMillis,



Mime
View raw message