You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ignite.apache.org by av...@apache.org on 2019/07/10 07:52:07 UTC

[ignite] branch ignite-11973 created (now 15dfc1b)

This is an automated email from the ASF dual-hosted git repository.

av pushed a change to branch ignite-11973
in repository https://gitbox.apache.org/repos/asf/ignite.git.


      at 15dfc1b  WIP

This branch includes the following new commits:

     new 15dfc1b  WIP

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.



[ignite] 01/01: WIP

Posted by av...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

av pushed a commit to branch ignite-11973
in repository https://gitbox.apache.org/repos/asf/ignite.git

commit 15dfc1b094e0ca04a23413bc73c36e930278bb23
Author: Anton Vinogradov <av...@apache.org>
AuthorDate: Wed Jul 10 10:51:37 2019 +0300

    WIP
    
    Signed-off-by: Anton Vinogradov <av...@apache.org>
---
 .../cache/CacheSerializableTransactionsTest.java   | 32 ++++++++++++++++------
 1 file changed, 24 insertions(+), 8 deletions(-)

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 555c85f..39b6ae5 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
@@ -4075,7 +4075,7 @@ public class CacheSerializableTransactionsTest extends GridCommonAbstractTest {
      */
     @Test
     public void testAccountTx1() throws Exception {
-        accountTx(false, false, false, false);
+        accountTx(false, false, false, false, false);
     }
 
     /**
@@ -4083,7 +4083,7 @@ public class CacheSerializableTransactionsTest extends GridCommonAbstractTest {
      */
     @Test
     public void testAccountTx2() throws Exception {
-        accountTx(true, false, false, false);
+        accountTx(true, false, false, false, false);
     }
 
     /**
@@ -4091,7 +4091,7 @@ public class CacheSerializableTransactionsTest extends GridCommonAbstractTest {
      */
     @Test
     public void testAccountTxWithNonSerializable() throws Exception {
-        accountTx(false, false, true, false);
+        accountTx(false, false, true, false, false);
     }
 
     /**
@@ -4099,7 +4099,7 @@ public class CacheSerializableTransactionsTest extends GridCommonAbstractTest {
      */
     @Test
     public void testAccountTxNearCache() throws Exception {
-        accountTx(false, true, false, false);
+        accountTx(false, true, false, false, false);
     }
 
     /**
@@ -4107,7 +4107,15 @@ public class CacheSerializableTransactionsTest extends GridCommonAbstractTest {
      */
     @Test
     public void testAccountTxNodeRestart() throws Exception {
-        accountTx(false, false, false, true);
+        accountTx(false, false, false, true, false);
+    }
+
+    /**
+     * @throws Exception If failed.
+     */
+    @Test
+    public void testAccountTxNodeRestartWithReadRepair() throws Exception {
+        accountTx(false, false, false, true, true);
     }
 
     /**
@@ -4115,12 +4123,14 @@ public class CacheSerializableTransactionsTest extends GridCommonAbstractTest {
      * @param nearCache If {@code true} near cache is enabled.
      * @param nonSer If {@code true} starts threads executing non-serializable transactions.
      * @param restart If {@code true} restarts one node.
+     * @param readRepair If {@code true} uses withReadRepair proxy.
      * @throws Exception If failed.
      */
     private void accountTx(final boolean getAll,
         final boolean nearCache,
         final boolean nonSer,
-        final boolean restart) throws Exception {
+        final boolean restart,
+        final boolean readRepair) throws Exception {
         final Ignite srv = ignite(1);
 
         CacheConfiguration<Integer, Integer> ccfg = cacheConfiguration(PARTITIONED, FULL_SYNC, 1, false, false);
@@ -4161,10 +4171,13 @@ public class CacheSerializableTransactionsTest extends GridCommonAbstractTest {
 
                         final IgniteTransactions txs = node.transactions();
 
-                        final IgniteCache<Integer, Account> cache =
+                        IgniteCache<Integer, Account> cache =
                             nearCache ? node.createNearCache(cacheName, new NearCacheConfiguration<Integer, Account>()) :
                                 node.<Integer, Account>cache(cacheName);
 
+                        if (readRepair)
+                            cache = cache.withReadRepair();
+
                         assertNotNull(cache);
 
                         ThreadLocalRandom rnd = ThreadLocalRandom.current();
@@ -4219,10 +4232,13 @@ public class CacheSerializableTransactionsTest extends GridCommonAbstractTest {
 
                     final IgniteTransactions txs = node.transactions();
 
-                    final IgniteCache<Integer, Account> cache =
+                    IgniteCache<Integer, Account> cache =
                         nearCache ? node.createNearCache(cacheName, new NearCacheConfiguration<Integer, Account>()) :
                             node.<Integer, Account>cache(cacheName);
 
+                    if (readRepair)
+                        cache = cache.withReadRepair();
+
                     assertNotNull(cache);
 
                     ThreadLocalRandom rnd = ThreadLocalRandom.current();