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

Comparing jsr166/src/test/tck/ForkJoinTask8Test.java (file contents):
Revision 1.19 by dl, Mon Oct 5 22:59:29 2015 UTC vs.
Revision 1.21 by jsr166, Tue Oct 6 05:56:01 2015 UTC

# Line 126 | Line 126 | public class ForkJoinTask8Test extends J
126  
127          {
128              Thread.currentThread().interrupt();
129 <            long t0 = System.nanoTime();
129 >            long startTime = System.nanoTime();
130              assertSame(expected, a.join());
131 <            assertTrue(millisElapsedSince(t0) < SMALL_DELAY_MS);
131 >            assertTrue(millisElapsedSince(startTime) < SMALL_DELAY_MS);
132              Thread.interrupted();
133          }
134  
135          {
136              Thread.currentThread().interrupt();
137 <            long t0 = System.nanoTime();
137 >            long startTime = System.nanoTime();
138              a.quietlyJoin();        // should be no-op
139 <            assertTrue(millisElapsedSince(t0) < SMALL_DELAY_MS);
139 >            assertTrue(millisElapsedSince(startTime) < SMALL_DELAY_MS);
140              Thread.interrupted();
141          }
142  
# Line 172 | Line 172 | public class ForkJoinTask8Test extends J
172          Thread.interrupted();
173  
174          {
175 <            long t0 = System.nanoTime();
175 >            long startTime = System.nanoTime();
176              a.quietlyJoin();        // should be no-op
177 <            assertTrue(millisElapsedSince(t0) < SMALL_DELAY_MS);
177 >            assertTrue(millisElapsedSince(startTime) < SMALL_DELAY_MS);
178          }
179  
180          try {
# Line 1163 | Line 1163 | public class ForkJoinTask8Test extends J
1163          final ForkJoinTask b = ForkJoinTask.adapt(awaiter(done));
1164          final ForkJoinTask c = ForkJoinTask.adapt(awaiter(done));
1165          final ForkJoinPool p = singletonPool();
1166 <        try (PoolCleaner cleaner = cleaner(p)) {
1166 >        try (PoolCleaner cleaner = cleaner(p, done)) {
1167              Thread external = new Thread(new CheckedRunnable() {
1168                  public void realRun() {
1169                      p.execute(a);
# Line 1185 | Line 1185 | public class ForkJoinTask8Test extends J
1185                      assertFalse(r.isDone());
1186                  }};
1187              p.invoke(s);
1188            done.countDown();
1188          }
1189      }
1190  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines