You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ignite.apache.org by ag...@apache.org on 2016/07/06 18:23:09 UTC
[10/50] [abbrv] ignite git commit: ignite-1088 Implemented store for
multi jvm tests (fixed NPE)
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/ignite-3227
Commit: d31a47696079755189f3f3f990e7341740240aa4
Parents: 8e09f12
Author: sboikov <sb...@gridgain.com>
Authored: Tue Jul 5 07:43:51 2016 +0300
Committer: sboikov <sb...@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());