ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From akuznet...@apache.org
Subject [3/8] ignite git commit: IGNITE-5024 code of two tests was fixed to pass new validation rules
Date Sat, 29 Apr 2017 07:58:31 GMT
IGNITE-5024 code of two tests was fixed to pass new validation rules


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

Branch: refs/heads/master
Commit: dc4b21efffbcc0e1f45570e89477f8a63c381d31
Parents: 2872060
Author: Sergey Chugunov <sergey.chugunov@gmail.com>
Authored: Fri Apr 28 11:37:36 2017 +0300
Committer: Alexey Goncharuk <alexey.goncharuk@gmail.com>
Committed: Fri Apr 28 11:56:07 2017 +0300

----------------------------------------------------------------------
 .../cache/CacheMemoryPolicyConfigurationTest.java | 12 +++++++++---
 .../database/MemoryPolicyInitializationTest.java  | 18 ++++++++++++------
 2 files changed, 21 insertions(+), 9 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/dc4b21ef/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheMemoryPolicyConfigurationTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheMemoryPolicyConfigurationTest.java
b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheMemoryPolicyConfigurationTest.java
index 326a830..0fb9c08 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheMemoryPolicyConfigurationTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheMemoryPolicyConfigurationTest.java
@@ -36,6 +36,12 @@ public class CacheMemoryPolicyConfigurationTest extends GridCommonAbstractTest
{
     /** */
     private volatile MemoryConfiguration memCfg;
 
+    /** */
+    private static final long DFLT_MEM_PLC_SIZE = 10 * 1024 * 1024;
+
+    /** */
+    private static final long BIG_MEM_PLC_SIZE = 1024 * 1024 * 1024;
+
     /** {@inheritDoc} */
     @Override protected IgniteConfiguration getConfiguration(String gridName) throws Exception
{
         IgniteConfiguration cfg = super.getConfiguration(gridName);
@@ -138,12 +144,12 @@ public class CacheMemoryPolicyConfigurationTest extends GridCommonAbstractTest
{
 
         MemoryPolicyConfiguration dfltPlcCfg = new MemoryPolicyConfiguration();
         dfltPlcCfg.setName("dfltPlc");
-        dfltPlcCfg.setInitialSize(1024 * 1024);
-        dfltPlcCfg.setMaxSize(1024 * 1024);
+        dfltPlcCfg.setInitialSize(DFLT_MEM_PLC_SIZE);
+        dfltPlcCfg.setMaxSize(DFLT_MEM_PLC_SIZE);
 
         MemoryPolicyConfiguration bigPlcCfg = new MemoryPolicyConfiguration();
         bigPlcCfg.setName("bigPlc");
-        bigPlcCfg.setMaxSize(1024 * 1024 * 1024);
+        bigPlcCfg.setMaxSize(BIG_MEM_PLC_SIZE);
 
         memCfg.setMemoryPolicies(dfltPlcCfg, bigPlcCfg);
         memCfg.setDefaultMemoryPolicyName("dfltPlc");

http://git-wip-us.apache.org/repos/asf/ignite/blob/dc4b21ef/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/database/MemoryPolicyInitializationTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/database/MemoryPolicyInitializationTest.java
b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/database/MemoryPolicyInitializationTest.java
index a1c9728..ec798ee 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/database/MemoryPolicyInitializationTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/database/MemoryPolicyInitializationTest.java
@@ -232,10 +232,12 @@ public class MemoryPolicyInitializationTest extends GridCommonAbstractTest
{
 
         memCfg.setMemoryPolicies(new MemoryPolicyConfiguration()
                 .setName(CUSTOM_NON_DEFAULT_MEM_PLC_NAME)
+                .setInitialSize(USER_CUSTOM_MEM_PLC_SIZE)
                 .setMaxSize(USER_CUSTOM_MEM_PLC_SIZE),
 
-                new MemoryPolicyConfiguration()
+            new MemoryPolicyConfiguration()
                 .setName(DFLT_MEM_PLC_DEFAULT_NAME)
+                .setInitialSize(USER_CUSTOM_MEM_PLC_SIZE)
                 .setMaxSize(USER_DEFAULT_MEM_PLC_SIZE)
         );
     }
@@ -248,8 +250,9 @@ public class MemoryPolicyInitializationTest extends GridCommonAbstractTest
{
         memCfg = new MemoryConfiguration();
 
         memCfg.setMemoryPolicies(new MemoryPolicyConfiguration()
-                .setName(DFLT_MEM_PLC_DEFAULT_NAME)
-                .setMaxSize(USER_DEFAULT_MEM_PLC_SIZE)
+            .setName(DFLT_MEM_PLC_DEFAULT_NAME)
+            .setInitialSize(USER_CUSTOM_MEM_PLC_SIZE)
+            .setMaxSize(USER_DEFAULT_MEM_PLC_SIZE)
         );
     }
 
@@ -261,10 +264,12 @@ public class MemoryPolicyInitializationTest extends GridCommonAbstractTest
{
 
         memCfg.setMemoryPolicies(new MemoryPolicyConfiguration()
                 .setName(DFLT_MEM_PLC_DEFAULT_NAME)
+                .setInitialSize(USER_CUSTOM_MEM_PLC_SIZE)
                 .setMaxSize(USER_DEFAULT_MEM_PLC_SIZE),
 
-                new MemoryPolicyConfiguration()
+            new MemoryPolicyConfiguration()
                 .setName(CUSTOM_NON_DEFAULT_MEM_PLC_NAME)
+                .setInitialSize(USER_CUSTOM_MEM_PLC_SIZE)
                 .setMaxSize(USER_CUSTOM_MEM_PLC_SIZE)
         );
     }
@@ -287,8 +292,9 @@ public class MemoryPolicyInitializationTest extends GridCommonAbstractTest
{
         memCfg = new MemoryConfiguration();
 
         memCfg.setMemoryPolicies(new MemoryPolicyConfiguration()
-                .setName(CUSTOM_NON_DEFAULT_MEM_PLC_NAME)
-                .setMaxSize(USER_CUSTOM_MEM_PLC_SIZE)
+            .setName(CUSTOM_NON_DEFAULT_MEM_PLC_NAME)
+            .setInitialSize(USER_CUSTOM_MEM_PLC_SIZE)
+            .setMaxSize(USER_CUSTOM_MEM_PLC_SIZE)
         );
     }
 


Mime
View raw message