ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sboi...@apache.org
Subject ignite git commit: GridCacheTxNodeFailureSelfTest: fixed test to properly get cache entry.
Date Mon, 09 Jan 2017 11:03:08 GMT
Repository: ignite
Updated Branches:
  refs/heads/ignite-3477 c11209279 -> 18caed3a3


GridCacheTxNodeFailureSelfTest: fixed test to properly get cache entry.


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

Branch: refs/heads/ignite-3477
Commit: 18caed3a393dd40aaec3302a6882c49923ca4c2e
Parents: c112092
Author: sboikov <sboikov@gridgain.com>
Authored: Mon Jan 9 14:03:14 2017 +0300
Committer: sboikov <sboikov@gridgain.com>
Committed: Mon Jan 9 14:03:14 2017 +0300

----------------------------------------------------------------------
 .../dht/GridCacheTxNodeFailureSelfTest.java            | 13 +++++++++----
 1 file changed, 9 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/18caed3a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheTxNodeFailureSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheTxNodeFailureSelfTest.java
b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheTxNodeFailureSelfTest.java
index 622fd3b..824956a 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheTxNodeFailureSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheTxNodeFailureSelfTest.java
@@ -300,6 +300,8 @@ public class GridCacheTxNodeFailureSelfTest extends GridCommonAbstractTest
{
 
             commitLatch.await();
 
+            Thread.sleep(1000);
+
             stopGrid(1);
 
             // Check that thread successfully finished.
@@ -341,7 +343,9 @@ public class GridCacheTxNodeFailureSelfTest extends GridCommonAbstractTest
{
         if (backupCache.isNear())
             backupCache = backupCache.context().near().dht();
 
-        GridDhtCacheEntry dhtEntry = (GridDhtCacheEntry)backupCache.peekEx(key);
+        GridDhtCacheEntry dhtEntry = (GridDhtCacheEntry)backupCache.entryEx(key);
+
+        dhtEntry.unswap();
 
         if (commit) {
             assertNotNull(dhtEntry);
@@ -359,9 +363,10 @@ public class GridCacheTxNodeFailureSelfTest extends GridCommonAbstractTest
{
         }
         else {
             assertTrue("near=" + nearEntry + ", hc=" + System.identityHashCode(nearEntry),
nearEntry == null);
-            assertTrue("Invalid backup cache entry: " + dhtEntry,
-                dhtEntry == null || dhtEntry.rawGet() == null);
+            assertTrue("Invalid backup cache entry: " + dhtEntry, dhtEntry.rawGet() == null);
         }
+
+        backupCache.context().evicts().touch(dhtEntry, null);
     }
 
     /**
@@ -406,7 +411,7 @@ public class GridCacheTxNodeFailureSelfTest extends GridCommonAbstractTest
{
         /**
          * @param bannedClasses Banned classes.
          */
-        public void bannedClasses(Collection<Class> bannedClasses) {
+        void bannedClasses(Collection<Class> bannedClasses) {
             this.bannedClasses = bannedClasses;
         }
 


Mime
View raw message