mirror of
https://github.com/eclipse-sailing-analytics/sailing-analytics.git
synced 2026-11-06 19:12:23 +00:00
Fixed a wild exception in the tests
This commit is contained in:
1 parent
7e473d05c9
commit
6a642999bf
1 file changed
+19
+19
@@ -73,6 +73,25 @@ public class TestAbstractStoringParallelAggregationProcessor {
|
||||
|
||||
@Test(timeout=5000)
|
||||
public void testThatTheLockIsReleasedAfterStoringFailed() throws InterruptedException {
|
||||
Collection<Processor<Integer, ?>> receivers = new HashSet<>();
|
||||
receivers.add(new NullProcessor<Integer, Void>(Integer.class, Void.class) {
|
||||
@Override
|
||||
public void processElement(Integer element) {
|
||||
receivedElement = element;
|
||||
}
|
||||
@Override
|
||||
public void finish() throws InterruptedException {
|
||||
receiverWasToldToFinish = true;
|
||||
}
|
||||
@Override
|
||||
public void onFailure(Throwable failure) {
|
||||
if (failure instanceof IllegalArgumentException) {
|
||||
// Do nothing, since a IllegalArgumentException is expected
|
||||
} else {
|
||||
super.onFailure(failure);
|
||||
}
|
||||
}
|
||||
});
|
||||
Processor<Integer, Integer> processor = new AbstractParallelStoringAggregationProcessor<Integer, Integer>(Integer.class, Integer.class, ConcurrencyTestsUtil.getExecutor(), receivers, "Sum") {
|
||||
@Override
|
||||
protected void storeElement(Integer element) {
|
||||
|
||||
Reference in new issue
Block a user