lucene-java-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mikemcc...@apache.org
Subject svn commit: r889909 - /lucene/java/branches/lucene_3_0_back_compat_tests/src/test/org/apache/lucene/index/TestIndexWriter.java
Date Sat, 12 Dec 2009 10:04:45 GMT
Author: mikemccand
Date: Sat Dec 12 10:04:44 2009
New Revision: 889909

URL: http://svn.apache.org/viewvc?rev=889909&view=rev
Log:
fix false positive test failure

Modified:
    lucene/java/branches/lucene_3_0_back_compat_tests/src/test/org/apache/lucene/index/TestIndexWriter.java

Modified: lucene/java/branches/lucene_3_0_back_compat_tests/src/test/org/apache/lucene/index/TestIndexWriter.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/lucene_3_0_back_compat_tests/src/test/org/apache/lucene/index/TestIndexWriter.java?rev=889909&r1=889908&r2=889909&view=diff
==============================================================================
--- lucene/java/branches/lucene_3_0_back_compat_tests/src/test/org/apache/lucene/index/TestIndexWriter.java
(original)
+++ lucene/java/branches/lucene_3_0_back_compat_tests/src/test/org/apache/lucene/index/TestIndexWriter.java
Sat Dec 12 10:04:44 2009
@@ -2331,6 +2331,12 @@
       fail("did not hit disk full");
     } catch (IOException ioe) {
     }
+
+    // Make sure once disk space is avail again, we can
+    // cleanly close:
+    dir.setMaxSizeInBytes(0);
+    writer.close(false);
+    dir.close();
   }
 
   // LUCENE-1130: make sure immediate disk full on creating
@@ -2366,11 +2372,10 @@
         assertTrue("hit unexpected Throwable", threads[i].error == null);
       }
 
-      try {
-        writer.close(false);
-      } catch (IOException ioe) {
-      }
-
+      // Make sure once disk space is avail again, we can
+      // cleanly close:
+      dir.setMaxSizeInBytes(0);
+      writer.close(false);
       dir.close();
     }
   }



Mime
View raw message