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

Comparing jsr166/src/test/tck/RecursiveActionTest.java (file contents):
Revision 1.28 by jsr166, Wed Dec 1 22:37:51 2010 UTC vs.
Revision 1.29 by dl, Tue Feb 22 01:18:59 2011 UTC

# Line 134 | Line 134 | public class RecursiveActionTest extends
134          assertFalse(a.isCancelled());
135          assertFalse(a.isCompletedNormally());
136          assertTrue(a.isCompletedAbnormally());
137 <        assertSame(t, a.getException());
137 >        assertSame(t.getClass(), a.getException().getClass());
138          assertNull(a.getRawResult());
139          assertFalse(a.cancel(false));
140          assertFalse(a.cancel(true));
# Line 143 | Line 143 | public class RecursiveActionTest extends
143              a.join();
144              shouldThrow();
145          } catch (Throwable expected) {
146 <            assertSame(t, expected);
146 >            assertSame(expected.getClass(), t.getClass());
147          }
148  
149          try {
150              a.get();
151              shouldThrow();
152          } catch (ExecutionException success) {
153 <            assertSame(t, success.getCause());
153 >            assertSame(t.getClass(), success.getCause().getClass());
154          } catch (Throwable fail) { threadUnexpectedException(fail); }
155  
156          try {
157              a.get(5L, SECONDS);
158              shouldThrow();
159          } catch (ExecutionException success) {
160 <            assertSame(t, success.getCause());
160 >            assertSame(t.getClass(), success.getCause().getClass());
161          } catch (Throwable fail) { threadUnexpectedException(fail); }
162      }
163  
164 <    static final class FJException extends RuntimeException {
165 <        FJException() { super(); }
164 >    public static final class FJException extends RuntimeException {
165 >        public FJException() { super(); }
166 >        public FJException(Throwable cause) { super(cause); }
167      }
168  
169      // A simple recursive action for testing
# Line 771 | Line 772 | public class RecursiveActionTest extends
772                  ForkJoinWorkerThread w =
773                      (ForkJoinWorkerThread) Thread.currentThread();
774                  assertTrue(w.getPoolIndex() >= 0);
775 <                assertTrue(w.getPoolIndex() < mainPool.getPoolSize());
775 >                // pool size can shrink after assigning index, so cannot check
776 >                // assertTrue(w.getPoolIndex() < mainPool.getPoolSize());
777              }};
778          testInvokeOnPool(mainPool, a);
779      }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines