You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ignite.apache.org by GitBox <gi...@apache.org> on 2019/01/11 13:53:25 UTC

[GitHub] asfgit closed pull request #5740: IGNITE-10778: Test stability improved by reducing iterations number in the MVCC case

asfgit closed pull request #5740: IGNITE-10778: Test stability improved by reducing iterations number in the MVCC case
URL: https://github.com/apache/ignite/pull/5740
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheMultinodeUpdateAbstractSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheMultinodeUpdateAbstractSelfTest.java
index d9b172a311a1..aec0f7bd9e3a 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheMultinodeUpdateAbstractSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheMultinodeUpdateAbstractSelfTest.java
@@ -26,12 +26,10 @@
 import org.apache.ignite.cache.CacheMode;
 import org.apache.ignite.configuration.CacheConfiguration;
 import org.apache.ignite.testframework.GridTestUtils;
-import org.apache.ignite.testframework.MvccFeatureChecker;
 import org.junit.Test;
 import org.junit.runner.RunWith;
 import org.junit.runners.JUnit4;
 
-import static org.apache.ignite.cache.CacheAtomicityMode.ATOMIC;
 import static org.apache.ignite.cache.CacheMode.PARTITIONED;
 import static org.apache.ignite.testframework.MvccFeatureChecker.assertMvccWriteConflict;
 
@@ -82,9 +80,6 @@
      */
     @Test
     public void testInvoke() throws Exception {
-        if (MvccFeatureChecker.forcedMvcc())
-            fail("https://issues.apache.org/jira/browse/IGNITE-10778");
-
         IgniteCache<Integer, Integer> cache = grid(0).cache(DEFAULT_CACHE_NAME);
 
         final Integer key = primaryKey(cache);
@@ -96,8 +91,14 @@ public void testInvoke() throws Exception {
 
         Integer expVal = 0;
 
-        for (int i = 0; i < iterations(); i++) {
-            log.info("Iteration: " + i);
+        final long testTime = GridTestUtils.SF.applyLB(60_000, 10_000);
+
+        final long endTime = System.currentTimeMillis() + testTime;
+
+        int iter = 0;
+
+        while (System.currentTimeMillis() < endTime) {
+            log.info("Iteration: " + iter);
 
             final AtomicInteger gridIdx = new AtomicInteger();
 
@@ -135,14 +136,9 @@ public void testInvoke() throws Exception {
 
                 assertEquals("Unexpected value for grid " + j, expVal, val);
             }
-        }
-    }
 
-    /**
-     * @return Number of iterations.
-     */
-    protected int iterations() {
-        return atomicityMode() == ATOMIC ? 30 : 15;
+            iter++;
+        }
     }
 
     /**


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services