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.22 by dl, Thu Oct 8 23:02:21 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 317 | Line 317 | public class ForkJoinTask8Test extends J
317              }
318              catch (Throwable ex) {
319                  compareAndSetForkJoinTaskTag(INITIAL_STATE, EXCEPTION_STATE);
320 +                throw new Error(ex);
321              }
322              return false;
323          }
# Line 1163 | Line 1164 | public class ForkJoinTask8Test extends J
1164          final ForkJoinTask b = ForkJoinTask.adapt(awaiter(done));
1165          final ForkJoinTask c = ForkJoinTask.adapt(awaiter(done));
1166          final ForkJoinPool p = singletonPool();
1167 <        try (PoolCleaner cleaner = cleaner(p)) {
1167 >        try (PoolCleaner cleaner = cleaner(p, done)) {
1168              Thread external = new Thread(new CheckedRunnable() {
1169                  public void realRun() {
1170                      p.execute(a);
# Line 1185 | Line 1186 | public class ForkJoinTask8Test extends J
1186                      assertFalse(r.isDone());
1187                  }};
1188              p.invoke(s);
1188            done.countDown();
1189          }
1190      }
1191  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines