Uploaded image for project: 'Ignite'
  1. Ignite
  2. IGNITE-1097

IgniteFuture.chain() unwraps exceptions incorrectly.

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Critical
    • Resolution: Fixed
    • 1.1.4
    • sprint-7
    • general
    • None

    Description

      Steps to reproduce:
      1) Open class GridCacheAbstractFullApiSelfTest
      2) Add the field:

      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!");
                  }
              };
      

      3) Add the following test and observe that correct EntryProcessorException is thrown:

      public void testTransformException() throws Exception {
          IgniteCache<String, Integer> cache = jcache().withAsync();
          cache.invoke("key2", ERR_PROCESSOR);
          cache.future().get();
      }
      

      4) Modify the test as follows and observe that now incorrect RuntimeException is thrown and EntryProcessorException is lost:

      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();
      }
      

      Attachments

        Issue Links

          Activity

            People

              yzhdanov Yakov Zhdanov
              vozerov Vladimir Ozerov
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: