ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sboi...@apache.org
Subject ignite git commit: ignite-1088 Implemented store for multi jvm tests (fixed NPE)
Date Tue, 05 Jul 2016 04:44:11 GMT
Repository: ignite
Updated Branches:
  refs/heads/master 8e09f12a5 -> d31a47696


ignite-1088 Implemented store for multi jvm tests (fixed NPE)


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

Branch: refs/heads/master
Commit: d31a47696079755189f3f3f990e7341740240aa4
Parents: 8e09f12
Author: sboikov <sboikov@gridgain.com>
Authored: Tue Jul 5 07:43:51 2016 +0300
Committer: sboikov <sboikov@gridgain.com>
Committed: Tue Jul 5 07:43:51 2016 +0300

----------------------------------------------------------------------
 .../cache/GridCacheAbstractSelfTest.java          | 18 ++++++++++--------
 1 file changed, 10 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/d31a4769/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractSelfTest.java
b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractSelfTest.java
index dcf5d98..d58e560 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractSelfTest.java
@@ -220,16 +220,18 @@ public abstract class GridCacheAbstractSelfTest extends GridCommonAbstractTest
{
     protected CacheConfiguration cacheConfiguration(String gridName) throws Exception {
         CacheConfiguration cfg = defaultCacheConfiguration();
 
-        Factory<? extends CacheStore<Object, Object>> storeFactory = storeStgy.getStoreFactory();
+        if (storeStgy != null) {
+            Factory<? extends CacheStore<Object, Object>> storeFactory = storeStgy.getStoreFactory();
 
-        CacheStore<?, ?> store = storeFactory.create();
+            CacheStore<?, ?> store = storeFactory.create();
 
-        if (store != null) {
-            cfg.setCacheStoreFactory(storeFactory);
-            cfg.setReadThrough(true);
-            cfg.setWriteThrough(true);
-            cfg.setLoadPreviousValue(true);
-            storeStgy.updateCacheConfiguration(cfg);
+            if (store != null) {
+                cfg.setCacheStoreFactory(storeFactory);
+                cfg.setReadThrough(true);
+                cfg.setWriteThrough(true);
+                cfg.setLoadPreviousValue(true);
+                storeStgy.updateCacheConfiguration(cfg);
+            }
         }
 
         cfg.setSwapEnabled(swapEnabled());


Mime
View raw message