lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Uwe Schindler" <...@thetaphi.de>
Subject RE: LuceneJUnitResultFormatter sometimes fails to lock
Date Thu, 29 Apr 2010 09:17:31 GMT
A possibility to get something that does not depend on Date/Time and so on:
ManagementFactory.getRuntimeMXBean().getName()

This returns a unique identifier of the running Java VM. On most platforms, this contains
the process ID. Maybe we should use this as an additional information for the test file name.
As it's an String and may contain incompatible chars for a filename, maybe use the hashCode()
of the returned String.

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


> -----Original Message-----
> From: Michael McCandless [mailto:lucene@mikemccandless.com]
> Sent: Thursday, April 29, 2010 12:01 PM
> To: dev@lucene.apache.org
> Subject: Re: LuceneJUnitResultFormatter sometimes fails to lock
> 
> On Wed, Apr 28, 2010 at 1:52 PM, Shai Erera <serera@gmail.com> wrote:
> > I use 1.6.0_18.
> >
> > Maybe seeding w/ System.nanoTime() will help, but don't you think
> > NativeFSLock should be more robust anyway? Even for the regular lock
> > file this can happen if at the same time delete() is attempted the
> > file is held by another process ...
> 
> Oh definitely -- I think we should do both (fix the random seeding &
> the robustness fixes).
> 
> Mike
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
> For additional commands, e-mail: dev-help@lucene.apache.org



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


Mime
View raw message