ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sboi...@apache.org
Subject [31/50] [abbrv] ignite git commit: ignite-4712 Memory leaks in PageMemory
Date Wed, 03 May 2017 07:22:09 GMT
ignite-4712 Memory leaks in PageMemory


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

Branch: refs/heads/ignite-gg-8.0.3.ea6-clients-test
Commit: 937a1414df54a67be55633cf1a19066708f3c816
Parents: 3b86e29
Author: Alexey Goncharuk <alexey.goncharuk@gmail.com>
Authored: Tue Mar 21 20:00:12 2017 +0300
Committer: Alexey Goncharuk <alexey.goncharuk@gmail.com>
Committed: Tue Mar 21 20:00:12 2017 +0300

----------------------------------------------------------------------
 .../database/IgniteDbAbstractTest.java          | 24 +++++++++++++++-
 .../database/IgniteDbPutGetAbstractTest.java    | 29 --------------------
 2 files changed, 23 insertions(+), 30 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/937a1414/modules/core/src/test/java/org/apache/ignite/internal/processors/database/IgniteDbAbstractTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/database/IgniteDbAbstractTest.java
b/modules/core/src/test/java/org/apache/ignite/internal/processors/database/IgniteDbAbstractTest.java
index cf26187..95ec178 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/database/IgniteDbAbstractTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/database/IgniteDbAbstractTest.java
@@ -54,6 +54,9 @@ public abstract class IgniteDbAbstractTest extends GridCommonAbstractTest
{
      */
     protected abstract boolean indexingEnabled();
 
+    /** */
+    protected boolean client;
+
     /** {@inheritDoc} */
     @SuppressWarnings("unchecked")
     @Override protected IgniteConfiguration getConfiguration(String gridName) throws Exception
{
@@ -61,6 +64,9 @@ public abstract class IgniteDbAbstractTest extends GridCommonAbstractTest
{
 
         MemoryConfiguration dbCfg = new MemoryConfiguration();
 
+        if (client)
+            cfg.setClientMode(true);
+
         dbCfg.setConcurrencyLevel(Runtime.getRuntime().availableProcessors() * 4);
 
         if (isLargePage())
@@ -121,7 +127,8 @@ public abstract class IgniteDbAbstractTest extends GridCommonAbstractTest
{
         ccfg5.setRebalanceMode(SYNC);
         ccfg5.setAffinity(new RendezvousAffinityFunction(false, 32));
 
-        cfg.setCacheConfiguration(ccfg, ccfg2, ccfg3, ccfg4, ccfg5);
+        if (!client)
+            cfg.setCacheConfiguration(ccfg, ccfg2, ccfg3, ccfg4, ccfg5);
 
         TcpDiscoverySpi discoSpi = new TcpDiscoverySpi();
 
@@ -149,6 +156,13 @@ public abstract class IgniteDbAbstractTest extends GridCommonAbstractTest
{
         // No-op.
     }
 
+    /**
+     * @return {@code True} if cache operations should be called from client node with near
cache.
+     */
+    protected boolean withClientNearCache() {
+        return false;
+    }
+
     /** {@inheritDoc} */
     @Override protected void beforeTest() throws Exception {
         deleteRecursively(U.resolveWorkDirectory(U.defaultWorkDirectory(), "db", false));
@@ -161,6 +175,14 @@ public abstract class IgniteDbAbstractTest extends GridCommonAbstractTest
{
 
         startGrids(gridCount());
 
+        if (withClientNearCache()) {
+            client = true;
+
+            startGrid(gridCount());
+
+            client = false;
+        }
+
         awaitPartitionMapExchange();
     }
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/937a1414/modules/core/src/test/java/org/apache/ignite/internal/processors/database/IgniteDbPutGetAbstractTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/database/IgniteDbPutGetAbstractTest.java
b/modules/core/src/test/java/org/apache/ignite/internal/processors/database/IgniteDbPutGetAbstractTest.java
index 86f1237..cfb9b08 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/database/IgniteDbPutGetAbstractTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/database/IgniteDbPutGetAbstractTest.java
@@ -36,14 +36,9 @@ import org.apache.ignite.cache.query.QueryCursor;
 import org.apache.ignite.cache.query.ScanQuery;
 import org.apache.ignite.cache.query.SqlFieldsQuery;
 import org.apache.ignite.cache.query.SqlQuery;
-import org.apache.ignite.cache.query.annotations.QuerySqlField;
-import org.apache.ignite.configuration.CacheConfiguration;
-import org.apache.ignite.configuration.MemoryConfiguration;
-import org.apache.ignite.configuration.IgniteConfiguration;
 import org.apache.ignite.configuration.NearCacheConfiguration;
 import org.apache.ignite.internal.IgniteEx;
 import org.apache.ignite.internal.processors.cache.GridCacheAdapter;
-import org.apache.ignite.internal.processors.cache.database.tree.BPlusTree;
 import org.apache.ignite.internal.processors.cache.distributed.near.GridNearCacheAdapter;
 import org.apache.ignite.internal.util.GridRandom;
 import org.apache.ignite.internal.util.typedef.PA;
@@ -59,23 +54,6 @@ public abstract class IgniteDbPutGetAbstractTest extends IgniteDbAbstractTest
{
     private static final int KEYS_COUNT = 20_000;
 
     /**
-     * @return Node count.
-     */
-    protected abstract int gridCount();
-
-    /**
-     * @return {@code True} if indexing is enabled.
-     */
-    protected abstract boolean indexingEnabled();
-
-    /**
-     * @return {@code True} if cache operations should be called from client node with near
cache.
-     */
-    protected boolean withClientNearCache() {
-        return false;
-    }
-
-    /**
      * @return Ignite instance for testing.
      */
     private IgniteEx ig() {
@@ -98,13 +76,6 @@ public abstract class IgniteDbPutGetAbstractTest extends IgniteDbAbstractTest
{
     }
 
     /**
-     * @return {@code True} if use large page.
-     */
-    protected boolean isLargePage() {
-        return false;
-    }
-
-    /**
      *
      */
     public void testGradualRandomPutAllRemoveAll() throws Exception {


Mime
View raw message