18 |
|
return new TestSuite(ThreadLocalRandomTest.class); |
19 |
|
} |
20 |
|
|
21 |
< |
/** |
21 |
> |
/* |
22 |
|
* Testing coverage notes: |
23 |
|
* |
24 |
|
* We don't test randomness properties, but only that repeated |
271 |
|
public void realRun() { |
272 |
|
ThreadLocalRandom current = ThreadLocalRandom.current(); |
273 |
|
assertSame(current, ThreadLocalRandom.current()); |
274 |
< |
assertNotSame(current, threadLocalRandom.get()); |
274 |
> |
// test bug: the following is not guaranteed and not true in JDK8 |
275 |
> |
// assertNotSame(current, threadLocalRandom.get()); |
276 |
|
rand.set(current.nextLong()); |
277 |
|
threadLocalRandom.set(current); |
278 |
|
}}; |