You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ignite.apache.org by ip...@apache.org on 2019/08/09 08:31:28 UTC

[ignite] branch master updated: IGNITE-12050 Ignore and scale various MVCC tests - Fixes #6758.

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

ipavlukhin pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/ignite.git


The following commit(s) were added to refs/heads/master by this push:
     new 2d4fe21  IGNITE-12050 Ignore and scale various MVCC tests - Fixes #6758.
2d4fe21 is described below

commit 2d4fe21429ec402369ea59c6f7898961d16e33f9
Author: ipavlukhin <vo...@gmail.com>
AuthorDate: Fri Aug 9 11:30:22 2019 +0300

    IGNITE-12050 Ignore and scale various MVCC tests - Fixes #6758.
    
    Signed-off-by: ipavlukhin <vo...@gmail.com>
---
 .../cache/MvccCacheGroupMetricsTest.java           |  9 +++++
 .../cache/mvcc/CacheMvccTransactionsTest.java      | 45 +++++++++++++---------
 .../wal/IgniteNodeStoppedDuringDisableWALTest.java |  6 ++-
 .../mvcc/CacheMvccReplicatedSqlTxQueriesTest.java  |  2 +-
 .../cache/mvcc/CacheMvccSqlUpdateCountersTest.java |  2 +-
 5 files changed, 42 insertions(+), 22 deletions(-)

diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/MvccCacheGroupMetricsTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/MvccCacheGroupMetricsTest.java
index 3a6e21e..480b089 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/MvccCacheGroupMetricsTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/MvccCacheGroupMetricsTest.java
@@ -17,6 +17,8 @@
 package org.apache.ignite.internal.processors.cache;
 
 import org.apache.ignite.cache.CacheAtomicityMode;
+import org.junit.Ignore;
+import org.junit.Test;
 
 /**
  *
@@ -26,4 +28,11 @@ public class MvccCacheGroupMetricsTest extends CacheGroupMetricsTest {
     @Override protected CacheAtomicityMode atomicityMode() {
         return CacheAtomicityMode.TRANSACTIONAL_SNAPSHOT;
     }
+
+    /** {@inheritDoc} */
+    @Ignore("https://issues.apache.org/jira/browse/IGNITE-12039")
+    @Test
+    @Override public void testCacheGroupMetrics() throws Exception {
+        super.testCacheGroupMetrics();
+    }
 }
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccTransactionsTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccTransactionsTest.java
index cc87275..d1c519f 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccTransactionsTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccTransactionsTest.java
@@ -87,6 +87,7 @@ import org.apache.ignite.lang.IgniteBiTuple;
 import org.apache.ignite.lang.IgniteInClosure;
 import org.apache.ignite.plugin.extensions.communication.Message;
 import org.apache.ignite.testframework.GridTestUtils;
+import org.apache.ignite.testframework.GridTestUtils.SF;
 import org.apache.ignite.testframework.MvccFeatureChecker;
 import org.apache.ignite.transactions.Transaction;
 import org.apache.ignite.transactions.TransactionIsolation;
@@ -108,6 +109,9 @@ import static org.apache.ignite.transactions.TransactionIsolation.REPEATABLE_REA
  */
 @SuppressWarnings("unchecked")
 public class CacheMvccTransactionsTest extends CacheMvccAbstractTest {
+    /** */
+    private static final long SCALED_10SEC_TEST_TIME = SF.applyLB(10_000, 3_000);
+
     /** {@inheritDoc} */
     @Override protected CacheMode cacheMode() {
         return PARTITIONED;
@@ -1068,7 +1072,7 @@ public class CacheMvccTransactionsTest extends CacheMvccAbstractTest {
      */
     @Test
     public void testCleanupWaitsForGet1() throws Exception {
-        boolean vals[] = {true, false};
+        boolean[] vals = {true, false};
 
         for (boolean otherPuts : vals) {
             for (boolean putOnStart : vals) {
@@ -1903,8 +1907,6 @@ public class CacheMvccTransactionsTest extends CacheMvccAbstractTest {
 
         final int readers = 4;
 
-        final long time = 10_000;
-
         final AtomicInteger keyCntr = new AtomicInteger();
 
         GridInClosure3<Integer, List<TestCache>, AtomicBoolean> writer =
@@ -2019,7 +2021,7 @@ public class CacheMvccTransactionsTest extends CacheMvccAbstractTest {
             cacheParts,
             writers,
             readers,
-            time,
+            SCALED_10SEC_TEST_TIME,
             null,
             null,
             writer,
@@ -2029,6 +2031,7 @@ public class CacheMvccTransactionsTest extends CacheMvccAbstractTest {
     /**
      * @throws Exception If failed.
      */
+    @Ignore("https://issues.apache.org/jira/browse/IGNITE-12041")
     @Test
     public void testNodesRestartNoHang() throws Exception {
         final int srvs = 4;
@@ -2682,7 +2685,8 @@ public class CacheMvccTransactionsTest extends CacheMvccAbstractTest {
         int[] nValues = {3, 5, 10};
 
         for (int n : nValues) {
-            updateNObjectsTest(n, 1, 0, 0, 1, 10_000, null, GET, PUT, null);
+            updateNObjectsTest(n, 1, 0, 0, 1,
+                SCALED_10SEC_TEST_TIME, null, GET, PUT, null);
 
             afterTest();
         }
@@ -2696,7 +2700,8 @@ public class CacheMvccTransactionsTest extends CacheMvccAbstractTest {
         int[] nValues = {3, 5, 10};
 
         for (int n : nValues) {
-            updateNObjectsTest(n, 1, 0, 0, 64, 10_000, null, GET, PUT, null);
+            updateNObjectsTest(n, 1, 0, 0, 64,
+                SCALED_10SEC_TEST_TIME, null, GET, PUT, null);
 
             afterTest();
         }
@@ -2710,7 +2715,8 @@ public class CacheMvccTransactionsTest extends CacheMvccAbstractTest {
         int[] nValues = {3, 5, 10};
 
         for (int n : nValues) {
-            updateNObjectsTest(n, 1, 0, 0, 1, 10_000, null, SCAN, PUT, null);
+            updateNObjectsTest(n, 1, 0, 0, 1,
+                SCALED_10SEC_TEST_TIME, null, SCAN, PUT, null);
 
             afterTest();
         }
@@ -2724,7 +2730,8 @@ public class CacheMvccTransactionsTest extends CacheMvccAbstractTest {
         int[] nValues = {3, 5, 10};
 
         for (int n : nValues) {
-            updateNObjectsTest(n, 1, 0, 0, 64, 10_000, null, SCAN, PUT, null);
+            updateNObjectsTest(n, 1, 0, 0, 64,
+                SCALED_10SEC_TEST_TIME, null, SCAN, PUT, null);
 
             afterTest();
         }
@@ -2738,7 +2745,8 @@ public class CacheMvccTransactionsTest extends CacheMvccAbstractTest {
         int[] nValues = {3, 5, 10};
 
         for (int n : nValues) {
-            updateNObjectsTest(n, 4, 2, 2, DFLT_PARTITION_COUNT, 10_000, null, GET, PUT, null);
+            updateNObjectsTest(n, 4, 2, 2, DFLT_PARTITION_COUNT,
+                SCALED_10SEC_TEST_TIME, null, GET, PUT, null);
 
             afterTest();
         }
@@ -2752,7 +2760,8 @@ public class CacheMvccTransactionsTest extends CacheMvccAbstractTest {
         int[] nValues = {3, 5, 10};
 
         for (int n : nValues) {
-            updateNObjectsTest(n, 2, 1, 1, DFLT_PARTITION_COUNT, 10_000, null, SCAN, PUT, null);
+            updateNObjectsTest(n, 2, 1, 1, DFLT_PARTITION_COUNT,
+                SCALED_10SEC_TEST_TIME, null, SCAN, PUT, null);
 
             afterTest();
         }
@@ -2763,7 +2772,7 @@ public class CacheMvccTransactionsTest extends CacheMvccAbstractTest {
      */
     @Test
     public void testImplicitPartsScan_SingleNode_SinglePartition() throws Exception {
-        doImplicitPartsScanTest(1, 0, 0, 1, 10_000);
+        doImplicitPartsScanTest(1, 0, 0, 1);
     }
 
     /**
@@ -2771,7 +2780,7 @@ public class CacheMvccTransactionsTest extends CacheMvccAbstractTest {
      */
     @Test
     public void testImplicitPartsScan_SingleNode() throws Exception {
-        doImplicitPartsScanTest(1, 0, 0, 64, 10_000);
+        doImplicitPartsScanTest(1, 0, 0, 64);
     }
 
     /**
@@ -2779,7 +2788,7 @@ public class CacheMvccTransactionsTest extends CacheMvccAbstractTest {
      */
     @Test
     public void testImplicitPartsScan_ClientServer_Backups0() throws Exception {
-        doImplicitPartsScanTest(4, 2, 0, 64, 10_000);
+        doImplicitPartsScanTest(4, 2, 0, 64);
     }
 
     /**
@@ -2787,7 +2796,7 @@ public class CacheMvccTransactionsTest extends CacheMvccAbstractTest {
      */
     @Test
     public void testImplicitPartsScan_ClientServer_Backups1() throws Exception {
-        doImplicitPartsScanTest(4, 2, 1, 64, 10_000);
+        doImplicitPartsScanTest(4, 2, 1, 64);
     }
 
     /**
@@ -2795,7 +2804,7 @@ public class CacheMvccTransactionsTest extends CacheMvccAbstractTest {
      */
     @Test
     public void testImplicitPartsScan_ClientServer_Backups2() throws Exception {
-        doImplicitPartsScanTest(4, 2, 2, 64, 10_000);
+        doImplicitPartsScanTest(4, 2, 2, 64);
     }
 
     /**
@@ -2803,15 +2812,13 @@ public class CacheMvccTransactionsTest extends CacheMvccAbstractTest {
      * @param clients Number of client nodes.
      * @param cacheBackups Number of cache backups.
      * @param cacheParts Number of cache partitions.
-     * @param time Test time.
      * @throws Exception If failed.
      */
     private void doImplicitPartsScanTest(
         final int srvs,
         final int clients,
         int cacheBackups,
-        int cacheParts,
-        long time) throws Exception {
+        int cacheParts) throws Exception {
         final int KEYS_PER_PART = 20;
 
         final int writers = 4;
@@ -2983,7 +2990,7 @@ public class CacheMvccTransactionsTest extends CacheMvccAbstractTest {
             cacheParts,
             writers,
             readers,
-            time,
+            SCALED_10SEC_TEST_TIME,
             null,
             init,
             writer,
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/IgniteNodeStoppedDuringDisableWALTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/IgniteNodeStoppedDuringDisableWALTest.java
index bf3be7f..9a40ca3 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/IgniteNodeStoppedDuringDisableWALTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/IgniteNodeStoppedDuringDisableWALTest.java
@@ -41,8 +41,10 @@ import org.apache.ignite.internal.processors.cache.persistence.GridCacheDatabase
 import org.apache.ignite.internal.processors.cache.persistence.file.FilePageStoreManager;
 import org.apache.ignite.internal.processors.cache.persistence.filename.PdsFoldersResolver;
 import org.apache.ignite.testframework.GridTestUtils;
+import org.apache.ignite.testframework.MvccFeatureChecker;
 import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest;
 import org.junit.Assert;
+import org.junit.Assume;
 import org.junit.Test;
 import org.junit.runner.RunWith;
 import org.junit.runners.Parameterized;
@@ -62,7 +64,6 @@ import static org.apache.ignite.testframework.GridTestUtils.setFieldValue;
  */
 @RunWith(Parameterized.class)
 public class IgniteNodeStoppedDuringDisableWALTest extends GridCommonAbstractTest {
-
     /** Crash point. */
     private NodeStopPoint nodeStopPoint;
 
@@ -112,6 +113,9 @@ public class IgniteNodeStoppedDuringDisableWALTest extends GridCommonAbstractTes
      */
     @Test
     public void test() throws Exception {
+        Assume.assumeFalse("https://issues.apache.org/jira/browse/IGNITE-12040",
+            MvccFeatureChecker.forcedMvcc() && nodeStopPoint == NodeStopPoint.AFTER_DISABLE_WAL);
+
         testStopNodeWithDisableWAL(nodeStopPoint);
 
         stopAllGrids();
diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccReplicatedSqlTxQueriesTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccReplicatedSqlTxQueriesTest.java
index dd26dce..d9555ef 100644
--- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccReplicatedSqlTxQueriesTest.java
+++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccReplicatedSqlTxQueriesTest.java
@@ -70,7 +70,7 @@ public class CacheMvccReplicatedSqlTxQueriesTest extends CacheMvccSqlTxQueriesAb
     /**
      * @throws Exception If failed.
      */
-    public void checkReplicatedJoinPartitioned(boolean client) throws Exception {
+    private void checkReplicatedJoinPartitioned(boolean client) throws Exception {
         ccfgs = new CacheConfiguration[] {
             cacheConfiguration(REPLICATED, FULL_SYNC, 0, DFLT_PARTITION_COUNT)
                 .setName("int")
diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccSqlUpdateCountersTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccSqlUpdateCountersTest.java
index f6588c4..86273cb 100644
--- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccSqlUpdateCountersTest.java
+++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccSqlUpdateCountersTest.java
@@ -507,7 +507,7 @@ public class CacheMvccSqlUpdateCountersTest extends CacheMvccAbstractTest {
             parts,
             writers,
             readers,
-            30_000,
+            DFLT_TEST_TIME,
             new InitIndexing(Integer.class, MvccTestAccount.class),
             init,
             writer,