ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/jsr166/jsr166/src/test/tck/ThreadLocalRandom8Test.java
(Generate patch)

Comparing jsr166/src/test/tck/ThreadLocalRandom8Test.java (file contents):
Revision 1.10 by jsr166, Fri Nov 11 18:12:43 2016 UTC vs.
Revision 1.11 by jsr166, Fri Nov 11 19:01:28 2016 UTC

# Line 237 | Line 237 | public class ThreadLocalRandom8Test exte
237       * ThreadLocalRandom.current()
238       */
239      public void testSerialization() {
240 <        assertSame(ThreadLocalRandom.current(),
241 <                   serialClone(ThreadLocalRandom.current()));
240 >        assertSame(
241 >            ThreadLocalRandom.current(),
242 >            serialClone(ThreadLocalRandom.current()));
243 >        // In the current implementation, there is exactly one shared instance
244 >        if (testImplementationDetails)
245 >            assertSame(
246 >                ThreadLocalRandom.current(),
247 >                java.util.concurrent.CompletableFuture.supplyAsync(
248 >                    () -> serialClone(ThreadLocalRandom.current())).join());
249      }
250  
251   }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines