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

Amy Lu amy.lu at oracle.com
Wed Apr 22 11:19:39 UTC 2015


On 4/22/15 4:31 PM, 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 
>
>
>
> best regards,
>
> -- daniel

I notice similar case in below tests:

test/java/util/zip/ZipFile/FinalizeZipFile.java
     Test need some zip file to test on. Random is used to generate the 
zip file name.
test/java/util/zip/ZipFile/ReadZip.java
     Random is used to generate a non-existing file name for negative test

@randomness might not needed for following tests where test need a zip 
file to test on, and Random is used to fill some content to the file in 
createZipFile().

test/java/util/zip/ZipFile/MultiThreadedReadTest.java
test/java/util/zip/ZipFile/ClearStaleZipFileInputStreams.java


Thanks,
Amy


More information about the security-dev mailing list