JDK 9 RFR of JDK-8078334: Mark regression tests using randomness
Alan.Bateman at oracle.com
Fri Apr 24 05:58:09 UTC 2015
On 24/04/2015 02:54, Joseph D. Darcy wrote:
> Any additional comments on marking with tests in question with a
> "randomness" keyword?
I don't object to this keyword although I should say that most of the
(apparent) randomness that I've seen hasn't been because of tests using
Random but rather because of non-deterministic sequence of tests running
in the same VM. The switch from othervm to agentvm a few years ago took
a long time to weed out issues, same thing (even more) with
-concurrency. Another source of apparent randomness is just having a
large pool of machines and where machines are randomly selected to
execute the tests.
I agree with your comments that tests using Random should have report
the seed and a have a way to re-run with the same value. It could help
with some cases.
One thing that isn't clear to me is how this keyword will be maintained.
If I modify a test and replace the use of Random then I guess I need to
remember to also remove this label. When I add a test that uses Random
... Just wondering if there is a tool to do the tests analysis,
identify the use of specific APIs ,and help identify where the keyword
might be missing or not needed.
More information about the core-libs-dev