JDK 9 RFR of JDK-8078334: Mark regression tests using randomness

joe darcy joe.darcy at oracle.com
Wed Apr 22 17:02:57 UTC 2015

Hi Daniel,

On 4/22/2015 1:31 AM, Daniel Fuchs wrote:
> On 22/04/15 04:13, Joseph D. Darcy wrote:
>> One goal of marking the tests using randomness is to help root out some
>> remaining intermittent test failures. If one of the randomness tests is
>> observed to fail intermittently, if it has not already been updated to
>> print out the random seed and be able to accept a particular seed when
>> run, the test should be so modified so that future failures can log the
>> seed value in hopes of reproducing the failure.
> Hi Joe,
> The following logging tests use UUID.randomUUID() to generate
> a 'unique' file name in order to avoid possible collision if
> these tests are run concurrently or if some files have been
> left over from a previous run (some of these use %t - the temporary
> directory - which has been known to cause intermittent
> failure in those cases).
> So I believe that removing randomness, or attempting to
> make it predictable, would in those specific cases make
> those tests more prone to intermittent failures.
> In this light - should these tests still be tagged with
> the @randomness keyword?
> test/java/util/logging/CheckZombieLockTest.java
> test/java/util/logging/FileHandlerLongLimit.java
> test/java/util/logging/FileHandlerPath.java
> test/java/util/logging/FileHandlerPatternExceptions.java
> test/java/util/logging/LogManager/Configuration/ParentLoggerWithHandlerGC.java 

The randomness label is just meant to be documentation and not 
pejorative. Its uses in the tests you identify it is more likely to 
increase rather than decrease stability. However, I still think it is 
appropriate to mark these tests for their behavior.



More information about the security-dev mailing list