http://git-wip-us.apache.org/repos/asf/ignite/blob/f0544d46/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/IgniteWalRebalanceTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/IgniteWalRebalanceTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/IgniteWalRebalanceTest.java index febe456..ab34b0f 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/IgniteWalRebalanceTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/IgniteWalRebalanceTest.java @@ -63,12 +63,16 @@ import org.apache.ignite.spi.IgniteSpiException; import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.junit.Assert; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.IgniteSystemProperties.IGNITE_PDS_WAL_REBALANCE_THRESHOLD; /** * Historical WAL rebalance base test. */ +@RunWith(JUnit4.class) public class IgniteWalRebalanceTest extends GridCommonAbstractTest { /** Cache name. */ private static final String CACHE_NAME = "cache"; @@ -148,6 +152,7 @@ public class IgniteWalRebalanceTest extends GridCommonAbstractTest { * * @throws Exception if failed. */ + @Test public void testSimple() throws Exception { IgniteEx ig0 = startGrid(0); IgniteEx ig1 = startGrid(1); @@ -187,6 +192,7 @@ public class IgniteWalRebalanceTest extends GridCommonAbstractTest { * * @throws Exception If failed. */ + @Test public void testRebalanceRemoves() throws Exception { IgniteEx ig0 = startGrid(0); IgniteEx ig1 = startGrid(1); @@ -234,6 +240,7 @@ public class IgniteWalRebalanceTest extends GridCommonAbstractTest { * * @throws Exception If failed. */ + @Test public void testWithLocalWalChange() throws Exception { System.setProperty(IgniteSystemProperties.IGNITE_DISABLE_WAL_DURING_REBALANCING, "true"); @@ -323,6 +330,7 @@ public class IgniteWalRebalanceTest extends GridCommonAbstractTest { * * @throws Exception If failed. */ + @Test public void testWithGlobalWalChange() throws Exception { // Prepare some data. IgniteEx crd = (IgniteEx) startGrids(3); @@ -402,6 +410,7 @@ public class IgniteWalRebalanceTest extends GridCommonAbstractTest { * * @throws Exception If failed. */ + @Test public void testRebalanceCancelOnSupplyError() throws Exception { // Prepare some data. IgniteEx crd = (IgniteEx) startGrids(3); @@ -637,4 +646,4 @@ public class IgniteWalRebalanceTest extends GridCommonAbstractTest { failRead = false; } } -} \ No newline at end of file +}
http://git-wip-us.apache.org/repos/asf/ignite/blob/f0544d46/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/IgniteWalRecoveryPPCTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/IgniteWalRecoveryPPCTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/IgniteWalRecoveryPPCTest.java index 49cf5b4..f5675ec 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/IgniteWalRecoveryPPCTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/IgniteWalRecoveryPPCTest.java @@ -31,10 +31,14 @@ import org.apache.ignite.configuration.WALMode; import org.apache.ignite.internal.IgniteEx; import org.apache.ignite.internal.util.typedef.internal.S; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * */ +@RunWith(JUnit4.class) public class IgniteWalRecoveryPPCTest extends GridCommonAbstractTest { /** */ private boolean fork; @@ -137,6 +141,7 @@ public class IgniteWalRecoveryPPCTest extends GridCommonAbstractTest { /** * @throws Exception if failed. */ + @Test public void testWalSimple() throws Exception { try { IgniteEx ignite = startGrid(1); @@ -233,6 +238,7 @@ public class IgniteWalRecoveryPPCTest extends GridCommonAbstractTest { /** * */ + @Test public void testDynamicallyStartedNonPersistentCache() throws Exception { try { IgniteEx ignite = startGrid(1); http://git-wip-us.apache.org/repos/asf/ignite/blob/f0544d46/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/IgniteWalRecoverySeveralRestartsTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/IgniteWalRecoverySeveralRestartsTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/IgniteWalRecoverySeveralRestartsTest.java index db20ace..cb2ea1d 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/IgniteWalRecoverySeveralRestartsTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/IgniteWalRecoverySeveralRestartsTest.java @@ -37,10 +37,14 @@ import org.apache.ignite.internal.util.typedef.internal.S; import org.apache.ignite.internal.util.typedef.internal.U; import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * */ +@RunWith(JUnit4.class) public class IgniteWalRecoverySeveralRestartsTest extends GridCommonAbstractTest { /** */ public static final int PAGE_SIZE = 1024; @@ -113,6 +117,7 @@ public class IgniteWalRecoverySeveralRestartsTest extends GridCommonAbstractTest /** * @throws Exception if failed. */ + @Test public void testWalRecoverySeveralRestarts() throws Exception { try { IgniteEx ignite = startGrid(1); @@ -168,6 +173,7 @@ public class IgniteWalRecoverySeveralRestartsTest extends GridCommonAbstractTest /** * @throws Exception if failed. */ + @Test public void testWalRecoveryWithDynamicCache() throws Exception { try { IgniteEx ignite = startGrid(1); @@ -221,6 +227,7 @@ public class IgniteWalRecoverySeveralRestartsTest extends GridCommonAbstractTest /** * @throws Exception if failed. */ + @Test public void testWalRecoveryWithDynamicCacheLargeObjects() throws Exception { try { IgniteEx ignite = startGrid(1); http://git-wip-us.apache.org/repos/asf/ignite/blob/f0544d46/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/IgniteWalSerializerVersionTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/IgniteWalSerializerVersionTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/IgniteWalSerializerVersionTest.java index dcb8e7f..e040415 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/IgniteWalSerializerVersionTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/IgniteWalSerializerVersionTest.java @@ -48,6 +48,9 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.TcpDiscoveryIpFinder; import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.IgniteSystemProperties.IGNITE_WAL_SERIALIZER_VERSION; import static org.apache.ignite.transactions.TransactionState.PREPARED; @@ -55,6 +58,7 @@ import static org.apache.ignite.transactions.TransactionState.PREPARED; /** * */ +@RunWith(JUnit4.class) public class IgniteWalSerializerVersionTest extends GridCommonAbstractTest { /** Ip finder. */ private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true); @@ -76,6 +80,7 @@ public class IgniteWalSerializerVersionTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testCheckDifferentSerializerVersions() throws Exception { System.setProperty(IGNITE_WAL_SERIALIZER_VERSION, "1"); @@ -127,6 +132,7 @@ public class IgniteWalSerializerVersionTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testCheckDifferentSerializerVersionsAndLogTimestamp() throws Exception { IgniteCallable<List<WALRecord>> recordsFactory = new IgniteCallable<List<WALRecord>>() { @Override public List<WALRecord> call() throws Exception { http://git-wip-us.apache.org/repos/asf/ignite/blob/f0544d46/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/WalCompactionAfterRestartTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/WalCompactionAfterRestartTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/WalCompactionAfterRestartTest.java index 3685fe7..ac79600 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/WalCompactionAfterRestartTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/WalCompactionAfterRestartTest.java @@ -43,10 +43,14 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.TcpDiscoveryIpFinder; import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.events.EventType.EVT_WAL_SEGMENT_COMPACTED; /** */ +@RunWith(JUnit4.class) public class WalCompactionAfterRestartTest extends GridCommonAbstractTest { /** */ private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true); @@ -100,6 +104,7 @@ public class WalCompactionAfterRestartTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void test() throws Exception { IgniteEx ig = startGrid(0); http://git-wip-us.apache.org/repos/asf/ignite/blob/f0544d46/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/WalCompactionTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/WalCompactionTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/WalCompactionTest.java index 14525f0..13837a6 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/WalCompactionTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/WalCompactionTest.java @@ -1,19 +1,19 @@ /* -* 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. -*/ + * 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.internal.processors.cache.persistence.db.wal; import java.io.File; http://git-wip-us.apache.org/repos/asf/ignite/blob/f0544d46/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/WalDeletionArchiveAbstractTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/WalDeletionArchiveAbstractTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/WalDeletionArchiveAbstractTest.java index 3a99236..c2296e5 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/WalDeletionArchiveAbstractTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/WalDeletionArchiveAbstractTest.java @@ -34,12 +34,16 @@ import org.apache.ignite.internal.processors.cache.persistence.checkpoint.Checkp import org.apache.ignite.internal.processors.cache.persistence.wal.FileDescriptor; import org.apache.ignite.internal.util.typedef.internal.U; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.IgniteSystemProperties.IGNITE_PDS_MAX_CHECKPOINT_MEMORY_HISTORY_SIZE; /** * */ +@RunWith(JUnit4.class) public abstract class WalDeletionArchiveAbstractTest extends GridCommonAbstractTest { /** */ public static final String CACHE_NAME = "SomeCache"; @@ -94,6 +98,7 @@ public abstract class WalDeletionArchiveAbstractTest extends GridCommonAbstractT /** * History size parameters consistency check. Should be set just one of wal history size or max wal archive size. */ + @Test public void testGridDoesNotStart_BecauseBothWalHistorySizeAndMaxWalArchiveSizeUsed() throws Exception { //given: wal history size and max wal archive size are both set. IgniteConfiguration configuration = getConfiguration(getTestIgniteInstanceName()); @@ -124,6 +129,7 @@ public abstract class WalDeletionArchiveAbstractTest extends GridCommonAbstractT /** * Correct delete archived wal files. */ + @Test public void testCorrectDeletedArchivedWalFiles() throws Exception { //given: configured grid with setted max wal archive size long maxWalArchiveSize = 2 * 1024 * 1024; @@ -164,6 +170,7 @@ public abstract class WalDeletionArchiveAbstractTest extends GridCommonAbstractT /** * Checkpoint triggered depends on wal size. */ + @Test public void testCheckpointStarted_WhenWalHasTooBigSizeWithoutCheckpoint() throws Exception { //given: configured grid with max wal archive size = 1MB, wal segment size = 512KB Ignite ignite = startGrid(dbCfg -> { @@ -190,6 +197,7 @@ public abstract class WalDeletionArchiveAbstractTest extends GridCommonAbstractT * * @deprecated Test old removing process depends on WalHistorySize. */ + @Test public void testCheckpointHistoryRemovingByWalHistorySize() throws Exception { //given: configured grid with wal history size = 10 int walHistorySize = 10; @@ -224,6 +232,7 @@ public abstract class WalDeletionArchiveAbstractTest extends GridCommonAbstractT * Correct delete checkpoint history from memory depends on IGNITE_PDS_MAX_CHECKPOINT_MEMORY_HISTORY_SIZE. WAL files * doesn't delete because deleting was disabled. */ + @Test public void testCorrectDeletedCheckpointHistoryButKeepWalFiles() throws Exception { System.setProperty(IGNITE_PDS_MAX_CHECKPOINT_MEMORY_HISTORY_SIZE, "2"); //given: configured grid with disabled WAL removing. http://git-wip-us.apache.org/repos/asf/ignite/blob/f0544d46/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/WalPathsTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/WalPathsTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/WalPathsTest.java index 7141fed..d64953e 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/WalPathsTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/WalPathsTest.java @@ -23,8 +23,12 @@ import org.apache.ignite.configuration.DataStorageConfiguration; import org.apache.ignite.configuration.IgniteConfiguration; import org.apache.ignite.internal.util.typedef.internal.U; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** Tests equal paths to WAL storage and WAL archive. */ +@RunWith(JUnit4.class) public class WalPathsTest extends GridCommonAbstractTest { /** WalPath and WalArchivePath. */ private File walDir; @@ -67,6 +71,7 @@ public class WalPathsTest extends GridCommonAbstractTest { * * @throws Exception If failed. */ + @Test public void testWalStoreAndArchivePathsEquality() throws Exception { IgniteConfiguration cfg = getConfig(false); @@ -78,6 +83,7 @@ public class WalPathsTest extends GridCommonAbstractTest { * * @throws Exception If failed. */ + @Test public void testWalStoreAndArchiveAbsolutAndRelativePathsEquality() throws Exception { final IgniteConfiguration cfg = getConfig(true); http://git-wip-us.apache.org/repos/asf/ignite/blob/f0544d46/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/WalRecoveryTxLogicalRecordsTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/WalRecoveryTxLogicalRecordsTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/WalRecoveryTxLogicalRecordsTest.java index d2ea4f1..9837ce6 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/WalRecoveryTxLogicalRecordsTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/WalRecoveryTxLogicalRecordsTest.java @@ -65,10 +65,14 @@ import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.apache.ignite.transactions.Transaction; import org.junit.Assert; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * */ +@RunWith(JUnit4.class) public class WalRecoveryTxLogicalRecordsTest extends GridCommonAbstractTest { /** Cache name. */ private static final String CACHE_NAME = "cache"; @@ -146,6 +150,7 @@ public class WalRecoveryTxLogicalRecordsTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testWalTxSimple() throws Exception { Ignite ignite = startGrid(); @@ -221,6 +226,7 @@ public class WalRecoveryTxLogicalRecordsTest extends GridCommonAbstractTest { /** * @throws Exception if failed. */ + @Test public void testWalRecoveryRemoves() throws Exception { Ignite ignite = startGrid(); @@ -309,6 +315,7 @@ public class WalRecoveryTxLogicalRecordsTest extends GridCommonAbstractTest { /** * @throws Exception if failed. */ + @Test public void testHistoricalRebalanceIterator() throws Exception { System.setProperty(IgniteSystemProperties.IGNITE_PDS_WAL_REBALANCE_THRESHOLD, "0"); @@ -473,6 +480,7 @@ public class WalRecoveryTxLogicalRecordsTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testWalAfterPreloading() throws Exception { Ignite ignite = startGrid(); @@ -515,6 +523,7 @@ public class WalRecoveryTxLogicalRecordsTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testRecoveryRandomPutRemove() throws Exception { try { pageSize = 1024; @@ -572,6 +581,7 @@ public class WalRecoveryTxLogicalRecordsTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testRecoveryNoPageLost1() throws Exception { recoveryNoPageLost(false); } @@ -579,6 +589,7 @@ public class WalRecoveryTxLogicalRecordsTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testRecoveryNoPageLost2() throws Exception { recoveryNoPageLost(true); } @@ -588,6 +599,7 @@ public class WalRecoveryTxLogicalRecordsTest extends GridCommonAbstractTest { * * @throws Exception If failed. */ + @Test public void testRecoveryNoPageLost3() throws Exception { try { pageSize = 1024; @@ -723,6 +735,7 @@ public class WalRecoveryTxLogicalRecordsTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testFreeListRecovery() throws Exception { try { pageSize = 1024; http://git-wip-us.apache.org/repos/asf/ignite/blob/f0544d46/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/WalRolloverRecordLoggingTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/WalRolloverRecordLoggingTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/WalRolloverRecordLoggingTest.java index df6f57d..d5ccb3b 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/WalRolloverRecordLoggingTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/WalRolloverRecordLoggingTest.java @@ -39,9 +39,14 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.jetbrains.annotations.NotNull; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; + /** * */ +@RunWith(JUnit4.class) public abstract class WalRolloverRecordLoggingTest extends GridCommonAbstractTest { /** */ private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true); @@ -93,6 +98,7 @@ public abstract class WalRolloverRecordLoggingTest extends GridCommonAbstractTes } /** */ + @Test public void testAvoidInfinityWaitingOnRolloverOfSegment() throws Exception { IgniteEx ig = startGrid(0); http://git-wip-us.apache.org/repos/asf/ignite/blob/f0544d46/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/WalRolloverTypesTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/WalRolloverTypesTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/WalRolloverTypesTest.java index db56cd2..984802a 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/WalRolloverTypesTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/WalRolloverTypesTest.java @@ -37,6 +37,9 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.TcpDiscoveryIpFinder; import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.configuration.DataStorageConfiguration.DFLT_WAL_ARCHIVE_PATH; import static org.apache.ignite.configuration.DataStorageConfiguration.DFLT_WAL_PATH; @@ -49,6 +52,7 @@ import static org.apache.ignite.internal.processors.cache.persistence.wal.serial /** * */ +@RunWith(JUnit4.class) public class WalRolloverTypesTest extends GridCommonAbstractTest { /** */ private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true); @@ -101,41 +105,49 @@ public class WalRolloverTypesTest extends GridCommonAbstractTest { } /** */ + @Test public void testCurrentSegmentTypeLogOnlyModeArchiveOn() throws Exception { checkCurrentSegmentType(LOG_ONLY, false); } /** */ + @Test public void testCurrentSegmentTypeLogOnlyModeArchiveOff() throws Exception { checkCurrentSegmentType(LOG_ONLY, true); } /** */ + @Test public void testCurrentSegmentTypeLogFsyncModeArchiveOn() throws Exception { checkCurrentSegmentType(FSYNC, false); } /** */ + @Test public void testCurrentSegmentTypeLogFsyncModeArchiveOff() throws Exception { checkCurrentSegmentType(FSYNC, true); } /** */ + @Test public void testNextSegmentTypeLogOnlyModeArchiveOn() throws Exception { checkNextSegmentType(LOG_ONLY, false); } /** */ + @Test public void testNextSegmentTypeLogOnlyModeArchiveOff() throws Exception { checkNextSegmentType(LOG_ONLY, true); } /** */ + @Test public void testNextSegmentTypeFsyncModeArchiveOn() throws Exception { checkNextSegmentType(FSYNC, false); } /** */ + @Test public void testNextSegmentTypeFsyncModeArchiveOff() throws Exception { checkNextSegmentType(FSYNC, true); } @@ -187,21 +199,25 @@ public class WalRolloverTypesTest extends GridCommonAbstractTest { } /** */ + @Test public void testNextSegmentTypeWithCacheActivityLogOnlyModeArchiveOn() throws Exception { checkNextSegmentTypeWithCacheActivity(LOG_ONLY, false); } /** */ + @Test public void testNextSegmentTypeWithCacheActivityLogOnlyModeArchiveOff() throws Exception { checkNextSegmentTypeWithCacheActivity(LOG_ONLY, true); } /** */ + @Test public void testNextSegmentTypeWithCacheActivityFsyncModeArchiveOn() throws Exception { checkNextSegmentTypeWithCacheActivity(FSYNC, false); } /** */ + @Test public void testNextSegmentTypeWithCacheActivityFsyncModeArchiveOff() throws Exception { checkNextSegmentTypeWithCacheActivity(FSYNC, true); } @@ -273,21 +289,25 @@ public class WalRolloverTypesTest extends GridCommonAbstractTest { } /** */ + @Test public void testCurrentSegmentTypeWithCacheActivityLogOnlyModeArchiveOn() throws Exception { checkCurrentSegmentTypeWithCacheActivity(LOG_ONLY, false); } /** */ + @Test public void testCurrentSegmentTypeWithCacheActivityLogOnlyModeArchiveOff() throws Exception { checkCurrentSegmentTypeWithCacheActivity(LOG_ONLY, true); } /** */ + @Test public void testCurrentSegmentTypeWithCacheActivityFsyncModeArchiveOn() throws Exception { checkCurrentSegmentTypeWithCacheActivity(FSYNC, false); } /** */ + @Test public void testCurrentSegmentTypeWithCacheActivityFsyncModeArchiveOff() throws Exception { checkCurrentSegmentTypeWithCacheActivity(FSYNC, true); } http://git-wip-us.apache.org/repos/asf/ignite/blob/f0544d46/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/crc/IgniteAbstractWalIteratorInvalidCrcTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/crc/IgniteAbstractWalIteratorInvalidCrcTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/crc/IgniteAbstractWalIteratorInvalidCrcTest.java index 0b53bb8..4a5e284 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/crc/IgniteAbstractWalIteratorInvalidCrcTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/crc/IgniteAbstractWalIteratorInvalidCrcTest.java @@ -51,6 +51,9 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.jetbrains.annotations.NotNull; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static java.nio.ByteBuffer.allocate; import static java.nio.file.StandardOpenOption.WRITE; @@ -59,6 +62,7 @@ import static org.apache.ignite.internal.processors.cache.persistence.wal.serial /** * */ +@RunWith(JUnit4.class) public abstract class IgniteAbstractWalIteratorInvalidCrcTest extends GridCommonAbstractTest { /** IP finder. */ private static final TcpDiscoveryVmIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true); @@ -150,6 +154,7 @@ public abstract class IgniteAbstractWalIteratorInvalidCrcTest extends GridCommon * Test that iteration fails if one of archive segments contains record with invalid CRC. * @throws Exception If failed. */ + @Test public void testArchiveCorruptedPtr() throws Exception { doTest((archiveDescs, descs) -> archiveDescs.get(random.nextInt(archiveDescs.size())), false, true); } @@ -159,6 +164,7 @@ public abstract class IgniteAbstractWalIteratorInvalidCrcTest extends GridCommon * and it is not the tail segment. * @throws Exception If failed. */ + @Test public void testNotTailCorruptedPtr() throws Exception { doTest((archiveDescs, descs) -> descs.get(random.nextInt(descs.size() - 1)), true, true); } @@ -168,6 +174,7 @@ public abstract class IgniteAbstractWalIteratorInvalidCrcTest extends GridCommon * Test that iteration does not fail if tail segment in working directory contains record with invalid CRC. * @throws Exception If failed. */ + @Test public void testTailCorruptedPtr() throws Exception { doTest((archiveDescs, descs) -> descs.get(descs.size() - 1), false, false); } http://git-wip-us.apache.org/repos/asf/ignite/blob/f0544d46/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/crc/IgniteDataIntegrityTests.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/crc/IgniteDataIntegrityTests.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/crc/IgniteDataIntegrityTests.java index 3ad4c90..68d1a62 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/crc/IgniteDataIntegrityTests.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/crc/IgniteDataIntegrityTests.java @@ -32,10 +32,16 @@ import org.apache.ignite.internal.processors.cache.persistence.wal.crc.FastCrc; import org.apache.ignite.internal.processors.cache.persistence.wal.io.FileInput; import org.apache.ignite.internal.processors.cache.persistence.wal.io.SimpleFileInput; import org.apache.ignite.internal.processors.cache.persistence.wal.crc.IgniteDataIntegrityViolationException; +import org.junit.After; +import org.junit.Before; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * */ +@RunWith(JUnit4.class) public class IgniteDataIntegrityTests extends TestCase { /** File input. */ private SimpleFileInput fileInput; @@ -44,7 +50,8 @@ public class IgniteDataIntegrityTests extends TestCase { private ByteBufferExpander expBuf; /** {@inheritDoc} */ - @Override protected void setUp() throws Exception { + @Before + @Override public void setUp() throws Exception { super.setUp(); File file = File.createTempFile("integrity", "dat"); @@ -78,7 +85,8 @@ public class IgniteDataIntegrityTests extends TestCase { } /** {@inheritDoc} */ - @Override protected void tearDown() throws Exception { + @After + @Override public void tearDown() throws Exception { fileInput.io().close(); expBuf.close(); } @@ -86,6 +94,7 @@ public class IgniteDataIntegrityTests extends TestCase { /** * */ + @Test public void testSuccessfulPath() throws Exception { checkIntegrity(); } @@ -93,6 +102,7 @@ public class IgniteDataIntegrityTests extends TestCase { /** * */ + @Test public void testIntegrityViolationChecking() throws Exception { toggleOneRandomBit(0, 1024 - 16); @@ -108,6 +118,7 @@ public class IgniteDataIntegrityTests extends TestCase { /** * */ + @Test public void testSkipingLastCorruptedEntry() throws Exception { toggleOneRandomBit(1024 - 16, 1024); @@ -123,6 +134,7 @@ public class IgniteDataIntegrityTests extends TestCase { /** * */ + @Test public void testExpandBuffer() { ByteBufferExpander expBuf = new ByteBufferExpander(24, ByteOrder.nativeOrder()); http://git-wip-us.apache.org/repos/asf/ignite/blob/f0544d46/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/crc/IgnitePureJavaCrcCompatibility.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/crc/IgnitePureJavaCrcCompatibility.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/crc/IgnitePureJavaCrcCompatibility.java index faafad2..1f882c9 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/crc/IgnitePureJavaCrcCompatibility.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/crc/IgnitePureJavaCrcCompatibility.java @@ -23,15 +23,20 @@ import org.apache.ignite.internal.processors.cache.persistence.wal.crc.PureJavaC import java.nio.ByteBuffer; import java.util.concurrent.ThreadLocalRandom; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * PureJavaCrc32 previous crc algo realization vs java.util.zip.crc32 test. */ +@RunWith(JUnit4.class) public class IgnitePureJavaCrcCompatibility extends TestCase { /** * Test crc algo equality results. * @throws Exception */ + @Test public void testAlgoEqual() throws Exception { ByteBuffer buf = ByteBuffer.allocate(1024); http://git-wip-us.apache.org/repos/asf/ignite/blob/f0544d46/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/crc/IgniteReplayWalIteratorInvalidCrcTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/crc/IgniteReplayWalIteratorInvalidCrcTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/crc/IgniteReplayWalIteratorInvalidCrcTest.java index 756ef78..0fbc777 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/crc/IgniteReplayWalIteratorInvalidCrcTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/crc/IgniteReplayWalIteratorInvalidCrcTest.java @@ -22,10 +22,14 @@ import org.apache.ignite.configuration.WALMode; import org.apache.ignite.internal.pagemem.wal.IgniteWriteAheadLogManager; import org.apache.ignite.internal.pagemem.wal.WALIterator; import org.jetbrains.annotations.NotNull; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * */ +@RunWith(JUnit4.class) public class IgniteReplayWalIteratorInvalidCrcTest extends IgniteAbstractWalIteratorInvalidCrcTest { /** {@inheritDoc} */ @NotNull @Override protected WALMode getWalMode() { @@ -49,6 +53,7 @@ public class IgniteReplayWalIteratorInvalidCrcTest extends IgniteAbstractWalIter * {@inheritDoc} * Case is not relevant to the replay iterator. */ + @Test @Override public void testNotTailCorruptedPtr() { } } http://git-wip-us.apache.org/repos/asf/ignite/blob/f0544d46/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/reader/IgniteWalReaderTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/reader/IgniteWalReaderTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/reader/IgniteWalReaderTest.java index beab138..9dfd232 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/reader/IgniteWalReaderTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/reader/IgniteWalReaderTest.java @@ -84,6 +84,9 @@ import org.apache.ignite.transactions.Transaction; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; import org.junit.Assert; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static java.util.Arrays.fill; import static org.apache.ignite.events.EventType.EVT_WAL_SEGMENT_ARCHIVED; @@ -98,6 +101,7 @@ import static org.apache.ignite.internal.processors.cache.persistence.filename.P /** * Test suite for WAL segments reader and event generator. */ +@RunWith(JUnit4.class) public class IgniteWalReaderTest extends GridCommonAbstractTest { /** */ private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true); @@ -202,6 +206,7 @@ public class IgniteWalReaderTest extends GridCommonAbstractTest { /** * @throws Exception if failed. */ + @Test public void testFillWalAndReadRecords() throws Exception { setWalAndArchiveToSameVal = false; @@ -293,6 +298,7 @@ public class IgniteWalReaderTest extends GridCommonAbstractTest { * * @throws Exception if failed. */ + @Test public void testArchiveCompletedEventFired() throws Exception { assertTrue(checkWhetherWALRelatedEventFired(EVT_WAL_SEGMENT_ARCHIVED)); } @@ -302,6 +308,7 @@ public class IgniteWalReaderTest extends GridCommonAbstractTest { * * @throws Exception if failed. */ + @Test public void testArchiveCompactedEventFired() throws Exception { boolean oldEnableWalCompaction = enableWalCompaction; @@ -353,6 +360,7 @@ public class IgniteWalReaderTest extends GridCommonAbstractTest { * * @throws Exception if failure occurs. */ + @Test public void testArchiveIncompleteSegmentAfterInactivity() throws Exception { AtomicBoolean waitingForEvt = new AtomicBoolean(); @@ -399,6 +407,7 @@ public class IgniteWalReaderTest extends GridCommonAbstractTest { * * @throws Exception if failed. */ + @Test public void testFillWalForExactSegmentsCount() throws Exception { customWalMode = WALMode.FSYNC; @@ -483,6 +492,7 @@ public class IgniteWalReaderTest extends GridCommonAbstractTest { * * @throws Exception if failed. */ + @Test public void testTxFillWalAndExtractDataRecords() throws Exception { Ignite ignite0 = startGrid(); @@ -584,6 +594,7 @@ public class IgniteWalReaderTest extends GridCommonAbstractTest { /** * @throws Exception if failed. */ + @Test public void testFillWalWithDifferentTypes() throws Exception { Ignite ig = startGrid(); @@ -778,6 +789,7 @@ public class IgniteWalReaderTest extends GridCommonAbstractTest { * * @throws Exception if failed. */ + @Test public void testReadEmptyWal() throws Exception { customWalMode = WALMode.FSYNC; @@ -845,6 +857,7 @@ public class IgniteWalReaderTest extends GridCommonAbstractTest { * * @throws Exception if failed. */ + @Test public void testRemoveOperationPresentedForDataEntry() throws Exception { runRemoveOperationTest(CacheAtomicityMode.TRANSACTIONAL); } @@ -854,6 +867,7 @@ public class IgniteWalReaderTest extends GridCommonAbstractTest { * * @throws Exception if failed. */ + @Test public void testRemoveOperationPresentedForDataEntryForAtomic() throws Exception { runRemoveOperationTest(CacheAtomicityMode.ATOMIC); } @@ -941,6 +955,7 @@ public class IgniteWalReaderTest extends GridCommonAbstractTest { * * @throws Exception if failed. */ + @Test public void testPutAllTxIntoTwoNodes() throws Exception { Ignite ignite = startGrid("node0"); Ignite ignite1 = startGrid(1); @@ -1040,6 +1055,7 @@ public class IgniteWalReaderTest extends GridCommonAbstractTest { * * @throws Exception if failed. */ + @Test public void testTxRecordsReadWoBinaryMeta() throws Exception { clearProps = true; @@ -1081,6 +1097,7 @@ public class IgniteWalReaderTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testCheckBoundsIterator() throws Exception { Ignite ignite = startGrid("node0"); http://git-wip-us.apache.org/repos/asf/ignite/blob/f0544d46/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/file/FileDownloaderTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/file/FileDownloaderTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/file/FileDownloaderTest.java index 6f01d93..b5c11be 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/file/FileDownloaderTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/file/FileDownloaderTest.java @@ -28,6 +28,9 @@ import java.util.concurrent.CountDownLatch; import org.apache.ignite.internal.util.future.GridFutureAdapter; import org.apache.ignite.internal.util.typedef.internal.U; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.testframework.GridTestUtils.runAsync; import static org.junit.Assert.*; @@ -35,6 +38,7 @@ import static org.junit.Assert.*; /** * FileDownloader test */ +@RunWith(JUnit4.class) public class FileDownloaderTest extends GridCommonAbstractTest { /** */ private static final Path DOWNLOADER_PATH = new File("download").toPath(); @@ -68,6 +72,7 @@ public class FileDownloaderTest extends GridCommonAbstractTest { * * @throws Exception If failed. */ + @Test public void test() throws Exception { assertTrue(UPLOADER_PATH.toFile().createNewFile()); assertTrue(!DOWNLOADER_PATH.toFile().exists()); @@ -120,4 +125,4 @@ public class FileDownloaderTest extends GridCommonAbstractTest { assertArrayEquals(Files.readAllBytes(UPLOADER_PATH), Files.readAllBytes(DOWNLOADER_PATH)); } -} \ No newline at end of file +} http://git-wip-us.apache.org/repos/asf/ignite/blob/f0544d46/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/metastorage/IgniteMetaStorageBasicTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/metastorage/IgniteMetaStorageBasicTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/metastorage/IgniteMetaStorageBasicTest.java index ee609c1..37e2861 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/metastorage/IgniteMetaStorageBasicTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/metastorage/IgniteMetaStorageBasicTest.java @@ -42,10 +42,14 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.TcpDiscoveryIpFinder; import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.junit.Assert; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Single place to add for basic MetaStorage tests. */ +@RunWith(JUnit4.class) public class IgniteMetaStorageBasicTest extends GridCommonAbstractTest { /** */ private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true); @@ -92,6 +96,7 @@ public class IgniteMetaStorageBasicTest extends GridCommonAbstractTest { /** * */ + @Test public void testMetaStorageMassivePutFixed() throws Exception { IgniteEx ig = startGrid(0); @@ -129,6 +134,7 @@ public class IgniteMetaStorageBasicTest extends GridCommonAbstractTest { /** * */ + @Test public void testMetaStorageMassivePutRandom() throws Exception { IgniteEx ig = startGrid(0); @@ -435,6 +441,7 @@ public class IgniteMetaStorageBasicTest extends GridCommonAbstractTest { * * @throws Exception If failed. */ + @Test public void testMetaStorageMassivePutUpdateRestart() throws Exception { IgniteEx ig = startGrid(0); @@ -459,6 +466,7 @@ public class IgniteMetaStorageBasicTest extends GridCommonAbstractTest { /** * @throws Exception If fails. */ + @Test public void testRecoveryOfMetastorageWhenNodeNotInBaseline() throws Exception { IgniteEx ig0 = startGrid(0); http://git-wip-us.apache.org/repos/asf/ignite/blob/f0544d46/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/pagemem/FillFactorMetricTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/pagemem/FillFactorMetricTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/pagemem/FillFactorMetricTest.java index ac65c6d..368dccd 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/pagemem/FillFactorMetricTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/pagemem/FillFactorMetricTest.java @@ -33,10 +33,14 @@ import org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi; import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Tests for fillFactor metrics. */ +@RunWith(JUnit4.class) public class FillFactorMetricTest extends GridCommonAbstractTest { /** */ private static final TcpDiscoveryVmIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true); @@ -95,6 +99,7 @@ public class FillFactorMetricTest extends GridCommonAbstractTest { * * @throws Exception if failed. */ + @Test public void testEmptyCachePagesFillFactor() throws Exception { startGrids(1); @@ -112,6 +117,7 @@ public class FillFactorMetricTest extends GridCommonAbstractTest { /** * throws if failed. */ + @Test public void testFillAndEmpty() throws Exception { final AtomicBoolean stopLoadFlag = new AtomicBoolean(); final AtomicBoolean doneFlag = new AtomicBoolean(); http://git-wip-us.apache.org/repos/asf/ignite/blob/f0544d46/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/pagemem/PageIdDistributionTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/pagemem/PageIdDistributionTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/pagemem/PageIdDistributionTest.java index 1f4b94f..5ad2f5b 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/pagemem/PageIdDistributionTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/pagemem/PageIdDistributionTest.java @@ -34,10 +34,14 @@ import org.apache.ignite.internal.util.typedef.internal.CU; import org.apache.ignite.internal.util.typedef.internal.U; import org.apache.ignite.logger.java.JavaLogger; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * */ +@RunWith(JUnit4.class) public class PageIdDistributionTest extends GridCommonAbstractTest { /** */ private static final int[] CACHE_IDS = new int[] { @@ -60,6 +64,7 @@ public class PageIdDistributionTest extends GridCommonAbstractTest { /** * */ + @Test public void testDistributions() { printPageIdDistribution( CU.cacheId("partitioned"), 1024, 10_000, 32, 2.5f); @@ -149,6 +154,7 @@ public class PageIdDistributionTest extends GridCommonAbstractTest { * * @throws Exception If failed. */ + @Test public void testRealHistory() throws Exception { int capacity = CACHE_IDS.length * PARTS * PAGES; http://git-wip-us.apache.org/repos/asf/ignite/blob/f0544d46/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/pagemem/PageMemoryImplNoLoadTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/pagemem/PageMemoryImplNoLoadTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/pagemem/PageMemoryImplNoLoadTest.java index 36a64f3..1190899 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/pagemem/PageMemoryImplNoLoadTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/pagemem/PageMemoryImplNoLoadTest.java @@ -38,11 +38,15 @@ import org.apache.ignite.internal.util.lang.GridInClosure3X; import org.apache.ignite.internal.util.typedef.internal.U; import org.apache.ignite.spi.encryption.noop.NoopEncryptionSpi; import org.apache.ignite.testframework.junits.GridTestKernalContext; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import org.mockito.Mockito; /** * */ +@RunWith(JUnit4.class) public class PageMemoryImplNoLoadTest extends PageMemoryNoLoadSelfTest { /** * @return Page memory implementation. @@ -112,6 +116,7 @@ public class PageMemoryImplNoLoadTest extends PageMemoryNoLoadSelfTest { } /** {@inheritDoc} */ + @Test @Override public void testPageHandleDeallocation() throws Exception { // No-op. } http://git-wip-us.apache.org/repos/asf/ignite/blob/f0544d46/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/pagemem/PageMemoryImplTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/pagemem/PageMemoryImplTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/pagemem/PageMemoryImplTest.java index cfd9543..7591dd7 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/pagemem/PageMemoryImplTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/pagemem/PageMemoryImplTest.java @@ -53,6 +53,9 @@ import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.junits.GridTestKernalContext; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.apache.ignite.testframework.junits.logger.GridTestLog4jLogger; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import org.mockito.Mockito; import static org.apache.ignite.internal.processors.cache.persistence.pagemem.PageMemoryImpl.CHECKPOINT_POOL_OVERFLOW_ERROR_MSG; @@ -60,6 +63,7 @@ import static org.apache.ignite.internal.processors.cache.persistence.pagemem.Pa /** * */ +@RunWith(JUnit4.class) public class PageMemoryImplTest extends GridCommonAbstractTest { /** Mb. */ private static final long MB = 1024 * 1024; @@ -73,6 +77,7 @@ public class PageMemoryImplTest extends GridCommonAbstractTest { /** * @throws Exception if failed. */ + @Test public void testThatAllocationTooMuchPagesCauseToOOMException() throws Exception { PageMemoryImpl memory = createPageMemory(PageMemoryImpl.ThrottlingPolicy.DISABLED); @@ -90,6 +95,7 @@ public class PageMemoryImplTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testCheckpointBufferOverusageDontCauseWriteLockLeak() throws Exception { PageMemoryImpl memory = createPageMemory(PageMemoryImpl.ThrottlingPolicy.DISABLED); @@ -143,6 +149,7 @@ public class PageMemoryImplTest extends GridCommonAbstractTest { * Tests that checkpoint buffer won't be overflowed with enabled CHECKPOINT_BUFFER_ONLY throttling. * @throws Exception If failed. */ + @Test public void testCheckpointBufferCantOverflowMixedLoad() throws Exception { testCheckpointBufferCantOverflowWithThrottlingMixedLoad(PageMemoryImpl.ThrottlingPolicy.CHECKPOINT_BUFFER_ONLY); } @@ -151,6 +158,7 @@ public class PageMemoryImplTest extends GridCommonAbstractTest { * Tests that checkpoint buffer won't be overflowed with enabled SPEED_BASED throttling. * @throws Exception If failed. */ + @Test public void testCheckpointBufferCantOverflowMixedLoadSpeedBased() throws Exception { testCheckpointBufferCantOverflowWithThrottlingMixedLoad(PageMemoryImpl.ThrottlingPolicy.SPEED_BASED); } @@ -159,6 +167,7 @@ public class PageMemoryImplTest extends GridCommonAbstractTest { * Tests that checkpoint buffer won't be overflowed with enabled TARGET_RATIO_BASED throttling. * @throws Exception If failed. */ + @Test public void testCheckpointBufferCantOverflowMixedLoadRatioBased() throws Exception { testCheckpointBufferCantOverflowWithThrottlingMixedLoad(PageMemoryImpl.ThrottlingPolicy.TARGET_RATIO_BASED); } http://git-wip-us.apache.org/repos/asf/ignite/blob/f0544d46/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/pagemem/PageMemoryNoStoreLeakTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/pagemem/PageMemoryNoStoreLeakTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/pagemem/PageMemoryNoStoreLeakTest.java index 8505a35..fdd47c1 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/pagemem/PageMemoryNoStoreLeakTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/pagemem/PageMemoryNoStoreLeakTest.java @@ -25,6 +25,9 @@ import org.apache.ignite.internal.pagemem.impl.PageMemoryNoStoreImpl; import org.apache.ignite.internal.processors.cache.persistence.DataRegionMetricsImpl; import org.apache.ignite.internal.util.typedef.internal.D; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Base scenario for memory leak: @@ -33,6 +36,7 @@ import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; * 3. IgniteCacheDatabaseSharedManager started and onActive called here. Memory allocated; * 4. Call active(true) again. Activation successfull, non heap memory leak introduced; */ +@RunWith(JUnit4.class) public class PageMemoryNoStoreLeakTest extends GridCommonAbstractTest { /** */ private static final int PAGE_SIZE = 4 * 1024; @@ -46,6 +50,7 @@ public class PageMemoryNoStoreLeakTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testPageDoubleInitMemoryLeak() throws Exception { long initVMsize = D.getCommittedVirtualMemorySize(); http://git-wip-us.apache.org/repos/asf/ignite/blob/f0544d46/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/pagemem/PagesWriteThrottleSandboxTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/pagemem/PagesWriteThrottleSandboxTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/pagemem/PagesWriteThrottleSandboxTest.java index c417b07..9a1bac7 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/pagemem/PagesWriteThrottleSandboxTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/pagemem/PagesWriteThrottleSandboxTest.java @@ -43,12 +43,16 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.TcpDiscoveryIpFinder; import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Test to visualize and debug {@link PagesWriteThrottle}. * Prints puts/gets rate, number of dirty pages, pages written in current checkpoint and pages in checkpoint buffer. * Not intended to be part of any test suite. */ +@RunWith(JUnit4.class) public class PagesWriteThrottleSandboxTest extends GridCommonAbstractTest { /** Ip finder. */ private static final TcpDiscoveryIpFinder ipFinder = new TcpDiscoveryVmIpFinder(true); @@ -112,6 +116,7 @@ public class PagesWriteThrottleSandboxTest extends GridCommonAbstractTest { /** * @throws Exception if failed. */ + @Test public void testThrottle() throws Exception { startGrids(1).active(true); http://git-wip-us.apache.org/repos/asf/ignite/blob/f0544d46/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/pagemem/PagesWriteThrottleSmokeTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/pagemem/PagesWriteThrottleSmokeTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/pagemem/PagesWriteThrottleSmokeTest.java index dd1f8e3..843911b 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/pagemem/PagesWriteThrottleSmokeTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/pagemem/PagesWriteThrottleSmokeTest.java @@ -49,10 +49,14 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.TcpDiscoveryIpFinder; import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * */ +@RunWith(JUnit4.class) public class PagesWriteThrottleSmokeTest extends GridCommonAbstractTest { /** Ip finder. */ private static final TcpDiscoveryIpFinder ipFinder = new TcpDiscoveryVmIpFinder(true); @@ -123,6 +127,7 @@ public class PagesWriteThrottleSmokeTest extends GridCommonAbstractTest { /** * @throws Exception if failed. */ + @Test public void testThrottle() throws Exception { startGrids(2).active(true); http://git-wip-us.apache.org/repos/asf/ignite/blob/f0544d46/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/standbycluster/IgniteChangeGlobalStateCacheTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/standbycluster/IgniteChangeGlobalStateCacheTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/standbycluster/IgniteChangeGlobalStateCacheTest.java index 938b3c8..13517ef 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/standbycluster/IgniteChangeGlobalStateCacheTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/standbycluster/IgniteChangeGlobalStateCacheTest.java @@ -23,14 +23,19 @@ import org.apache.ignite.configuration.CacheConfiguration; import org.apache.ignite.internal.IgniteEx; import org.apache.ignite.internal.processors.cache.GridCacheProcessor; import org.apache.ignite.internal.util.typedef.F; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * */ +@RunWith(JUnit4.class) public class IgniteChangeGlobalStateCacheTest extends IgniteChangeGlobalStateAbstractTest { /** * */ + @Test public void testCheckValueAfterActivation(){ String cacheName = "my-cache"; @@ -64,6 +69,7 @@ public class IgniteChangeGlobalStateCacheTest extends IgniteChangeGlobalStateAbs /** * @throws Exception If failed. */ + @Test public void testMoreKeyValueAfterActivate() throws Exception { String cacheName = "my-cache"; @@ -117,6 +123,7 @@ public class IgniteChangeGlobalStateCacheTest extends IgniteChangeGlobalStateAbs /** * @throws Exception if fail. */ + @Test public void testDeActivateAndActivateCacheValue() throws Exception { String chName = "myCache"; http://git-wip-us.apache.org/repos/asf/ignite/blob/f0544d46/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/standbycluster/IgniteChangeGlobalStateDataStreamerTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/standbycluster/IgniteChangeGlobalStateDataStreamerTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/standbycluster/IgniteChangeGlobalStateDataStreamerTest.java index 16be316..dd0bb09 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/standbycluster/IgniteChangeGlobalStateDataStreamerTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/standbycluster/IgniteChangeGlobalStateDataStreamerTest.java @@ -20,10 +20,14 @@ package org.apache.ignite.internal.processors.cache.persistence.standbycluster; import org.apache.ignite.Ignite; import org.apache.ignite.IgniteCache; import org.apache.ignite.IgniteDataStreamer; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * */ +@RunWith(JUnit4.class) public class IgniteChangeGlobalStateDataStreamerTest extends IgniteChangeGlobalStateAbstractTest { /** {@inheritDoc} */ @Override protected int backUpNodes() { @@ -38,6 +42,7 @@ public class IgniteChangeGlobalStateDataStreamerTest extends IgniteChangeGlobalS /** * @throws Exception If failed. */ + @Test public void testDeActivateAndActivateDataStreamer() throws Exception { Ignite ig1 = primary(0); Ignite ig2 = primary(1); http://git-wip-us.apache.org/repos/asf/ignite/blob/f0544d46/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/standbycluster/IgniteChangeGlobalStateDataStructureTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/standbycluster/IgniteChangeGlobalStateDataStructureTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/standbycluster/IgniteChangeGlobalStateDataStructureTest.java index 8902a36..ef0f18f 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/standbycluster/IgniteChangeGlobalStateDataStructureTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/standbycluster/IgniteChangeGlobalStateDataStructureTest.java @@ -27,16 +27,21 @@ import org.apache.ignite.internal.IgniteEx; import org.apache.ignite.internal.processors.cache.GridCacheProcessor; import org.apache.ignite.internal.util.typedef.F; import org.apache.ignite.internal.util.typedef.internal.U; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.testframework.GridTestUtils.runAsync; /** * */ +@RunWith(JUnit4.class) public class IgniteChangeGlobalStateDataStructureTest extends IgniteChangeGlobalStateAbstractTest { /** * @throws Exception If failed. */ + @Test public void testDeActivateAndActivateAtomicLong() throws Exception { String lName = "myLong"; @@ -108,6 +113,7 @@ public class IgniteChangeGlobalStateDataStructureTest extends IgniteChangeGlobal /** * @throws Exception If failed. */ + @Test public void testDeActivateAndActivateCountDownLatch() throws Exception { final AtomicInteger cnt = new AtomicInteger(); @@ -202,6 +208,7 @@ public class IgniteChangeGlobalStateDataStructureTest extends IgniteChangeGlobal /** * */ + @Test public void testDeActivateAndActivateAtomicSequence(){ String seqName = "mySeq"; http://git-wip-us.apache.org/repos/asf/ignite/blob/f0544d46/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/standbycluster/IgniteChangeGlobalStateFailOverTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/standbycluster/IgniteChangeGlobalStateFailOverTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/standbycluster/IgniteChangeGlobalStateFailOverTest.java index 1ef269e..9a7acf8 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/standbycluster/IgniteChangeGlobalStateFailOverTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/standbycluster/IgniteChangeGlobalStateFailOverTest.java @@ -26,6 +26,9 @@ import org.apache.ignite.Ignite; import org.apache.ignite.IgniteCache; import org.apache.ignite.configuration.CacheConfiguration; import org.apache.ignite.internal.IgniteInternalFuture; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static java.lang.Thread.sleep; import static org.apache.ignite.testframework.GridTestUtils.runAsync; @@ -33,6 +36,7 @@ import static org.apache.ignite.testframework.GridTestUtils.runAsync; /** * */ +@RunWith(JUnit4.class) public class IgniteChangeGlobalStateFailOverTest extends IgniteChangeGlobalStateAbstractTest { /** {@inheritDoc} */ @Override protected int primaryNodes() { @@ -57,6 +61,7 @@ public class IgniteChangeGlobalStateFailOverTest extends IgniteChangeGlobalState /** * @throws Exception If failed. */ + @Test public void testActivateDeActivateOnFixTopology() throws Exception { final Ignite igB1 = backUp(0); final Ignite igB2 = backUp(1); @@ -143,6 +148,7 @@ public class IgniteChangeGlobalStateFailOverTest extends IgniteChangeGlobalState /** * @throws Exception If failed. */ + @Test public void testActivateDeActivateOnJoiningNode() throws Exception { final Ignite igB1 = backUp(0); final Ignite igB2 = backUp(1); @@ -276,6 +282,7 @@ public class IgniteChangeGlobalStateFailOverTest extends IgniteChangeGlobalState /** * @throws Exception If failed. */ + @Test public void testActivateDeActivateOnFixTopologyWithPutValues() throws Exception { final Ignite igB1 = backUp(0); final Ignite igB2 = backUp(1); http://git-wip-us.apache.org/repos/asf/ignite/blob/f0544d46/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/standbycluster/IgniteChangeGlobalStateServiceTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/standbycluster/IgniteChangeGlobalStateServiceTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/standbycluster/IgniteChangeGlobalStateServiceTest.java index e6c9ae5..e2b1476 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/standbycluster/IgniteChangeGlobalStateServiceTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/standbycluster/IgniteChangeGlobalStateServiceTest.java @@ -25,10 +25,14 @@ import org.apache.ignite.services.Service; import org.apache.ignite.services.ServiceConfiguration; import org.apache.ignite.services.ServiceContext; import org.apache.ignite.services.ServiceDescriptor; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * */ +@RunWith(JUnit4.class) public class IgniteChangeGlobalStateServiceTest extends IgniteChangeGlobalStateAbstractTest { /** {@inheritDoc} */ @Override protected int backUpClientNodes() { @@ -48,6 +52,7 @@ public class IgniteChangeGlobalStateServiceTest extends IgniteChangeGlobalStateA /** * */ + @Test public void testDeployService() throws Exception { fail("https://issues.apache.org/jira/browse/IGNITE-6629"); http://git-wip-us.apache.org/repos/asf/ignite/blob/f0544d46/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/standbycluster/IgniteChangeGlobalStateTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/standbycluster/IgniteChangeGlobalStateTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/standbycluster/IgniteChangeGlobalStateTest.java index f69c3a3..ca5a689 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/standbycluster/IgniteChangeGlobalStateTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/standbycluster/IgniteChangeGlobalStateTest.java @@ -31,6 +31,9 @@ import org.apache.ignite.internal.IgniteEx; import org.apache.ignite.internal.IgniteInternalFuture; import org.apache.ignite.internal.processors.cache.GridCacheProcessor; import org.apache.ignite.internal.util.typedef.F; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.testframework.GridTestUtils.assertThrows; import static org.apache.ignite.testframework.GridTestUtils.runAsync; @@ -38,10 +41,12 @@ import static org.apache.ignite.testframework.GridTestUtils.runAsync; /** * */ +@RunWith(JUnit4.class) public class IgniteChangeGlobalStateTest extends IgniteChangeGlobalStateAbstractTest { /** * @throws Exception if fail. */ + @Test public void testStopPrimaryAndActivateFromServerNode() throws Exception { Ignite ig1P = primary(0); Ignite ig2P = primary(1); @@ -71,6 +76,7 @@ public class IgniteChangeGlobalStateTest extends IgniteChangeGlobalStateAbstract /** * @throws Exception if fail. */ + @Test public void testStopPrimaryAndActivateFromClientNode() throws Exception { Ignite ig1P = primary(0); Ignite ig2P = primary(1); @@ -112,6 +118,7 @@ public class IgniteChangeGlobalStateTest extends IgniteChangeGlobalStateAbstract /** * @throws Exception if fail. */ + @Test public void testConcurrentActivateFromClientNodeAndServerNode() throws Exception { final Ignite ig1B = backUp(0); final Ignite ig2B = backUp(1); @@ -209,6 +216,7 @@ public class IgniteChangeGlobalStateTest extends IgniteChangeGlobalStateAbstract /** * @throws Exception if fail. */ + @Test public void testConcurrentActivateFromServerNode() throws Exception { final Ignite ig1B = backUp(0); final Ignite ig2B = backUp(1); @@ -264,6 +272,7 @@ public class IgniteChangeGlobalStateTest extends IgniteChangeGlobalStateAbstract /** * @throws Exception If failed. */ + @Test public void testActiveAndInActiveAtTheSameTimeCluster() throws Exception { Ignite ig1P = primary(0); Ignite ig2P = primary(1); @@ -301,6 +310,7 @@ public class IgniteChangeGlobalStateTest extends IgniteChangeGlobalStateAbstract /** * @throws Exception If failed. */ + @Test public void testActivateOnAlreadyActivatedCluster() throws Exception { Ignite ig1P = primary(0); Ignite ig2P = primary(1); @@ -358,6 +368,7 @@ public class IgniteChangeGlobalStateTest extends IgniteChangeGlobalStateAbstract /** * @throws Exception If failed. */ + @Test public void testTryUseCacheInActiveCluster() throws Exception { Ignite ig1B = backUp(0); Ignite ig2B = backUp(1); @@ -400,6 +411,7 @@ public class IgniteChangeGlobalStateTest extends IgniteChangeGlobalStateAbstract /** * @throws Exception If failed. */ + @Test public void testTryUseServiceInActiveCluster() throws Exception { Ignite ig1B = backUp(0); Ignite ig2B = backUp(1); @@ -442,6 +454,7 @@ public class IgniteChangeGlobalStateTest extends IgniteChangeGlobalStateAbstract /** * @throws Exception If failed. */ + @Test public void testTryUseDataStructureInActiveCluster() throws Exception { Ignite ig1B = backUp(0); Ignite ig2B = backUp(1); @@ -484,6 +497,7 @@ public class IgniteChangeGlobalStateTest extends IgniteChangeGlobalStateAbstract /** * @throws Exception If failed. */ + @Test public void testFailGetLock() throws Exception { Ignite ig1P = primary(0); Ignite ig2P = primary(1); @@ -541,6 +555,7 @@ public class IgniteChangeGlobalStateTest extends IgniteChangeGlobalStateAbstract /** * @throws Exception If failed. */ + @Test public void testActivateAfterFailGetLock() throws Exception { fail("https://issues.apache.org/jira/browse/IGNITE-1094"); @@ -617,6 +632,7 @@ public class IgniteChangeGlobalStateTest extends IgniteChangeGlobalStateAbstract /** * @throws Exception if fail. */ + @Test public void testDeActivateFromServerNode() throws Exception { Ignite ig1 = primary(0); Ignite ig2 = primary(1); @@ -636,6 +652,7 @@ public class IgniteChangeGlobalStateTest extends IgniteChangeGlobalStateAbstract /** * @throws Exception if fail. */ + @Test public void testDeActivateFromClientNode() throws Exception { Ignite ig1 = primary(0); Ignite ig2 = primary(1); @@ -663,6 +680,7 @@ public class IgniteChangeGlobalStateTest extends IgniteChangeGlobalStateAbstract /** * @throws Exception if fail. */ + @Test public void testDeActivateCheckCacheDestroy() throws Exception { String chName = "myCache"; http://git-wip-us.apache.org/repos/asf/ignite/blob/f0544d46/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/standbycluster/IgniteNoParrallelClusterIsAllowedTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/standbycluster/IgniteNoParrallelClusterIsAllowedTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/standbycluster/IgniteNoParrallelClusterIsAllowedTest.java index 7180d7b..53b3351 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/standbycluster/IgniteNoParrallelClusterIsAllowedTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/standbycluster/IgniteNoParrallelClusterIsAllowedTest.java @@ -21,10 +21,14 @@ import junit.framework.AssertionFailedError; import org.apache.ignite.internal.util.typedef.internal.U; import org.apache.ignite.spi.discovery.tcp.ipfinder.TcpDiscoveryIpFinder; import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * */ +@RunWith(JUnit4.class) public class IgniteNoParrallelClusterIsAllowedTest extends IgniteChangeGlobalStateAbstractTest { /** */ private static final TcpDiscoveryIpFinder vmIpFinder = new TcpDiscoveryVmIpFinder(true); @@ -32,6 +36,7 @@ public class IgniteNoParrallelClusterIsAllowedTest extends IgniteChangeGlobalSta /** * @throws Exception if failed. */ + @Test public void testSimple() throws Exception { startPrimaryNodes(primaryNodes()); http://git-wip-us.apache.org/repos/asf/ignite/blob/f0544d46/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/standbycluster/IgniteStandByClusterTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/standbycluster/IgniteStandByClusterTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/standbycluster/IgniteStandByClusterTest.java index 6900af8..85d1078 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/standbycluster/IgniteStandByClusterTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/standbycluster/IgniteStandByClusterTest.java @@ -52,10 +52,14 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.jetbrains.annotations.Nullable; import org.junit.Assert; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * */ +@RunWith(JUnit4.class) public class IgniteStandByClusterTest extends GridCommonAbstractTest { /** */ private static final TcpDiscoveryIpFinder vmIpFinder = new TcpDiscoveryVmIpFinder(true); @@ -81,6 +85,7 @@ public class IgniteStandByClusterTest extends GridCommonAbstractTest { /** * @throws Exception if fail. */ + @Test public void testStartDynamicCachesAfterActivation() throws Exception { final String cacheName0 = "cache0"; final String cacheName = "cache"; @@ -146,6 +151,7 @@ public class IgniteStandByClusterTest extends GridCommonAbstractTest { /** * @throws Exception if fail. */ + @Test public void testStaticCacheStartAfterActivationWithCacheFilter() throws Exception { String cache1 = "cache1"; String cache2 = "cache2"; @@ -213,6 +219,7 @@ public class IgniteStandByClusterTest extends GridCommonAbstractTest { /** * @throws Exception if fail. */ + @Test public void testSimple() throws Exception { IgniteEx ig = startGrid(0); @@ -238,6 +245,7 @@ public class IgniteStandByClusterTest extends GridCommonAbstractTest { /** * @throws Exception if fail. */ + @Test public void testJoinDaemonAndDaemonStop() throws Exception { IgniteEx ig = startGrid(0); @@ -258,6 +266,7 @@ public class IgniteStandByClusterTest extends GridCommonAbstractTest { /** * Check that daemon node does not move cluster to compatibility mode. */ + @Test public void testJoinDaemonToBaseline() throws Exception { Ignite ignite0 = startGrid(0); @@ -279,6 +288,7 @@ public class IgniteStandByClusterTest extends GridCommonAbstractTest { /** * @throws Exception if fail. */ + @Test public void testCheckStatusFromDaemon() throws Exception { IgniteEx ig = startGrid(0); @@ -309,6 +319,7 @@ public class IgniteStandByClusterTest extends GridCommonAbstractTest { /** * @throws Exception if fail. */ + @Test public void testRestartCluster() throws Exception { IgniteEx ig1 = startGrid(getConfiguration("node1")); IgniteEx ig2 = startGrid(getConfiguration("node2")); @@ -344,6 +355,7 @@ public class IgniteStandByClusterTest extends GridCommonAbstractTest { /** * @throws Exception if fail. */ + @Test public void testActivateDeActivateCallbackForPluginProviders() throws Exception { IgniteEx ig1 = startGrid(getConfiguration("node1")); IgniteEx ig2 = startGrid(getConfiguration("node2")); http://git-wip-us.apache.org/repos/asf/ignite/blob/f0544d46/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/standbycluster/join/JoinActiveNodeToActiveCluster.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/standbycluster/join/JoinActiveNodeToActiveCluster.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/standbycluster/join/JoinActiveNodeToActiveCluster.java index 8e90e78..628316c 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/standbycluster/join/JoinActiveNodeToActiveCluster.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/standbycluster/join/JoinActiveNodeToActiveCluster.java @@ -24,10 +24,14 @@ import org.apache.ignite.internal.processors.cache.DynamicCacheDescriptor; import org.apache.ignite.internal.processors.cache.GridCacheAdapter; import org.apache.ignite.internal.util.typedef.internal.CU; import org.junit.Assert; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * */ +@RunWith(JUnit4.class) public class JoinActiveNodeToActiveCluster extends AbstractNodeJoinTemplate { /** {@inheritDoc} */ @Override public JoinNodeTestPlanBuilder withOutConfigurationTemplate() throws Exception { @@ -193,26 +197,31 @@ public class JoinActiveNodeToActiveCluster extends AbstractNodeJoinTemplate { // Server node join. /** {@inheritDoc} */ + @Test @Override public void testJoinWithOutConfiguration() throws Exception { withOutConfigurationTemplate().execute(); } /** {@inheritDoc} */ + @Test @Override public void testStaticCacheConfigurationOnJoin() throws Exception { staticCacheConfigurationOnJoinTemplate().execute(); } /** {@inheritDoc} */ + @Test @Override public void testStaticCacheConfigurationInCluster() throws Exception { staticCacheConfigurationInClusterTemplate().execute(); } /** {@inheritDoc} */ + @Test @Override public void testStaticCacheConfigurationSameOnBoth() throws Exception { staticCacheConfigurationSameOnBothTemplate().execute(); } /** {@inheritDoc} */ + @Test @Override public void testStaticCacheConfigurationDifferentOnBoth() throws Exception { staticCacheConfigurationDifferentOnBothTemplate().execute(); } @@ -220,16 +229,19 @@ public class JoinActiveNodeToActiveCluster extends AbstractNodeJoinTemplate { // Client node join. /** {@inheritDoc} */ + @Test @Override public void testJoinClientWithOutConfiguration() throws Exception { joinClientWithOutConfigurationTemplate().execute(); } /** {@inheritDoc} */ + @Test @Override public void testJoinClientStaticCacheConfigurationOnJoin() throws Exception { joinClientStaticCacheConfigurationOnJoinTemplate().execute(); } /** {@inheritDoc} */ + @Test @Override public void testJoinClientStaticCacheConfigurationInCluster() throws Exception { fail("https://issues.apache.org/jira/browse/IGNITE-5518"); @@ -237,6 +249,7 @@ public class JoinActiveNodeToActiveCluster extends AbstractNodeJoinTemplate { } /** {@inheritDoc} */ + @Test @Override public void testJoinClientStaticCacheConfigurationSameOnBoth() throws Exception { joinClientStaticCacheConfigurationSameOnBothTemplate().execute(); } @@ -244,6 +257,7 @@ public class JoinActiveNodeToActiveCluster extends AbstractNodeJoinTemplate { /** * */ + @Test @Override public void testJoinClientStaticCacheConfigurationDifferentOnBoth() throws Exception { fail("https://issues.apache.org/jira/browse/IGNITE-5518");
