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: [email protected]


> -----Original Message-----
> From: Michael McCandless [mailto:[email protected]]
> Sent: Thursday, April 29, 2010 12:01 PM
> To: [email protected]
> Subject: Re: LuceneJUnitResultFormatter sometimes fails to lock
> 
> On Wed, Apr 28, 2010 at 1:52 PM, Shai Erera <[email protected]> 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: [email protected]
> For additional commands, e-mail: [email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to