allow to throw PCE

This commit is contained in:
Alexey Kudravtsev
2013-10-25 16:18:40 +04:00
parent 4f6cbe4a5d
commit 71b8b54460
@@ -219,17 +219,21 @@ public class JobUtilTest extends PlatformTestCase {
public void testNotNormalCompletion() throws Throwable {
final List<Object> objects = Collections.nCopies(100000000, null);
COUNT.set(0);
boolean success = JobLauncher.getInstance().invokeConcurrentlyUnderProgress(objects, null, true, new Processor<Object>() {
@Override
public boolean process(Object o) {
if (COUNT.incrementAndGet() == 100000) {
System.out.println("PCE");
return false;
try {
boolean success = JobLauncher.getInstance().invokeConcurrentlyUnderProgress(objects, null, true, new Processor<Object>() {
@Override
public boolean process(Object o) {
if (COUNT.incrementAndGet() == 100000) {
System.out.println("PCE");
return false;
}
return true;
}
return true;
}
});
assertFalse(success);
});
assertFalse(success);
}
catch (ProcessCanceledException e) {
}
}
public void testJobUtilCompletesEvenIfCannotGrabReadAction() throws Throwable {