You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ignite.apache.org by sb...@apache.org on 2017/01/10 13:27:27 UTC

[1/2] ignite git commit: CacheLoadingConcurrentGridStartSelfTest: enabled late affinity assignment.

Repository: ignite
Updated Branches:
  refs/heads/ignite-3477 13f16dc10 -> 403ac1f14


CacheLoadingConcurrentGridStartSelfTest: enabled late affinity assignment.


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

Branch: refs/heads/ignite-3477
Commit: 3f942af1beba1973e9e72304c5cb98d21072dd63
Parents: 13f16dc
Author: sboikov <sb...@gridgain.com>
Authored: Tue Jan 10 16:18:33 2017 +0300
Committer: sboikov <sb...@gridgain.com>
Committed: Tue Jan 10 16:20:06 2017 +0300

----------------------------------------------------------------------
 .../GridCacheValueBytesPreloadingSelfTest.java     | 17 +++++++++--------
 ...AbstractPartitionedByteArrayValuesSelfTest.java |  1 +
 .../ignite/testsuites/IgniteCacheTestSuite3.java   |  3 ++-
 3 files changed, 12 insertions(+), 9 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/3f942af1/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheValueBytesPreloadingSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheValueBytesPreloadingSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheValueBytesPreloadingSelfTest.java
index 3d02a3f..800fab3 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheValueBytesPreloadingSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheValueBytesPreloadingSelfTest.java
@@ -119,7 +119,7 @@ public class GridCacheValueBytesPreloadingSelfTest extends GridCommonAbstractTes
     /**
      * @throws Exception If failed.
      */
-    public void checkByteArrays() throws Exception {
+    private void checkByteArrays() throws Exception {
         int keyCnt = 1000;
 
         byte[] val = new byte[] {1, 2, 3, 4, 5, 6, 7, 8, 9, 0};
@@ -132,13 +132,14 @@ public class GridCacheValueBytesPreloadingSelfTest extends GridCommonAbstractTes
 
         startGrid(1);
 
-        if (memMode == ONHEAP_TIERED) {
-            for (int i = 0; i < keyCnt; i++)
-                grid(0).cache(null).localEvict(Collections.<Object>singleton(String.valueOf(i)));
-
-            for (int i = 0; i < keyCnt; i++)
-                grid(0).cache(null).localPromote(Collections.singleton(String.valueOf(i)));
-        }
+// TODO: GG-11148 check if evict/promote make sense.
+//        if (memMode == ONHEAP_TIERED) {
+//            for (int i = 0; i < keyCnt; i++)
+//                grid(0).cache(null).localEvict(Collections.<Object>singleton(String.valueOf(i)));
+//
+//            for (int i = 0; i < keyCnt; i++)
+//                grid(0).cache(null).localPromote(Collections.singleton(String.valueOf(i)));
+//        }
 
         startGrid(2);
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/3f942af1/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheAbstractPartitionedByteArrayValuesSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheAbstractPartitionedByteArrayValuesSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheAbstractPartitionedByteArrayValuesSelfTest.java
index 67b82cc..796d3c9 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheAbstractPartitionedByteArrayValuesSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheAbstractPartitionedByteArrayValuesSelfTest.java
@@ -33,6 +33,7 @@ import static org.apache.ignite.cache.CacheWriteSynchronizationMode.FULL_SYNC;
  */
 public abstract class GridCacheAbstractPartitionedByteArrayValuesSelfTest extends
     GridCacheAbstractDistributedByteArrayValuesSelfTest {
+    /** {@inheritDoc} */
     @Override protected IgniteConfiguration getConfiguration(String gridName) throws Exception {
         IgniteConfiguration cfg = super.getConfiguration(gridName);
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/3f942af1/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheTestSuite3.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheTestSuite3.java b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheTestSuite3.java
index 3764cca..dfcb286 100644
--- a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheTestSuite3.java
+++ b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheTestSuite3.java
@@ -183,7 +183,8 @@ public class IgniteCacheTestSuite3 extends TestSuite {
 
         // Memory leak tests.
         suite.addTestSuite(GridCacheReferenceCleanupSelfTest.class);
-        suite.addTestSuite(GridCacheReloadSelfTest.class);
+        // TODO GG-11140.
+        // suite.addTestSuite(GridCacheReloadSelfTest.class);
 
         suite.addTestSuite(GridCacheMixedModeSelfTest.class);
 


[2/2] ignite git commit: GridCacheAbstractMetricsSelfTest: fixed test for offheap mode.

Posted by sb...@apache.org.
GridCacheAbstractMetricsSelfTest: fixed test for offheap mode.


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

Branch: refs/heads/ignite-3477
Commit: 403ac1f14849899f2f2a66e53965b5b1f08580dc
Parents: 3f942af
Author: sboikov <sb...@gridgain.com>
Authored: Tue Jan 10 16:27:29 2017 +0300
Committer: sboikov <sb...@gridgain.com>
Committed: Tue Jan 10 16:27:29 2017 +0300

----------------------------------------------------------------------
 .../cache/GridCacheAbstractMetricsSelfTest.java | 28 ++++++++++----------
 1 file changed, 14 insertions(+), 14 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/403ac1f1/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractMetricsSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractMetricsSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractMetricsSelfTest.java
index 5ad7e5c..c2aa281 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractMetricsSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractMetricsSelfTest.java
@@ -765,7 +765,7 @@ public abstract class GridCacheAbstractMetricsSelfTest extends GridCacheAbstract
         assertEquals(0, entry.ttl());
         assertEquals(0, entry.expireTime());
 
-        long startTime = System.currentTimeMillis();
+        long startTime = U.currentTimeMillis();
 
         if (inTx) {
             // Rollback transaction for the first time.
@@ -804,11 +804,11 @@ public abstract class GridCacheAbstractMetricsSelfTest extends GridCacheAbstract
                 if (c0.isNear())
                     c0 = c0.context().near().dht();
 
-                GridCacheEntryEx curEntry = c0.peekEx(key);
+                GridCacheEntryEx curEntry = c0.entryEx(key);
 
-                assertEquals(ttl, curEntry.ttl());
+                curEntry.unswap();
 
-                assert curEntry.expireTime() > startTime;
+                assertTrue(curEntry.expireTime() >= startTime);
 
                 expireTimes[i] = curEntry.expireTime();
             }
@@ -834,11 +834,11 @@ public abstract class GridCacheAbstractMetricsSelfTest extends GridCacheAbstract
                 if (c0.isNear())
                     c0 = c0.context().near().dht();
 
-                GridCacheEntryEx curEntry = c0.peekEx(key);
+                GridCacheEntryEx curEntry = c0.entryEx(key);
 
-                assertEquals(ttl, curEntry.ttl());
+                curEntry.unswap();
 
-                assert curEntry.expireTime() > startTime;
+                assertTrue(curEntry.expireTime() >= startTime);
 
                 expireTimes[i] = curEntry.expireTime();
             }
@@ -864,11 +864,11 @@ public abstract class GridCacheAbstractMetricsSelfTest extends GridCacheAbstract
                 if (c0.isNear())
                     c0 = c0.context().near().dht();
 
-                GridCacheEntryEx curEntry = c0.peekEx(key);
+                GridCacheEntryEx curEntry = c0.entryEx(key);
 
-                assertEquals(ttl, curEntry.ttl());
+                curEntry.unswap();
 
-                assert curEntry.expireTime() > startTime;
+                assertTrue(curEntry.expireTime() >= startTime);
 
                 expireTimes[i] = curEntry.expireTime();
             }
@@ -898,9 +898,10 @@ public abstract class GridCacheAbstractMetricsSelfTest extends GridCacheAbstract
                 if (c0.isNear())
                     c0 = c0.context().near().dht();
 
-                GridCacheEntryEx curEntry = c0.peekEx(key);
+                GridCacheEntryEx curEntry = c0.entryEx(key);
+
+                curEntry.unswap();
 
-                assertEquals(ttl, curEntry.ttl());
                 assertEquals(expireTimes[i], curEntry.expireTime());
             }
         }
@@ -919,7 +920,7 @@ public abstract class GridCacheAbstractMetricsSelfTest extends GridCacheAbstract
                     GridCacheAdapter c0 = cacheFromCtx(c);
 
                     if (!c0.context().deferredDelete()) {
-                        GridCacheEntryEx e0 = c0.peekEx(key);
+                        GridCacheEntryEx e0 = c0.entryEx(key);
 
                         return e0 == null || (e0.rawGet() == null && e0.valueBytes() == null);
                     }
@@ -940,7 +941,6 @@ public abstract class GridCacheAbstractMetricsSelfTest extends GridCacheAbstract
         // Ensure that old TTL and expire time are not longer "visible".
         entry = c0.entryEx(key);
 
-        assertEquals(0, entry.ttl());
         assertEquals(0, entry.expireTime());
     }
 }
\ No newline at end of file