You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@lucene.apache.org by Clemens Wyss DEV <cl...@mysign.ch> on 2012/12/09 17:45:37 UTC

Lucene (4.0), junit, failed to delete _0_nrm.cfs

I am (also) running lucene unit tests.

In the teardown-method(@After) I (try to) delete the complete directory-folder. Unfortunately this does not always work. If not, the file _0_nrm.cfs (or _0.fdx) is the first to cause problems, i.e. is being "locked"...
I do explicitly close the writers/readers and the directory itself. I even tried to unlock the directory.

What else could be "sitting" on the directory?

AW: Lucene (4.0), junit, failed to delete _0_nrm.cfs

Posted by Clemens Wyss DEV <cl...@mysign.ch>.
Thanks for the advise. I'll gibe it a try

-----Ursprüngliche Nachricht-----
Von: Robert Muir [mailto:rcmuir@gmail.com] 
Gesendet: Sonntag, 9. Dezember 2012 18:32
An: java-user@lucene.apache.org
Betreff: Re: Lucene (4.0), junit, failed to delete _0_nrm.cfs

Maybe get lucene-test-framework.jar, and extends LuceneTestCase, using newDirectory and so on.

if you have files still open this will fail the test and give you a stacktrace of where you initially opened the file.

On Sun, Dec 9, 2012 at 12:28 PM, Clemens Wyss DEV <cl...@mysign.ch>wrote:

> Hi Mike,
> unfortunately not. When I run the unit tests one by one they succeed. 
> But not when I run all tests of the test class.
>
> - Clemens
>
> -----Ursprüngliche Nachricht-----
> Von: Michael McCandless [mailto:lucene@mikemccandless.com]
> Gesendet: Sonntag, 9. Dezember 2012 18:13
> An: java-user@lucene.apache.org
> Betreff: Re: Lucene (4.0), junit, failed to delete _0_nrm.cfs
>
> Can you post the source code for your test case?
>
> Mike McCandless
>
> http://blog.mikemccandless.com
>
> On Sun, Dec 9, 2012 at 11:45 AM, Clemens Wyss DEV 
> <cl...@mysign.ch>
> wrote:
> > I am (also) running lucene unit tests.
> >
> > In the teardown-method(@After) I (try to) delete the complete
> directory-folder. Unfortunately this does not always work. If not, the 
> file _0_nrm.cfs (or _0.fdx) is the first to cause problems, i.e. is 
> being "locked"...
> > I do explicitly close the writers/readers and the directory itself. 
> > I
> even tried to unlock the directory.
> >
> > What else could be "sitting" on the directory?
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-user-help@lucene.apache.org
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-user-help@lucene.apache.org
>
>

Re: Lucene (4.0), junit, failed to delete _0_nrm.cfs

Posted by Robert Muir <rc...@gmail.com>.
Maybe get lucene-test-framework.jar, and extends LuceneTestCase, using
newDirectory and so on.

if you have files still open this will fail the test and give you a
stacktrace of where you initially opened the file.

On Sun, Dec 9, 2012 at 12:28 PM, Clemens Wyss DEV <cl...@mysign.ch>wrote:

> Hi Mike,
> unfortunately not. When I run the unit tests one by one they succeed. But
> not when I run all tests of the test class.
>
> - Clemens
>
> -----Ursprüngliche Nachricht-----
> Von: Michael McCandless [mailto:lucene@mikemccandless.com]
> Gesendet: Sonntag, 9. Dezember 2012 18:13
> An: java-user@lucene.apache.org
> Betreff: Re: Lucene (4.0), junit, failed to delete _0_nrm.cfs
>
> Can you post the source code for your test case?
>
> Mike McCandless
>
> http://blog.mikemccandless.com
>
> On Sun, Dec 9, 2012 at 11:45 AM, Clemens Wyss DEV <cl...@mysign.ch>
> wrote:
> > I am (also) running lucene unit tests.
> >
> > In the teardown-method(@After) I (try to) delete the complete
> directory-folder. Unfortunately this does not always work. If not, the file
> _0_nrm.cfs (or _0.fdx) is the first to cause problems, i.e. is being
> "locked"...
> > I do explicitly close the writers/readers and the directory itself. I
> even tried to unlock the directory.
> >
> > What else could be "sitting" on the directory?
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-user-help@lucene.apache.org
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-user-help@lucene.apache.org
>
>

AW: Lucene (4.0), junit, failed to delete _0_nrm.cfs

Posted by Clemens Wyss DEV <cl...@mysign.ch>.
Hi Mike,
unfortunately not. When I run the unit tests one by one they succeed. But not when I run all tests of the test class.

- Clemens

-----Ursprüngliche Nachricht-----
Von: Michael McCandless [mailto:lucene@mikemccandless.com] 
Gesendet: Sonntag, 9. Dezember 2012 18:13
An: java-user@lucene.apache.org
Betreff: Re: Lucene (4.0), junit, failed to delete _0_nrm.cfs

Can you post the source code for your test case?

Mike McCandless

http://blog.mikemccandless.com

On Sun, Dec 9, 2012 at 11:45 AM, Clemens Wyss DEV <cl...@mysign.ch> wrote:
> I am (also) running lucene unit tests.
>
> In the teardown-method(@After) I (try to) delete the complete directory-folder. Unfortunately this does not always work. If not, the file _0_nrm.cfs (or _0.fdx) is the first to cause problems, i.e. is being "locked"...
> I do explicitly close the writers/readers and the directory itself. I even tried to unlock the directory.
>
> What else could be "sitting" on the directory?

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


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


Re: Lucene (4.0), junit, failed to delete _0_nrm.cfs

Posted by Michael McCandless <lu...@mikemccandless.com>.
Can you post the source code for your test case?

Mike McCandless

http://blog.mikemccandless.com

On Sun, Dec 9, 2012 at 11:45 AM, Clemens Wyss DEV <cl...@mysign.ch> wrote:
> I am (also) running lucene unit tests.
>
> In the teardown-method(@After) I (try to) delete the complete directory-folder. Unfortunately this does not always work. If not, the file _0_nrm.cfs (or _0.fdx) is the first to cause problems, i.e. is being "locked"...
> I do explicitly close the writers/readers and the directory itself. I even tried to unlock the directory.
>
> What else could be "sitting" on the directory?

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