ignite-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sergey Evdokimov (JIRA)" <j...@apache.org>
Subject [jira] [Assigned] (IGNITE-1097) IgniteFuture.chain() unwraps exceptions incorrectly.
Date Wed, 08 Jul 2015 16:00:05 GMT

     [ https://issues.apache.org/jira/browse/IGNITE-1097?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Sergey Evdokimov reassigned IGNITE-1097:
----------------------------------------

    Assignee: Sergey Evdokimov

> IgniteFuture.chain() unwraps exceptions incorrectly.
> ----------------------------------------------------
>
>                 Key: IGNITE-1097
>                 URL: https://issues.apache.org/jira/browse/IGNITE-1097
>             Project: Ignite
>          Issue Type: Bug
>          Components: general
>    Affects Versions: 1.1.4
>            Reporter: Vladimir Ozerov
>            Assignee: Sergey Evdokimov
>            Priority: Critical
>             Fix For: sprint-7
>
>
> Steps to reproduce:
> 1) Open class GridCacheAbstractFullApiSelfTest
> 2) Add the field: 
> {code}
> public static final CacheEntryProcessor<String, Integer, String> ERR_PROCESSOR
=
>         new CacheEntryProcessor<String, Integer, String>() {
>             @Override public String process(MutableEntry<String, Integer> e, Object...
args) {
>                 throw new RuntimeException("Failed!");
>             }
>         };
> {code}
> 3) Add the following test and observe that correct EntryProcessorException is thrown:
> {code}
> public void testTransformException() throws Exception {
>     IgniteCache<String, Integer> cache = jcache().withAsync();
>     cache.invoke("key2", ERR_PROCESSOR);
>     cache.future().get();
> }
> {code}
> 4) Modify the test as follows and observe that now incorrect RuntimeException is thrown
and EntryProcessorException is lost:
> {code}
> public void testTransformException() throws Exception {
>     IgniteCache<String, Integer> cache = jcache().withAsync();
>     cache.invoke("key2", ERR_PROCESSOR);
>     IgniteFuture fut = cache.future().chain(new IgniteClosure<IgniteFuture, Object>()
{
>         @Override public Object apply(IgniteFuture o) {
>             return o.get();
>         }
>     });
>     fut.get();
> }
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message