ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From voze...@apache.org
Subject [14/20] ignite git commit: Fixed BinaryObjectOffheapUnswapTemporaryTest.
Date Fri, 29 Apr 2016 10:55:53 GMT
Fixed BinaryObjectOffheapUnswapTemporaryTest.


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

Branch: refs/heads/ignite-2523-1
Commit: 8dd6f199b2b6b79e3d3b313228b9b89b214f5870
Parents: 344cceb
Author: vozerov-gridgain <vozerov@gridgain.com>
Authored: Fri Apr 29 09:01:47 2016 +0300
Committer: vozerov-gridgain <vozerov@gridgain.com>
Committed: Fri Apr 29 09:01:47 2016 +0300

----------------------------------------------------------------------
 .../cache/BinaryObjectOffHeapUnswapTemporaryTest.java   | 12 +++++++++---
 1 file changed, 9 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/8dd6f199/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/BinaryObjectOffHeapUnswapTemporaryTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/BinaryObjectOffHeapUnswapTemporaryTest.java
b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/BinaryObjectOffHeapUnswapTemporaryTest.java
index f26191f..824481b 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/BinaryObjectOffHeapUnswapTemporaryTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/BinaryObjectOffHeapUnswapTemporaryTest.java
@@ -36,6 +36,7 @@ import org.apache.ignite.configuration.IgniteConfiguration;
 import org.apache.ignite.internal.binary.BinaryMarshaller;
 import org.apache.ignite.internal.binary.BinaryObjectOffheapImpl;
 import org.apache.ignite.lang.IgniteInClosure;
+import org.apache.ignite.spi.swapspace.file.FileSwapSpaceSpi;
 import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest;
 import org.apache.ignite.transactions.Transaction;
 import org.apache.ignite.transactions.TransactionConcurrency;
@@ -53,6 +54,9 @@ public class BinaryObjectOffHeapUnswapTemporaryTest extends GridCommonAbstractTe
     /** */
     private static final int CNT = 20;
 
+    /** Cache name. */
+    private static final String CACHE_NAME = "cache";
+
     /** */
     @SuppressWarnings("serial")
     private static final CacheEntryProcessor PROC = new CacheEntryProcessor() {
@@ -69,6 +73,7 @@ public class BinaryObjectOffHeapUnswapTemporaryTest extends GridCommonAbstractTe
         IgniteConfiguration c = super.getConfiguration(gridName);
 
         c.setMarshaller(new BinaryMarshaller());
+        c.setSwapSpaceSpi(new FileSwapSpaceSpi());
 
         return c;
     }
@@ -82,8 +87,9 @@ public class BinaryObjectOffHeapUnswapTemporaryTest extends GridCommonAbstractTe
         CacheMemoryMode memoryMode) {
         this.atomicityMode = atomicityMode;
 
-        CacheConfiguration cfg = new CacheConfiguration();
+        CacheConfiguration<Object, Object>  cfg = new CacheConfiguration<>();
 
+        cfg.setName(CACHE_NAME);
         cfg.setCacheMode(CacheMode.PARTITIONED);
         cfg.setAtomicityMode(atomicityMode);
         cfg.setMemoryMode(memoryMode);
@@ -168,10 +174,10 @@ public class BinaryObjectOffHeapUnswapTemporaryTest extends GridCommonAbstractTe
      */
     @SuppressWarnings("serial")
     private void doTest() {
-        final IgniteCache<Integer, BinaryObject> cache = jcache(0).withKeepBinary();
+        final IgniteCache<Integer, BinaryObject> cache = jcache(0, CACHE_NAME).withKeepBinary();
 
         for (int key = 0; key < CNT; key++)
-            jcache(0).put(key, new TestObject(key));
+            jcache(0, CACHE_NAME).put(key, new TestObject(key));
 
         for (int key = CNT; key < 2 * CNT; key++) {
             BinaryObjectBuilder builder = ignite(0).binary().builder("SomeType");


Mime
View raw message