ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From agoncha...@apache.org
Subject [13/22] ignite git commit: ignite-3477-master memory configuration for test deadlockDetection
Date Thu, 13 Apr 2017 13:41:20 GMT
ignite-3477-master memory configuration for test deadlockDetection


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

Branch: refs/heads/ignite-3477-master
Commit: b066f6094997fd3b1b21e624f5599781320cfa83
Parents: 355efcd
Author: Dmitriy Govorukhin <dgovorukhin@gridgain.com>
Authored: Wed Apr 12 18:33:17 2017 +0300
Committer: Dmitriy Govorukhin <dgovorukhin@gridgain.com>
Committed: Wed Apr 12 18:33:17 2017 +0300

----------------------------------------------------------------------
 .../TxPessimisticDeadlockDetectionTest.java        | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/b066f609/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TxPessimisticDeadlockDetectionTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TxPessimisticDeadlockDetectionTest.java
b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TxPessimisticDeadlockDetectionTest.java
index 9e7cb1c..4660972 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TxPessimisticDeadlockDetectionTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TxPessimisticDeadlockDetectionTest.java
@@ -36,6 +36,8 @@ import org.apache.ignite.cache.CacheWriteSynchronizationMode;
 import org.apache.ignite.cluster.ClusterNode;
 import org.apache.ignite.configuration.CacheConfiguration;
 import org.apache.ignite.configuration.IgniteConfiguration;
+import org.apache.ignite.configuration.MemoryConfiguration;
+import org.apache.ignite.configuration.MemoryPolicyConfiguration;
 import org.apache.ignite.configuration.NearCacheConfiguration;
 import org.apache.ignite.internal.IgniteInternalFuture;
 import org.apache.ignite.internal.IgniteKernal;
@@ -96,6 +98,18 @@ public class TxPessimisticDeadlockDetectionTest extends GridCommonAbstractTest
{
             cfg.setDiscoverySpi(discoSpi);
         }
 
+        MemoryConfiguration memCfg = new MemoryConfiguration();
+
+        MemoryPolicyConfiguration plc = new MemoryPolicyConfiguration();
+
+        plc.setName("dfltPlc");
+        plc.setSize(MemoryConfiguration.DFLT_MEMORY_POLICY_SIZE * 10);
+
+        memCfg.setDefaultMemoryPolicyName("dfltPlc");
+        memCfg.setMemoryPolicies(plc);
+
+        cfg.setMemoryConfiguration(memCfg);
+
         cfg.setClientMode(client);
 
         return cfg;
@@ -190,6 +204,9 @@ public class TxPessimisticDeadlockDetectionTest extends GridCommonAbstractTest
{
         ccfg.setNearConfiguration(near ? new NearCacheConfiguration() : null);
         ccfg.setWriteSynchronizationMode(syncMode);
 
+        if (cacheMode == LOCAL)
+            ccfg.setMemoryPolicyName("dfltPlc");
+
         IgniteCache cache = ignite(0).createCache(ccfg);
 
         if (near) {


Mime
View raw message