3167 |
|
final CompletableFuture<Integer> g = m.exceptionallyCompose(f, r); |
3168 |
|
if (createIncomplete) assertTrue(f.complete(v1)); |
3169 |
|
|
3170 |
– |
if (!createIncomplete && testImplementationDetails) |
3171 |
– |
assertSame(f, g); // an optimization |
3172 |
– |
|
3170 |
|
checkCompletedNormally(f, v1); |
3171 |
|
checkCompletedNormally(g, v1); |
3172 |
|
r.assertNotInvoked(); |
3215 |
|
}} |
3216 |
|
|
3217 |
|
/** |
3218 |
< |
* thenComposeExceptionally result completes exceptionally if the |
3218 |
> |
* exceptionallyCompose result completes exceptionally if the |
3219 |
|
* result of the action does |
3220 |
|
*/ |
3221 |
|
public void testExceptionallyCompose_actionReturnsFailingFuture() { |
3264 |
|
} |
3265 |
|
|
3266 |
|
checkCompletedExceptionally(g, ex); |
3267 |
< |
|
3271 |
< |
// TODO: should this be: checkCompletedWithWrappedException(h, ex); |
3272 |
< |
try { |
3273 |
< |
h.join(); |
3274 |
< |
shouldThrow(); |
3275 |
< |
} catch (Throwable t) { |
3276 |
< |
assertSame(ex, (t instanceof CompletionException) ? t.getCause() : t); |
3277 |
< |
} |
3278 |
< |
|
3267 |
> |
checkCompletedWithWrappedException(h, ex); |
3268 |
|
checkCompletedExceptionally(f, ex0); |
3269 |
|
}} |
3270 |
|
|
4907 |
|
}} |
4908 |
|
|
4909 |
|
/** |
4910 |
< |
* default exceptionallyCompose result completes normally after normal |
4911 |
< |
* completion of source |
4910 |
> |
* default-implemented exceptionallyCompose result completes |
4911 |
> |
* normally after normal completion of source |
4912 |
|
*/ |
4913 |
|
public void testDefaultExceptionallyCompose_normalCompletion() { |
4914 |
|
for (boolean createIncomplete : new boolean[] { true, false }) |
4974 |
|
}} |
4975 |
|
|
4976 |
|
/** |
4977 |
< |
* default exceptionallyComposeAsync result completes normally after normal |
4978 |
< |
* completion of source |
4977 |
> |
* default-implemented exceptionallyComposeAsync result completes |
4978 |
> |
* normally after normal completion of source |
4979 |
|
*/ |
4980 |
|
public void testDefaultExceptionallyComposeAsync_normalCompletion() { |
4981 |
|
for (boolean createIncomplete : new boolean[] { true, false }) |
5040 |
|
r.assertInvoked(); |
5041 |
|
}} |
5042 |
|
|
5054 |
– |
|
5043 |
|
/** |
5044 |
< |
* default exceptionallyComposeAsync result completes normally after normal |
5045 |
< |
* completion of source |
5044 |
> |
* default-implemented exceptionallyComposeAsync result completes |
5045 |
> |
* normally after normal completion of source |
5046 |
|
*/ |
5047 |
|
public void testDefaultExceptionallyComposeAsyncExecutor_normalCompletion() { |
5048 |
|
for (boolean createIncomplete : new boolean[] { true, false }) |