Skip to content

Commit

Permalink
IGNITE-12050 Ignore and scale various MVCC tests - Fixes #6758.
Browse files Browse the repository at this point in the history
Signed-off-by: ipavlukhin <vololo100@gmail.com>
  • Loading branch information
pavlukhin committed Aug 9, 2019
1 parent 1f8cf04 commit 2d4fe21
Show file tree
Hide file tree
Showing 5 changed files with 42 additions and 22 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;

/**
*
Expand All @@ -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();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@
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;
Expand All @@ -108,6 +109,9 @@
*/
@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;
Expand Down Expand Up @@ -1068,7 +1072,7 @@ public void testPartialCommitResultNoVisible() throws Exception {
*/
@Test
public void testCleanupWaitsForGet1() throws Exception {
boolean vals[] = {true, false};
boolean[] vals = {true, false};

for (boolean otherPuts : vals) {
for (boolean putOnStart : vals) {
Expand Down Expand Up @@ -1903,8 +1907,6 @@ private void operationsSequenceConsistency(

final int readers = 4;

final long time = 10_000;

final AtomicInteger keyCntr = new AtomicInteger();

GridInClosure3<Integer, List<TestCache>, AtomicBoolean> writer =
Expand Down Expand Up @@ -2019,7 +2021,7 @@ private void operationsSequenceConsistency(
cacheParts,
writers,
readers,
time,
SCALED_10SEC_TEST_TIME,
null,
null,
writer,
Expand All @@ -2029,6 +2031,7 @@ private void operationsSequenceConsistency(
/**
* @throws Exception If failed.
*/
@Ignore("https://issues.apache.org/jira/browse/IGNITE-12041")
@Test
public void testNodesRestartNoHang() throws Exception {
final int srvs = 4;
Expand Down Expand Up @@ -2682,7 +2685,8 @@ public void testUpdate_N_Objects_SingleNode_SinglePartition_Get() throws Excepti
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();
}
Expand All @@ -2696,7 +2700,8 @@ public void testUpdate_N_Objects_SingleNode_Get() throws Exception {
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();
}
Expand All @@ -2710,7 +2715,8 @@ public void testUpdate_N_Objects_SingleNode_SinglePartition_Scan() throws Except
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();
}
Expand All @@ -2724,7 +2730,8 @@ public void testUpdate_N_Objects_SingleNode_Scan() throws Exception {
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();
}
Expand All @@ -2738,7 +2745,8 @@ public void testUpdate_N_Objects_ClientServer_Backups2_Get() throws Exception {
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();
}
Expand All @@ -2752,7 +2760,8 @@ public void testUpdate_N_Objects_ClientServer_Backups1_Scan() throws Exception {
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();
}
Expand All @@ -2763,55 +2772,53 @@ public void testUpdate_N_Objects_ClientServer_Backups1_Scan() throws Exception {
*/
@Test
public void testImplicitPartsScan_SingleNode_SinglePartition() throws Exception {
doImplicitPartsScanTest(1, 0, 0, 1, 10_000);
doImplicitPartsScanTest(1, 0, 0, 1);
}

/**
* @throws Exception If failed.
*/
@Test
public void testImplicitPartsScan_SingleNode() throws Exception {
doImplicitPartsScanTest(1, 0, 0, 64, 10_000);
doImplicitPartsScanTest(1, 0, 0, 64);
}

/**
* @throws Exception If failed.
*/
@Test
public void testImplicitPartsScan_ClientServer_Backups0() throws Exception {
doImplicitPartsScanTest(4, 2, 0, 64, 10_000);
doImplicitPartsScanTest(4, 2, 0, 64);
}

/**
* @throws Exception If failed.
*/
@Test
public void testImplicitPartsScan_ClientServer_Backups1() throws Exception {
doImplicitPartsScanTest(4, 2, 1, 64, 10_000);
doImplicitPartsScanTest(4, 2, 1, 64);
}

/**
* @throws Exception If failed.
*/
@Test
public void testImplicitPartsScan_ClientServer_Backups2() throws Exception {
doImplicitPartsScanTest(4, 2, 2, 64, 10_000);
doImplicitPartsScanTest(4, 2, 2, 64);
}

/**
* @param srvs Number of server nodes.
* @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;
Expand Down Expand Up @@ -2983,7 +2990,7 @@ private void doImplicitPartsScanTest(
cacheParts,
writers,
readers,
time,
SCALED_10SEC_TEST_TIME,
null,
init,
writer,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,10 @@
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;
Expand All @@ -62,7 +64,6 @@
*/
@RunWith(Parameterized.class)
public class IgniteNodeStoppedDuringDisableWALTest extends GridCommonAbstractTest {

/** Crash point. */
private NodeStopPoint nodeStopPoint;

Expand Down Expand Up @@ -112,6 +113,9 @@ public IgniteNodeStoppedDuringDisableWALTest(NodeStopPoint nodeStopPoint) {
*/
@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();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ public void testReplicatedJoinPartitionedServer() throws Exception {
/**
* @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")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -507,7 +507,7 @@ public void testUpdateCountersMultithreaded() throws Exception {
parts,
writers,
readers,
30_000,
DFLT_TEST_TIME,
new InitIndexing(Integer.class, MvccTestAccount.class),
init,
writer,
Expand Down

0 comments on commit 2d4fe21

Please sign in to comment.