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

mmuzaf 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 df36f11  IGNITE-15233 Move snapshot tests to dedicated suite with 
applying scale factor (#9584)
df36f11 is described below

commit df36f114326421ec80ed96dbc2dafdb75c5d725d
Author: Maxim Muzafarov <[email protected]>
AuthorDate: Thu Nov 25 14:13:19 2021 +0300

    IGNITE-15233 Move snapshot tests to dedicated suite with applying scale 
factor (#9584)
---
 .../snapshot/AbstractSnapshotSelfTest.java         |  8 +++-
 .../IgniteSnapshotRestoreFromRemoteTest.java       |  2 -
 .../IgniteBasicWithPersistenceTestSuite.java       | 21 ----------
 .../ignite/testsuites/IgniteSnapshotTestSuite.java | 48 ++++++++++++++++++++++
 .../testsuites/IgnitePdsWithIndexingTestSuite.java |  4 --
 .../IgniteSnapshotWithIndexingTestSuite.java       | 32 +++++++++++++++
 6 files changed, 87 insertions(+), 28 deletions(-)

diff --git 
a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/snapshot/AbstractSnapshotSelfTest.java
 
b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/snapshot/AbstractSnapshotSelfTest.java
index 82847cd..aec0646 100644
--- 
a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/snapshot/AbstractSnapshotSelfTest.java
+++ 
b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/snapshot/AbstractSnapshotSelfTest.java
@@ -50,6 +50,7 @@ import org.apache.ignite.IgniteLogger;
 import org.apache.ignite.binary.BinaryType;
 import org.apache.ignite.cache.CacheAtomicityMode;
 import org.apache.ignite.cache.CacheMode;
+import org.apache.ignite.cache.affinity.rendezvous.RendezvousAffinityFunction;
 import org.apache.ignite.cache.query.ScanQuery;
 import org.apache.ignite.cache.query.annotations.QuerySqlField;
 import org.apache.ignite.cluster.ClusterState;
@@ -91,6 +92,7 @@ import org.junit.runner.RunWith;
 import org.junit.runners.Parameterized;
 
 import static java.nio.file.Files.newDirectoryStream;
+import static 
org.apache.ignite.cache.affinity.rendezvous.RendezvousAffinityFunction.DFLT_PARTITION_COUNT;
 import static org.apache.ignite.cluster.ClusterState.ACTIVE;
 import static org.apache.ignite.cluster.ClusterState.INACTIVE;
 import static 
org.apache.ignite.configuration.DataStorageConfiguration.DFLT_PAGE_SIZE;
@@ -114,6 +116,9 @@ public abstract class AbstractSnapshotSelfTest extends 
GridCommonAbstractTest {
     /** Number of cache keys to pre-create at node start. */
     protected static final int CACHE_KEYS_RANGE = 1024;
 
+    /** Number of partitions within a snapshot cache group. */
+    protected static final int CACHE_PARTITIONS_COUNT = 
GridTestUtils.SF.apply(DFLT_PARTITION_COUNT);
+
     /** Timeout in milliseconds to await for snapshot operation being 
completed. */
     protected static final long TIMEOUT = 15_000;
 
@@ -279,7 +284,8 @@ public abstract class AbstractSnapshotSelfTest extends 
GridCommonAbstractTest {
     protected <K, V> CacheConfiguration<K, V> 
txCacheConfig(CacheConfiguration<K, V> ccfg) {
         return ccfg.setCacheMode(CacheMode.PARTITIONED)
             .setBackups(2)
-            .setAtomicityMode(CacheAtomicityMode.TRANSACTIONAL);
+            .setAtomicityMode(CacheAtomicityMode.TRANSACTIONAL)
+            .setAffinity(new RendezvousAffinityFunction(false, 
CACHE_PARTITIONS_COUNT));
     }
 
     /**
diff --git 
a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/snapshot/IgniteSnapshotRestoreFromRemoteTest.java
 
b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/snapshot/IgniteSnapshotRestoreFromRemoteTest.java
index 2c532fd..56ef3c2 100644
--- 
a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/snapshot/IgniteSnapshotRestoreFromRemoteTest.java
+++ 
b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/snapshot/IgniteSnapshotRestoreFromRemoteTest.java
@@ -36,7 +36,6 @@ import java.util.function.Function;
 import org.apache.ignite.Ignite;
 import org.apache.ignite.IgniteCheckedException;
 import org.apache.ignite.IgniteException;
-import org.apache.ignite.cache.affinity.rendezvous.RendezvousAffinityFunction;
 import org.apache.ignite.cluster.ClusterNode;
 import org.apache.ignite.cluster.ClusterState;
 import org.apache.ignite.configuration.CacheConfiguration;
@@ -112,7 +111,6 @@ public class IgniteSnapshotRestoreFromRemoteTest extends 
IgniteClusterSnapshotRe
             CacheConfiguration<Integer, Object> cacheCfg3 =
                 txCacheConfig(new CacheConfiguration<Integer, 
Object>(CACHE_WITH_NODE_FILTER))
                     .setBackups(1)
-                    .setAffinity(new RendezvousAffinityFunction(false, 16))
                     .setNodeFilter(ZERO_SUFFIX_NODE_FILTER);
 
             IgniteEx ignite = 
startDedicatedGridsWithCache(FIRST_CLUSTER_PREFIX, 6, CACHE_KEYS_RANGE, 
valBuilder,
diff --git 
a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteBasicWithPersistenceTestSuite.java
 
b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteBasicWithPersistenceTestSuite.java
index 12dc32d..721c5ad 100644
--- 
a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteBasicWithPersistenceTestSuite.java
+++ 
b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteBasicWithPersistenceTestSuite.java
@@ -40,16 +40,6 @@ import 
org.apache.ignite.internal.encryption.MasterKeyChangeTest;
 import 
org.apache.ignite.internal.processors.cache.persistence.CheckpointReadLockFailureTest;
 import 
org.apache.ignite.internal.processors.cache.persistence.CommonPoolStarvationCheckpointTest;
 import 
org.apache.ignite.internal.processors.cache.persistence.SingleNodePersistenceSslTest;
-import 
org.apache.ignite.internal.processors.cache.persistence.snapshot.EncryptedSnapshotTest;
-import 
org.apache.ignite.internal.processors.cache.persistence.snapshot.IgniteClusterSnapshotCheckTest;
-import 
org.apache.ignite.internal.processors.cache.persistence.snapshot.IgniteClusterSnapshotHandlerTest;
-import 
org.apache.ignite.internal.processors.cache.persistence.snapshot.IgniteClusterSnapshotRestoreSelfTest;
-import 
org.apache.ignite.internal.processors.cache.persistence.snapshot.IgniteClusterSnapshotSelfTest;
-import 
org.apache.ignite.internal.processors.cache.persistence.snapshot.IgniteSnapshotMXBeanTest;
-import 
org.apache.ignite.internal.processors.cache.persistence.snapshot.IgniteSnapshotManagerSelfTest;
-import 
org.apache.ignite.internal.processors.cache.persistence.snapshot.IgniteSnapshotRemoteRequestTest;
-import 
org.apache.ignite.internal.processors.cache.persistence.snapshot.IgniteSnapshotRestoreFromRemoteTest;
-import 
org.apache.ignite.internal.processors.cache.persistence.snapshot.IgniteSnapshotWithMetastorageTest;
 import 
org.apache.ignite.internal.processors.performancestatistics.CacheStartTest;
 import 
org.apache.ignite.internal.processors.performancestatistics.CheckpointTest;
 import 
org.apache.ignite.internal.processors.performancestatistics.ForwardReadTest;
@@ -101,17 +91,6 @@ import org.junit.runners.Suite;
 
     EncryptionMXBeanTest.class,
 
-    IgniteSnapshotManagerSelfTest.class,
-    IgniteClusterSnapshotSelfTest.class,
-    IgniteSnapshotRemoteRequestTest.class,
-    IgniteClusterSnapshotCheckTest.class,
-    IgniteSnapshotWithMetastorageTest.class,
-    IgniteSnapshotMXBeanTest.class,
-    IgniteClusterSnapshotRestoreSelfTest.class,
-    IgniteClusterSnapshotHandlerTest.class,
-    EncryptedSnapshotTest.class,
-    IgniteSnapshotRestoreFromRemoteTest.class,
-
     IgniteClusterIdTagTest.class,
     FullyConnectedComponentSearcherTest.class,
 
diff --git 
a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteSnapshotTestSuite.java
 
b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteSnapshotTestSuite.java
new file mode 100644
index 0000000..750e347
--- /dev/null
+++ 
b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteSnapshotTestSuite.java
@@ -0,0 +1,48 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.ignite.testsuites;
+
+import 
org.apache.ignite.internal.processors.cache.persistence.snapshot.EncryptedSnapshotTest;
+import 
org.apache.ignite.internal.processors.cache.persistence.snapshot.IgniteClusterSnapshotCheckTest;
+import 
org.apache.ignite.internal.processors.cache.persistence.snapshot.IgniteClusterSnapshotHandlerTest;
+import 
org.apache.ignite.internal.processors.cache.persistence.snapshot.IgniteClusterSnapshotRestoreSelfTest;
+import 
org.apache.ignite.internal.processors.cache.persistence.snapshot.IgniteClusterSnapshotSelfTest;
+import 
org.apache.ignite.internal.processors.cache.persistence.snapshot.IgniteSnapshotMXBeanTest;
+import 
org.apache.ignite.internal.processors.cache.persistence.snapshot.IgniteSnapshotManagerSelfTest;
+import 
org.apache.ignite.internal.processors.cache.persistence.snapshot.IgniteSnapshotRemoteRequestTest;
+import 
org.apache.ignite.internal.processors.cache.persistence.snapshot.IgniteSnapshotRestoreFromRemoteTest;
+import 
org.apache.ignite.internal.processors.cache.persistence.snapshot.IgniteSnapshotWithMetastorageTest;
+import org.junit.runner.RunWith;
+import org.junit.runners.Suite;
+
+/** */
+@RunWith(Suite.class)
[email protected]({
+    IgniteSnapshotManagerSelfTest.class,
+    IgniteClusterSnapshotSelfTest.class,
+    IgniteSnapshotRemoteRequestTest.class,
+    IgniteClusterSnapshotCheckTest.class,
+    IgniteSnapshotWithMetastorageTest.class,
+    IgniteSnapshotMXBeanTest.class,
+    IgniteClusterSnapshotRestoreSelfTest.class,
+    IgniteClusterSnapshotHandlerTest.class,
+    EncryptedSnapshotTest.class,
+    IgniteSnapshotRestoreFromRemoteTest.class
+})
+public class IgniteSnapshotTestSuite {
+}
diff --git 
a/modules/indexing/src/test/java/org/apache/ignite/testsuites/IgnitePdsWithIndexingTestSuite.java
 
b/modules/indexing/src/test/java/org/apache/ignite/testsuites/IgnitePdsWithIndexingTestSuite.java
index 3c4e311..acc21f4 100644
--- 
a/modules/indexing/src/test/java/org/apache/ignite/testsuites/IgnitePdsWithIndexingTestSuite.java
+++ 
b/modules/indexing/src/test/java/org/apache/ignite/testsuites/IgnitePdsWithIndexingTestSuite.java
@@ -32,9 +32,7 @@ import 
org.apache.ignite.internal.processors.cache.persistence.db.IgniteTcBotIni
 import 
org.apache.ignite.internal.processors.cache.persistence.db.IndexingMultithreadedLoadContinuousRestartTest;
 import 
org.apache.ignite.internal.processors.cache.persistence.db.LongDestroyDurableBackgroundTaskTest;
 import 
org.apache.ignite.internal.processors.cache.persistence.db.MultipleParallelCacheDeleteDeadlockTest;
-import 
org.apache.ignite.internal.processors.cache.persistence.snapshot.IgniteClusterSnapshotCheckWithIndexesTest;
 import 
org.apache.ignite.internal.processors.cache.persistence.snapshot.IgniteClusterSnapshotRestoreWithIndexingTest;
-import 
org.apache.ignite.internal.processors.cache.persistence.snapshot.IgniteClusterSnapshotWithIndexesTest;
 import 
org.apache.ignite.internal.processors.database.IgniteDbMultiNodeWithIndexingPutGetTest;
 import 
org.apache.ignite.internal.processors.database.IgniteDbSingleNodeWithIndexingPutGetTest;
 import 
org.apache.ignite.internal.processors.database.IgniteDbSingleNodeWithIndexingWalRestoreTest;
@@ -64,8 +62,6 @@ import org.junit.runners.Suite;
     LongDestroyDurableBackgroundTaskTest.class,
     RebuildIndexTest.class,
     RebuildIndexWithMVCCTest.class,
-    IgniteClusterSnapshotWithIndexesTest.class,
-    IgniteClusterSnapshotCheckWithIndexesTest.class,
     ClientReconnectWithSqlTableConfiguredTest.class,
     MultipleParallelCacheDeleteDeadlockTest.class,
     CacheGroupReencryptionTest.class,
diff --git 
a/modules/indexing/src/test/java/org/apache/ignite/testsuites/IgniteSnapshotWithIndexingTestSuite.java
 
b/modules/indexing/src/test/java/org/apache/ignite/testsuites/IgniteSnapshotWithIndexingTestSuite.java
new file mode 100644
index 0000000..4696a78
--- /dev/null
+++ 
b/modules/indexing/src/test/java/org/apache/ignite/testsuites/IgniteSnapshotWithIndexingTestSuite.java
@@ -0,0 +1,32 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.ignite.testsuites;
+
+import 
org.apache.ignite.internal.processors.cache.persistence.snapshot.IgniteClusterSnapshotCheckWithIndexesTest;
+import 
org.apache.ignite.internal.processors.cache.persistence.snapshot.IgniteClusterSnapshotWithIndexesTest;
+import org.junit.runner.RunWith;
+import org.junit.runners.Suite;
+
+/** */
+@RunWith(Suite.class)
[email protected]({
+    IgniteClusterSnapshotWithIndexesTest.class,
+    IgniteClusterSnapshotCheckWithIndexesTest.class
+})
+public class IgniteSnapshotWithIndexingTestSuite {
+}

Reply via email to