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.12 by jsr166, Fri Aug 4 03:30:21 2017 UTC

# Line 233 | Line 233 | public class ThreadLocalRandom8Test exte
233      }
234  
235      /**
236 <     * A deserialized ThreadLocalRandom is always identical to
237 <     * ThreadLocalRandom.current()
236 >     * A deserialized/reserialized ThreadLocalRandom is always
237 >     * identical to 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