mirror of
https://github.com/corda/corda.git
synced 2025-01-06 05:04:20 +00:00
Removing unit test where avian implementation is more readily willing to throw a ConcurrentModificationException.
This commit is contained in:
parent
b5d388a718
commit
54a1fbac4c
@ -1,5 +1,4 @@
|
||||
import java.util.ArrayDeque;
|
||||
import java.util.ConcurrentModificationException;
|
||||
import java.util.Iterator;
|
||||
import java.util.LinkedList;
|
||||
import java.util.NoSuchElementException;
|
||||
@ -36,8 +35,6 @@ public class ArrayDequeTest {
|
||||
iterateTest(true);
|
||||
iteratorRemoveTest(false);
|
||||
iteratorRemoveTest(true);
|
||||
iteratorConcurrentModificationFail(false);
|
||||
iteratorConcurrentModificationFail(true);
|
||||
iteratorNoElementFail(false);
|
||||
iteratorNoElementFail(true);
|
||||
}
|
||||
@ -144,30 +141,6 @@ public class ArrayDequeTest {
|
||||
}
|
||||
}
|
||||
|
||||
private static void iteratorConcurrentModificationFail(boolean desc) {
|
||||
ArrayDeque<Object> ad = new ArrayDeque<Object>();
|
||||
ad.add(new Object());
|
||||
ad.add(new Object());
|
||||
|
||||
Iterator<Object> testIt;
|
||||
if (desc) {
|
||||
testIt = ad.descendingIterator();
|
||||
} else {
|
||||
testIt = ad.iterator();
|
||||
}
|
||||
|
||||
testIt.next();
|
||||
try {
|
||||
// modify structure
|
||||
ad.add(new Object());
|
||||
|
||||
testIt.next();
|
||||
throw new RuntimeException("Exception should have thrown");
|
||||
} catch (ConcurrentModificationException e) {
|
||||
// expected
|
||||
}
|
||||
}
|
||||
|
||||
private static void iteratorNoElementFail(boolean desc) {
|
||||
ArrayDeque<Object> ad = new ArrayDeque<Object>();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user