ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From yzhda...@apache.org
Subject [19/50] [abbrv] incubator-ignite git commit: # IGNITE-56 Fix test.
Date Thu, 12 Feb 2015 09:44:44 GMT
# IGNITE-56 Fix test.


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

Branch: refs/heads/sprint-1
Commit: 7a35d388683642d6451654120de2dd1d618ad724
Parents: d4c7e86
Author: sevdokimov <sevdokimov@gridgain.com>
Authored: Tue Feb 10 20:56:39 2015 +0300
Committer: sevdokimov <sevdokimov@gridgain.com>
Committed: Tue Feb 10 20:56:39 2015 +0300

----------------------------------------------------------------------
 .../processors/cache/GridCacheAbstractFullApiSelfTest.java    | 2 +-
 .../processors/cache/GridCacheAbstractMetricsSelfTest.java    | 2 +-
 .../processors/cache/GridCacheGroupLockAbstractSelfTest.java  | 2 +-
 .../processors/cache/IgniteTxExceptionAbstractSelfTest.java   | 6 +++---
 .../testframework/junits/common/GridCommonAbstractTest.java   | 7 +++++++
 5 files changed, 13 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/7a35d388/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractFullApiSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractFullApiSelfTest.java
b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractFullApiSelfTest.java
index 855a23a..a292655 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractFullApiSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractFullApiSelfTest.java
@@ -3154,7 +3154,7 @@ public abstract class GridCacheAbstractFullApiSelfTest extends GridCacheAbstract
                     }
 
                     // Get "cache" field from GridCacheProxyImpl.
-                    GridCacheAdapter c0 = GridTestUtils.getFieldValue(c, "cache");
+                    GridCacheAdapter c0 = cacheFromCtx(c);
 
                     if (!c0.context().deferredDelete()) {
                         GridCacheEntryEx e0 = c0.peekEx(key);

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/7a35d388/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractMetricsSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractMetricsSelfTest.java
b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractMetricsSelfTest.java
index de4ab7c..11e0b23 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractMetricsSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractMetricsSelfTest.java
@@ -853,7 +853,7 @@ public abstract class GridCacheAbstractMetricsSelfTest extends GridCacheAbstract
                         return false;
 
                     // Get "cache" field from GridCacheProxyImpl.
-                    GridCacheAdapter c0 = GridTestUtils.getFieldValue(c, "cache");
+                    GridCacheAdapter c0 = cacheFromCtx(c);
 
                     if (!c0.context().deferredDelete()) {
                         GridCacheEntryEx e0 = c0.peekEx(key);

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/7a35d388/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheGroupLockAbstractSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheGroupLockAbstractSelfTest.java
b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheGroupLockAbstractSelfTest.java
index cd889e6..9534e4a 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheGroupLockAbstractSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheGroupLockAbstractSelfTest.java
@@ -1000,7 +1000,7 @@ public abstract class GridCacheGroupLockAbstractSelfTest extends GridCommonAbstr
 
             fail("Exception should be thrown");
         }
-        catch (IgniteException ignored) {
+        catch (CacheException ignored) {
             // Expected exception.
         }
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/7a35d388/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteTxExceptionAbstractSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteTxExceptionAbstractSelfTest.java
b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteTxExceptionAbstractSelfTest.java
index 3398418..3d4cc56 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteTxExceptionAbstractSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteTxExceptionAbstractSelfTest.java
@@ -403,7 +403,7 @@ public abstract class IgniteTxExceptionAbstractSelfTest extends GridCacheAbstrac
 
                 return null;
             }
-        }, IgniteTxHeuristicCheckedException.class, null);
+        }, IgniteTxHeuristicException.class, null);
 
         checkEmpty(key);
     }
@@ -491,7 +491,7 @@ public abstract class IgniteTxExceptionAbstractSelfTest extends GridCacheAbstrac
 
                 return null;
             }
-        }, IgniteTxHeuristicCheckedException.class, null);
+        }, IgniteTxHeuristicException.class, null);
 
         for (Integer key : m.keySet())
             checkEmpty(key);
@@ -525,7 +525,7 @@ public abstract class IgniteTxExceptionAbstractSelfTest extends GridCacheAbstrac
 
                 return null;
             }
-        }, IgniteTxHeuristicCheckedException.class, null);
+        }, IgniteTxHeuristicException.class, null);
 
         checkEmpty(key);
     }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/7a35d388/modules/core/src/test/java/org/apache/ignite/testframework/junits/common/GridCommonAbstractTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/testframework/junits/common/GridCommonAbstractTest.java
b/modules/core/src/test/java/org/apache/ignite/testframework/junits/common/GridCommonAbstractTest.java
index 858c0b9..eb005e2 100644
--- a/modules/core/src/test/java/org/apache/ignite/testframework/junits/common/GridCommonAbstractTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/testframework/junits/common/GridCommonAbstractTest.java
@@ -675,6 +675,13 @@ public abstract class GridCommonAbstractTest extends GridAbstractTest
{
     }
 
     /**
+     * @param cache Cache.
+     */
+    protected <K, V> GridCacheAdapter<K, V> cacheFromCtx(IgniteCache<K, V>
cache) {
+        return ((IgniteKernal)cache.unwrap(Ignite.class)).<K, V>internalCache(cache.getName()).context().cache();
+    }
+
+    /**
      * @param ignite Grid.
      * @return {@link org.apache.ignite.IgniteCompute} for given grid's local node.
      */


Mime
View raw message