lucene-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mikemcc...@apache.org
Subject svn commit: r1641432 - in /lucene/dev/trunk: ./ lucene/ lucene/core/ lucene/core/src/test/org/apache/lucene/index/TestIndexWriterOutOfMemory.java
Date Mon, 24 Nov 2014 17:57:42 GMT
Author: mikemccand
Date: Mon Nov 24 17:57:42 2014
New Revision: 1641432

URL: http://svn.apache.org/r1641432
Log:
make test less evil

Modified:
    lucene/dev/trunk/   (props changed)
    lucene/dev/trunk/lucene/   (props changed)
    lucene/dev/trunk/lucene/core/   (props changed)
    lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/TestIndexWriterOutOfMemory.java

Modified: lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/TestIndexWriterOutOfMemory.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/TestIndexWriterOutOfMemory.java?rev=1641432&r1=1641431&r2=1641432&view=diff
==============================================================================
--- lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/TestIndexWriterOutOfMemory.java
(original)
+++ lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/TestIndexWriterOutOfMemory.java
Mon Nov 24 17:57:42 2014
@@ -38,13 +38,13 @@ import org.apache.lucene.document.Sorted
 import org.apache.lucene.document.StoredField;
 import org.apache.lucene.document.TextField;
 import org.apache.lucene.store.AlreadyClosedException;
-import org.apache.lucene.store.MockDirectoryWrapper;
 import org.apache.lucene.store.MockDirectoryWrapper.Failure;
+import org.apache.lucene.store.MockDirectoryWrapper;
 import org.apache.lucene.util.BytesRef;
 import org.apache.lucene.util.IOUtils;
 import org.apache.lucene.util.LuceneTestCase;
-import org.apache.lucene.util.TestUtil;
 import org.apache.lucene.util.Rethrow;
+import org.apache.lucene.util.TestUtil;
 import org.junit.Ignore;
 
 /** 
@@ -77,7 +77,7 @@ public class TestIndexWriterOutOfMemory 
     
     MockDirectoryWrapper dir = null;
     
-    final int numIterations = TEST_NIGHTLY ? atLeast(500) : atLeast(20);
+    final int numIterations = TEST_NIGHTLY ? atLeast(100) : atLeast(20);
     
     STARTOVER:
     for (int iter = 0; iter < numIterations; iter++) {
@@ -253,8 +253,7 @@ public class TestIndexWriterOutOfMemory 
     doTest(new Failure() {
       @Override
       public void eval(MockDirectoryWrapper dir) throws IOException {
-        Exception e = new Exception();
-        StackTraceElement stack[] = e.getStackTrace();
+        StackTraceElement stack[] = Thread.currentThread().getStackTrace();
         boolean ok = false;
         for (int i = 0; i < stack.length; i++) {
           if (stack[i].getClassName().equals(IndexFileDeleter.class.getName()) &&
stack[i].getMethodName().equals("checkpoint")) {



Mime
View raw message