# IGNITE-379 Added the test that checks injection @CacheStoreSessionResource to 
parent class.
(cherry picked from commit 34800f6)


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

Branch: refs/heads/ignite-443
Commit: c99469f8aad704bed32b6f34ee6e1a5a9a2aaf87
Parents: 43284e6
Author: sevdokimov <sevdoki...@gridgain.com>
Authored: Thu Mar 5 13:28:45 2015 +0300
Committer: sevdokimov <sevdoki...@gridgain.com>
Committed: Mon Mar 23 11:29:17 2015 +0300

----------------------------------------------------------------------
 .../IgniteCacheStoreSessionAbstractTest.java         | 15 +++++++++++++--
 1 file changed, 13 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/c99469f8/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/integration/IgniteCacheStoreSessionAbstractTest.java
----------------------------------------------------------------------
diff --git 
a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/integration/IgniteCacheStoreSessionAbstractTest.java
 
b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/integration/IgniteCacheStoreSessionAbstractTest.java
index ae00ba4..d261a44 100644
--- 
a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/integration/IgniteCacheStoreSessionAbstractTest.java
+++ 
b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/integration/IgniteCacheStoreSessionAbstractTest.java
@@ -216,7 +216,7 @@ public abstract class IgniteCacheStoreSessionAbstractTest 
extends IgniteCacheAbs
          * @param expProps Expected properties.
          * @param expCacheName Expected cache name.
          */
-        public ExpectedData(boolean tx, String expMtd, Map<Object, Object> 
expProps, String expCacheName) {
+        ExpectedData(boolean tx, String expMtd, Map<Object, Object> expProps, 
String expCacheName) {
             this.tx = tx;
             this.expMtd = expMtd;
             this.expProps = expProps;
@@ -227,7 +227,16 @@ public abstract class IgniteCacheStoreSessionAbstractTest 
extends IgniteCacheAbs
     /**
      *
      */
-    private class TestStore implements CacheStore<Object, Object> {
+    private static class AbstractStore {
+        /** */
+        @CacheStoreSessionResource
+        protected CacheStoreSession sesInParent;
+    }
+
+    /**
+     *
+     */
+    private class TestStore extends AbstractStore implements 
CacheStore<Object, Object> {
         /** Auto-injected store session. */
         @CacheStoreSessionResource
         private CacheStoreSession ses;
@@ -324,6 +333,8 @@ public abstract class IgniteCacheStoreSessionAbstractTest 
extends IgniteCacheAbs
 
             assertNotNull(ses);
 
+            assertSame(ses, sesInParent);
+
             if (exp.tx)
                 assertNotNull(ses.transaction());
             else

Reply via email to