lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Uwe Schindler" <...@thetaphi.de>
Subject RE: svn commit: r1392999 - /lucene/dev/branches/lucene4456/lucene/core/src/test/org/apache/lucene/index/TestDirectoryReader.java
Date Tue, 02 Oct 2012 16:09:54 GMT
Maybe make a static method in TestUtil or LTC:

static void setAssertNoUnrefencedFilesOnClose(Directory dir, boolean b) {
    if (dir instanceof MockDirectoryWrapper) {
      ((MockDirectoryWrapper)dir).setAssertNoUnrefencedFilesOnClose(b);
    }
}

-----
Uwe Schindler
H.-H.-Meier-Allee 63, D-28213 Bremen
http://www.thetaphi.de
eMail: uwe@thetaphi.de


> -----Original Message-----
> From: rmuir@apache.org [mailto:rmuir@apache.org]
> Sent: Tuesday, October 02, 2012 6:00 PM
> To: commits@lucene.apache.org
> Subject: svn commit: r1392999 -
> /lucene/dev/branches/lucene4456/lucene/core/src/test/org/apache/lucene/ind
> ex/TestDirectoryReader.java
> 
> Author: rmuir
> Date: Tue Oct  2 16:00:27 2012
> New Revision: 1392999
> 
> URL: http://svn.apache.org/viewvc?rev=1392999&view=rev
> Log:
> fix test
> 
> Modified:
> 
> lucene/dev/branches/lucene4456/lucene/core/src/test/org/apache/lucene/ind
> ex/TestDirectoryReader.java
> 
> Modified:
> lucene/dev/branches/lucene4456/lucene/core/src/test/org/apache/lucene/ind
> ex/TestDirectoryReader.java
> URL:
> http://svn.apache.org/viewvc/lucene/dev/branches/lucene4456/lucene/core/sr
> c/test/org/apache/lucene/index/TestDirectoryReader.java?rev=1392999&r1=1
> 392998&r2=1392999&view=diff
> ================================================================
> ==============
> ---
> lucene/dev/branches/lucene4456/lucene/core/src/test/org/apache/lucene/ind
> ex/TestDirectoryReader.java (original)
> +++ lucene/dev/branches/lucene4456/lucene/core/src/test/org/apache/lucen
> +++ e/index/TestDirectoryReader.java Tue Oct  2 16:00:27 2012
> @@ -39,6 +39,7 @@ import org.apache.lucene.index.IndexWrit  import
> org.apache.lucene.search.DocIdSetIterator;
>  import org.apache.lucene.search.FieldCache;
>  import org.apache.lucene.store.Directory;
> +import org.apache.lucene.store.MockDirectoryWrapper;
>  import org.apache.lucene.store.NoSuchDirectoryException;
>  import org.apache.lucene.util.Bits;
>  import org.apache.lucene.util.BytesRef; @@ -897,6 +898,9 @@ public void
> testFilesOpenClose() throws
>    // LUCENE-2753
>    public void testListCommits() throws Exception {
>      Directory dir = newDirectory();
> +    if (dir instanceof MockDirectoryWrapper) {
> +      ((MockDirectoryWrapper)dir).setAssertNoUnrefencedFilesOnClose(false);
> +    }
>      SnapshotDeletionPolicy sdp = new SnapshotDeletionPolicy(new
> KeepOnlyLastCommitDeletionPolicy());
>      IndexWriter writer = new IndexWriter(dir, newIndexWriterConfig(
>          TEST_VERSION_CURRENT, null).setIndexDeletionPolicy(sdp));



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org


Mime
View raw message