ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sboi...@apache.org
Subject incubator-ignite git commit: #ignite-1043: fix test
Date Mon, 22 Jun 2015 13:58:58 GMT
Repository: incubator-ignite
Updated Branches:
  refs/heads/ignite-1043 92a705fba -> cd9a97cd3


#ignite-1043: fix test


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

Branch: refs/heads/ignite-1043
Commit: cd9a97cd3a6e6bd57e788bdfaa68f3f89c768b6e
Parents: 92a705f
Author: ivasilinets <ivasilinets@gridgain.com>
Authored: Mon Jun 22 16:58:48 2015 +0300
Committer: ivasilinets <ivasilinets@gridgain.com>
Committed: Mon Jun 22 16:58:48 2015 +0300

----------------------------------------------------------------------
 .../IgniteCacheStoreSessionAbstractTest.java    | 31 ++++++++++----------
 .../IgniteCacheTxStoreSessionTest.java          |  4 +++
 2 files changed, 19 insertions(+), 16 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cd9a97cd/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/integration/IgniteCacheStoreSessionAbstractTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/integration/IgniteCacheStoreSessionAbstractTest.java
b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/integration/IgniteCacheStoreSessionAbstractTest.java
index 7b1f5ce..7784003 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/integration/IgniteCacheStoreSessionAbstractTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/integration/IgniteCacheStoreSessionAbstractTest.java
@@ -324,33 +324,32 @@ public abstract class IgniteCacheStoreSessionAbstractTest extends IgniteCacheAbs
         private void checkSession(String mtd) {
             assertNotNull(ignite);
 
-            if (!expData.isEmpty()) {
+            assertFalse(expData.isEmpty());
 
-                ExpectedData exp = expData.remove(0);
+            ExpectedData exp = expData.remove(0);
 
-                assertEquals(exp.expMtd, mtd);
+            assertEquals(exp.expMtd, mtd);
 
-                CacheStoreSession ses = session();
+            CacheStoreSession ses = session();
 
-                assertNotNull(ses);
+            assertNotNull(ses);
 
-                assertSame(ses, sesInParent);
+            assertSame(ses, sesInParent);
 
-                if (exp.tx)
-                    assertNotNull(ses.transaction());
-                else
-                    assertNull(ses.transaction());
+            if (exp.tx)
+                assertNotNull(ses.transaction());
+            else
+                assertNull(ses.transaction());
 
-                Map<Object, Object> props = ses.properties();
+            Map<Object, Object> props = ses.properties();
 
-                assertNotNull(props);
+            assertNotNull(props);
 
-                assertEquals(exp.expProps, props);
+            assertEquals(exp.expProps, props);
 
-                props.put(props.size(), mtd);
+            props.put(props.size(), mtd);
 
-                assertEquals(exp.expCacheName, ses.cacheName());
-            }
+            assertEquals(exp.expCacheName, ses.cacheName());
         }
     }
 }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cd9a97cd/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/integration/IgniteCacheTxStoreSessionTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/integration/IgniteCacheTxStoreSessionTest.java
b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/integration/IgniteCacheTxStoreSessionTest.java
index 269b9ae..c97fe29 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/integration/IgniteCacheTxStoreSessionTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/integration/IgniteCacheTxStoreSessionTest.java
@@ -135,9 +135,13 @@ public class IgniteCacheTxStoreSessionTest extends IgniteCacheStoreSessionAbstra
 
         try (Transaction tx = startTx(concurrency, isolation)) {
             log.info("Do tx get.");
+            expData.add(new ExpectedData(false, "load", new HashMap(), cache.getName()));
+            expData.add(new ExpectedData(true, "sessionEnd", F.<Object, Object>asMap(0,
"load"), cache.getName()));
 
             cache.get(key1);
 
+            expData.clear();
+
             log.info("Do tx put.");
 
             cache.put(key1, key1);


Mime
View raw message