Repository: ignite Updated Branches: refs/heads/ignite-5024 6746d8261 -> 21dce2708
IGNITE-5024 - Fixing tests Project: http://git-wip-us.apache.org/repos/asf/ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/21dce270 Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/21dce270 Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/21dce270 Branch: refs/heads/ignite-5024 Commit: 21dce2708a50e2a87e876f2558c888f50d0d6df2 Parents: 6746d82 Author: Alexey Goncharuk <alexey.goncha...@gmail.com> Authored: Tue Apr 25 10:35:56 2017 +0300 Committer: Alexey Goncharuk <alexey.goncha...@gmail.com> Committed: Tue Apr 25 10:35:56 2017 +0300 ---------------------------------------------------------------------- .../cache/database/IgniteCacheDatabaseSharedManager.java | 4 +++- .../processors/database/FreeListImplSelfTest.java | 10 +++------- .../cache/index/DynamicIndexAbstractSelfTest.java | 6 +++++- .../platforms/cpp/core-test/config/cache-identity-32.xml | 3 ++- 4 files changed, 13 insertions(+), 10 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ignite/blob/21dce270/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/database/IgniteCacheDatabaseSharedManager.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/database/IgniteCacheDatabaseSharedManager.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/database/IgniteCacheDatabaseSharedManager.java index ae0921e..2ff4471 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/database/IgniteCacheDatabaseSharedManager.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/database/IgniteCacheDatabaseSharedManager.java @@ -349,7 +349,9 @@ public class IgniteCacheDatabaseSharedManager extends GridCacheSharedManagerAdap if (plcCfg.getMaxSize() < plcCfg.getInitialSize()) throw new IgniteCheckedException("MemoryPolicy maxSize must not be smaller than " + - "initialSize: " + plcCfg.getName()); + "initialSize [name=" + plcCfg.getName() + + ", initSize=" + U.readableSize(plcCfg.getInitialSize(), true) + + ", maxSize=" + U.readableSize(plcCfg.getMaxSize(), true) + ']'); } /** http://git-wip-us.apache.org/repos/asf/ignite/blob/21dce270/modules/core/src/test/java/org/apache/ignite/internal/processors/database/FreeListImplSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/database/FreeListImplSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/database/FreeListImplSelfTest.java index 95771b2..95c3684 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/database/FreeListImplSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/database/FreeListImplSelfTest.java @@ -29,6 +29,7 @@ import java.util.concurrent.ConcurrentMap; import java.util.concurrent.ThreadLocalRandom; import java.util.concurrent.atomic.AtomicBoolean; import org.apache.ignite.IgniteCheckedException; +import org.apache.ignite.configuration.MemoryPolicyConfiguration; import org.apache.ignite.internal.mem.unsafe.UnsafeMemoryProvider; import org.apache.ignite.internal.pagemem.PageIdAllocator; import org.apache.ignite.internal.pagemem.PageMemory; @@ -175,7 +176,7 @@ public class FreeListImplSelfTest extends GridCommonAbstractTest { @Override public Object call() throws Exception { Random rnd = ThreadLocalRandom.current(); - for (int i = 0; i < 1_000_000; i++) { + for (int i = 0; i < 200_000; i++) { boolean grow0 = grow.get(); if (grow0) { @@ -314,16 +315,11 @@ public class FreeListImplSelfTest extends GridCommonAbstractTest { * @return Page memory. */ protected PageMemory createPageMemory(int pageSize) throws Exception { - long[] sizes = new long[CPUS]; - - for (int i = 0; i < sizes.length; i++) - sizes[i] = 1024 * MB / CPUS; - PageMemory pageMem = new PageMemoryNoStoreImpl(log, new UnsafeMemoryProvider(log), null, pageSize, - null, + new MemoryPolicyConfiguration().setMaxSize(1024 * MB), new MemoryMetricsImpl(null), true); http://git-wip-us.apache.org/repos/asf/ignite/blob/21dce270/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/index/DynamicIndexAbstractSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/index/DynamicIndexAbstractSelfTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/index/DynamicIndexAbstractSelfTest.java index 84ee489..52fea15 100644 --- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/index/DynamicIndexAbstractSelfTest.java +++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/index/DynamicIndexAbstractSelfTest.java @@ -138,7 +138,11 @@ public abstract class DynamicIndexAbstractSelfTest extends AbstractSchemaSelfTes MemoryConfiguration memCfg = new MemoryConfiguration() .setDefaultMemoryPolicyName("default") - .setMemoryPolicies(new MemoryPolicyConfiguration().setName("default").setMaxSize(32 * 1024 * 1024L) + .setMemoryPolicies( + new MemoryPolicyConfiguration() + .setName("default") + .setMaxSize(32 * 1024 * 1024L) + .setInitialSize(32 * 1024 * 1024L) ); cfg.setMemoryConfiguration(memCfg); http://git-wip-us.apache.org/repos/asf/ignite/blob/21dce270/modules/platforms/cpp/core-test/config/cache-identity-32.xml ---------------------------------------------------------------------- diff --git a/modules/platforms/cpp/core-test/config/cache-identity-32.xml b/modules/platforms/cpp/core-test/config/cache-identity-32.xml index 4a8a68f..1053ff0 100644 --- a/modules/platforms/cpp/core-test/config/cache-identity-32.xml +++ b/modules/platforms/cpp/core-test/config/cache-identity-32.xml @@ -40,7 +40,8 @@ <list> <bean class="org.apache.ignite.configuration.MemoryPolicyConfiguration"> <property name="name" value="dfltPlc"/> - <property name="size" value="#{100 * 1024 * 1024}"/> + <property name="maxSize" value="#{100 * 1024 * 1024}"/> + <property name="initialSize" value="#{100 * 1024 * 1024}"/> </bean> </list> </property>