You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ignite.apache.org by dp...@apache.org on 2018/10/01 16:31:29 UTC

ignite git commit: IGNITE-8251 Reduce testPageEviction run time - Fixes #4577.

Repository: ignite
Updated Branches:
  refs/heads/master caa4b0aa9 -> 0e29b873b


IGNITE-8251 Reduce testPageEviction run time - Fixes #4577.

Signed-off-by: Dmitriy Pavlov <dp...@apache.org>


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

Branch: refs/heads/master
Commit: 0e29b873b8c13ba3bb3dbb1307567eaffd41e3b4
Parents: caa4b0a
Author: uday <ud...@gmail.com>
Authored: Mon Oct 1 19:31:18 2018 +0300
Committer: Dmitriy Pavlov <dp...@apache.org>
Committed: Mon Oct 1 19:31:18 2018 +0300

----------------------------------------------------------------------
 .../GridCachePreloadingEvictionsSelfTest.java   | 21 ++++++--------------
 .../paged/PageEvictionAbstractTest.java         |  4 ++--
 2 files changed, 8 insertions(+), 17 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/0e29b873/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCachePreloadingEvictionsSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCachePreloadingEvictionsSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCachePreloadingEvictionsSelfTest.java
index f134852..f9042ef 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCachePreloadingEvictionsSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCachePreloadingEvictionsSelfTest.java
@@ -29,7 +29,6 @@ import org.apache.ignite.cache.CachePeekMode;
 import org.apache.ignite.configuration.CacheConfiguration;
 import org.apache.ignite.configuration.IgniteConfiguration;
 import org.apache.ignite.events.Event;
-import org.apache.ignite.internal.IgniteEx;
 import org.apache.ignite.internal.IgniteInternalFuture;
 import org.apache.ignite.internal.IgniteInterruptedCheckedException;
 import org.apache.ignite.internal.IgniteKernal;
@@ -58,7 +57,7 @@ import static org.apache.ignite.events.EventType.EVT_NODE_JOINED;
 public class GridCachePreloadingEvictionsSelfTest extends GridCommonAbstractTest {
     /** */
     private static final String VALUE = createValue();
-    public static final CachePeekMode[] ALL_PEEK_MODES = new CachePeekMode[]{CachePeekMode.ALL};
+    public static final CachePeekMode[] ALL_PEEK_MODES = new CachePeekMode[] {CachePeekMode.ALL};
 
     /** */
     private final TcpDiscoveryIpFinder ipFinder = new TcpDiscoveryVmIpFinder(true);
@@ -219,22 +218,14 @@ public class GridCachePreloadingEvictionsSelfTest extends GridCommonAbstractTest
      * @throws Exception If failed.
      */
     private void checkCachesConsistency(Ignite ignite1, Ignite ignite2) throws Exception {
-        IgniteKernal g1 = (IgniteKernal) ignite1;
-        IgniteKernal g2 = (IgniteKernal) ignite2;
+        IgniteKernal g1 = (IgniteKernal)ignite1;
+        IgniteKernal g2 = (IgniteKernal)ignite2;
 
         GridCacheAdapter<Integer, Object> cache1 = g1.internalCache(DEFAULT_CACHE_NAME);
         GridCacheAdapter<Integer, Object> cache2 = g2.internalCache(DEFAULT_CACHE_NAME);
 
-        for (int i = 0; i < 3; i++) {
-            if (cache1.size(ALL_PEEK_MODES) != cache2.size(ALL_PEEK_MODES)) {
-                U.warn(log, "Sizes do not match (will retry in 1000 ms) [s1=" + cache1.size(ALL_PEEK_MODES) +
-                    ", s2=" + cache2.size(ALL_PEEK_MODES) + ']');
-
-                U.sleep(1000);
-            }
-            else
-                break;
-        }
+        // Sleeping to allow the cache sizes to settle down.
+        U.sleep(3000);
 
         info("Cache1 size: " + cache1.size(ALL_PEEK_MODES));
         info("Cache2 size: " + cache2.size(ALL_PEEK_MODES));
@@ -261,4 +252,4 @@ public class GridCachePreloadingEvictionsSelfTest extends GridCommonAbstractTest
 
         return sb.toString();
     }
-}
\ No newline at end of file
+}

http://git-wip-us.apache.org/repos/asf/ignite/blob/0e29b873/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/paged/PageEvictionAbstractTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/paged/PageEvictionAbstractTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/paged/PageEvictionAbstractTest.java
index 072ca7f..cb0875f 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/paged/PageEvictionAbstractTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/paged/PageEvictionAbstractTest.java
@@ -40,13 +40,13 @@ public class PageEvictionAbstractTest extends GridCommonAbstractTest {
     protected static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true);
 
     /** Offheap size for memory policy. */
-    private static final int SIZE = 96 * 1024 * 1024;
+    private static final int SIZE = 20 * 1024 * 1024;
 
     /** Page size. */
     static final int PAGE_SIZE = 2048;
 
     /** Number of entries. */
-    static final int ENTRIES = 80_000;
+    static final int ENTRIES = 12_000;
 
     /** Empty pages pool size. */
     private static final int EMPTY_PAGES_POOL_SIZE = 100;