ignite-1607 WIP

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

Branch: refs/heads/ignite-1607
Commit: f0a17bc907d461d968dc762016a71ccdad1c8c55
Parents: bbbff70
Author: sboikov <[email protected]>
Authored: Wed Oct 21 18:01:01 2015 +0300
Committer: sboikov <[email protected]>
Committed: Wed Oct 21 18:02:12 2015 +0300

----------------------------------------------------------------------
 .../CacheSerializableTransactionsTest.java      | 22 +++++++++++++++++++-
 1 file changed, 21 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/f0a17bc9/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheSerializableTransactionsTest.java
----------------------------------------------------------------------
diff --git 
a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheSerializableTransactionsTest.java
 
b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheSerializableTransactionsTest.java
index 5622d6e..510f3e7 100644
--- 
a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheSerializableTransactionsTest.java
+++ 
b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheSerializableTransactionsTest.java
@@ -2822,6 +2822,13 @@ public class CacheSerializableTransactionsTest extends 
GridCommonAbstractTest {
     /**
      * @throws Exception If failed.
      */
+    public void testIncrementTxRestart() throws Exception {
+        incrementTx(false, false, true);
+    }
+
+    /**
+     * @throws Exception If failed.
+     */
     public void testIncrementTx1() throws Exception {
         incrementTx(false, false, false);
     }
@@ -2948,7 +2955,7 @@ public class CacheSerializableTransactionsTest extends 
GridCommonAbstractTest {
 
                 assertTrue(cntr.get() > 0);
 
-                checkValue(key, cntr.get(), cacheName);
+                checkValue(key, cntr.get(), cacheName, restart);
             }
 
             stop.set(true);
@@ -3990,7 +3997,20 @@ public class CacheSerializableTransactionsTest extends 
GridCommonAbstractTest {
      * @param cacheName Cache name.
      */
     private void checkValue(Object key, Object expVal, String cacheName) {
+        checkValue(key, expVal, cacheName, false);
+    }
+
+    /**
+     * @param key Key.
+     * @param expVal Expected value.
+     * @param cacheName Cache name.
+     * @param skipFirst If {@code true} skips first node.
+     */
+    private void checkValue(Object key, Object expVal, String cacheName, 
boolean skipFirst) {
         for (int i = 0; i < SRVS + CLIENTS; i++) {
+            if (skipFirst && i == 0)
+                continue;
+
             IgniteCache<Object, Object> cache = ignite(i).cache(cacheName);
 
             assertEquals(expVal, cache.get(key));

Reply via email to