ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sboi...@apache.org
Subject incubator-ignite git commit: # ignite-1101 review
Date Tue, 07 Jul 2015 10:36:40 GMT
Repository: incubator-ignite
Updated Branches:
  refs/heads/ignite-1101 f821d4e1e -> bb5cdb192


# ignite-1101 review


Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/bb5cdb19
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/bb5cdb19
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/bb5cdb19

Branch: refs/heads/ignite-1101
Commit: bb5cdb1926f9b3e5fdfd327f869d564e6de238d1
Parents: f821d4e
Author: sboikov <sboikov@gridgain.com>
Authored: Tue Jul 7 13:36:31 2015 +0300
Committer: sboikov <sboikov@gridgain.com>
Committed: Tue Jul 7 13:36:31 2015 +0300

----------------------------------------------------------------------
 .../cache/CacheFutureExceptionSelfTest.java       | 18 +++++++++++-------
 1 file changed, 11 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/bb5cdb19/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheFutureExceptionSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheFutureExceptionSelfTest.java
b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheFutureExceptionSelfTest.java
index f61c52b..27bfe17 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheFutureExceptionSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheFutureExceptionSelfTest.java
@@ -26,6 +26,7 @@ import org.apache.ignite.spi.discovery.tcp.*;
 import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.*;
 import org.apache.ignite.testframework.junits.common.*;
 
+import javax.cache.*;
 import java.io.*;
 import java.util.*;
 import java.util.concurrent.*;
@@ -90,15 +91,18 @@ public class CacheFutureExceptionSelfTest extends GridCommonAbstractTest
{
 
             asyncCache.future().listen(new IgniteInClosure<IgniteFuture<Object>>()
{
                 @Override public void apply(IgniteFuture<Object> fut) {
-                    if (fut.isCancelled()) {
-                        futLatch.countDown();
-                        return;
+                    assertTrue(fut.isDone());
+
+                    try {
+                        fut.get();
+
+                        fail();
                     }
-                    if (fut.isDone()) {
+                    catch (CacheException e) {
+                        log.info("Expected error: " + e);
+
                         futLatch.countDown();
-                        return;
                     }
-                    throw new IllegalStateException("should never be there");
                 }
             });
 
@@ -122,7 +126,7 @@ public class CacheFutureExceptionSelfTest extends GridCommonAbstractTest
{
         /** {@inheritDoc}*/
         private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException
{
             if (System.getProperty("FAIL") != null)
-                throw new RuntimeException("Deserialization failed");
+                throw new RuntimeException("Deserialization failed.");
 
             in.readObject();
         }


Mime
View raw message