You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ignite.apache.org by ag...@apache.org on 2018/12/11 08:28:52 UTC
[05/51] [partial] ignite git commit: IGNITE-10175 migrate core
modules tests from Junit 3 to 4 - Fixes #5562.
http://git-wip-us.apache.org/repos/asf/ignite/blob/f0544d46/modules/core/src/test/java/org/apache/ignite/lang/GridMetadataAwareAdapterSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/lang/GridMetadataAwareAdapterSelfTest.java b/modules/core/src/test/java/org/apache/ignite/lang/GridMetadataAwareAdapterSelfTest.java
index f202fa9..b38be98 100644
--- a/modules/core/src/test/java/org/apache/ignite/lang/GridMetadataAwareAdapterSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/lang/GridMetadataAwareAdapterSelfTest.java
@@ -21,11 +21,15 @@ import java.util.concurrent.Callable;
import org.apache.ignite.internal.util.lang.GridMetadataAwareAdapter;
import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest;
import org.apache.ignite.testframework.junits.common.GridCommonTest;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.junit.runners.JUnit4;
/**
*
*/
@GridCommonTest(group = "Lang")
+@RunWith(JUnit4.class)
public class GridMetadataAwareAdapterSelfTest extends GridCommonAbstractTest {
/** Creates test. */
public GridMetadataAwareAdapterSelfTest() {
@@ -36,6 +40,7 @@ public class GridMetadataAwareAdapterSelfTest extends GridCommonAbstractTest {
* Junit.
*/
@SuppressWarnings({"AssertWithSideEffects"})
+ @Test
public void test() {
GridMetadataAwareAdapter ma = new GridMetadataAwareAdapter();
http://git-wip-us.apache.org/repos/asf/ignite/blob/f0544d46/modules/core/src/test/java/org/apache/ignite/lang/GridSetWrapperSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/lang/GridSetWrapperSelfTest.java b/modules/core/src/test/java/org/apache/ignite/lang/GridSetWrapperSelfTest.java
index 7cddf27..be662da 100644
--- a/modules/core/src/test/java/org/apache/ignite/lang/GridSetWrapperSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/lang/GridSetWrapperSelfTest.java
@@ -27,19 +27,25 @@ import org.apache.ignite.internal.util.GridSetWrapper;
import org.apache.ignite.internal.util.IgniteUtils;
import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest;
import org.apache.ignite.testframework.junits.common.GridCommonTest;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.junit.runners.JUnit4;
/**
* Set wrapper test.
*/
@GridCommonTest(group = "Lang")
+@RunWith(JUnit4.class)
public class GridSetWrapperSelfTest extends GridCommonAbstractTest {
/** @throws Exception If failed. */
+ @Test
public void testEmptySet() throws Exception {
checkCollectionEmptiness(new GridSetWrapper<>(new HashMap<String, Object>()));
}
/** @throws Exception If failed. */
+ @Test
public void testMultipleValuesSet() throws Exception {
Set<String> set = new GridSetWrapper<>(new HashMap<String, Object>());
@@ -76,6 +82,7 @@ public class GridSetWrapperSelfTest extends GridCommonAbstractTest {
}
/** @throws Exception If failed. */
+ @Test
public void testSetRemove() throws Exception {
Collection<String> set = new GridSetWrapper<>(new HashMap<String, Object>());
@@ -117,6 +124,7 @@ public class GridSetWrapperSelfTest extends GridCommonAbstractTest {
}
/** @throws Exception If failed. */
+ @Test
public void testSetRemoveAll() throws Exception {
Collection<String> set = new GridSetWrapper<>(new HashMap<String, Object>());
@@ -138,6 +146,7 @@ public class GridSetWrapperSelfTest extends GridCommonAbstractTest {
}
/** @throws Exception If failed. */
+ @Test
public void testSetClear() throws Exception {
Collection<String> set = new GridSetWrapper<>(new HashMap<String, Object>());
@@ -156,6 +165,7 @@ public class GridSetWrapperSelfTest extends GridCommonAbstractTest {
}
/** @throws Exception If failed. */
+ @Test
public void testIterator() throws Exception {
Set<String> set = new GridSetWrapper<>(new HashMap<String, Object>());
@@ -227,4 +237,4 @@ public class GridSetWrapperSelfTest extends GridCommonAbstractTest {
info("Caught expected exception: " + e);
}
}
-}
\ 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/lang/GridTupleSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/lang/GridTupleSelfTest.java b/modules/core/src/test/java/org/apache/ignite/lang/GridTupleSelfTest.java
index 77be70c..ae67a4d 100644
--- a/modules/core/src/test/java/org/apache/ignite/lang/GridTupleSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/lang/GridTupleSelfTest.java
@@ -27,11 +27,15 @@ import org.apache.ignite.internal.util.lang.GridTuple3;
import org.apache.ignite.internal.util.typedef.F;
import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest;
import org.apache.ignite.testframework.junits.common.GridCommonTest;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.junit.runners.JUnit4;
/**
*
*/
@GridCommonTest(group = "Lang")
+@RunWith(JUnit4.class)
public class GridTupleSelfTest extends GridCommonAbstractTest {
/** Creates test. */
public GridTupleSelfTest() {
@@ -41,6 +45,7 @@ public class GridTupleSelfTest extends GridCommonAbstractTest {
/**
* JUnit.
*/
+ @Test
public void testGridTupleAsIterable() {
String str = "A test string";
@@ -71,6 +76,7 @@ public class GridTupleSelfTest extends GridCommonAbstractTest {
/**
* JUnit.
*/
+ @Test
public void testGridTuple2AsIterable() {
String str1 = "A test string 1";
String str2 = "A test string 2";
@@ -103,6 +109,7 @@ public class GridTupleSelfTest extends GridCommonAbstractTest {
/**
* JUnit.
*/
+ @Test
public void testGridTuple2AsMap() {
String str1 = "A test string 1";
String str2 = "A test string 2";
@@ -141,6 +148,7 @@ public class GridTupleSelfTest extends GridCommonAbstractTest {
/**
* JUnit.
*/
+ @Test
public void testGridTuple3AsIterable() {
String str1 = "A test string 1";
String str2 = "A test string 2";
http://git-wip-us.apache.org/repos/asf/ignite/blob/f0544d46/modules/core/src/test/java/org/apache/ignite/lang/GridXSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/lang/GridXSelfTest.java b/modules/core/src/test/java/org/apache/ignite/lang/GridXSelfTest.java
index 8fd6df6..952f0b3 100644
--- a/modules/core/src/test/java/org/apache/ignite/lang/GridXSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/lang/GridXSelfTest.java
@@ -24,15 +24,20 @@ import org.apache.ignite.IgniteCheckedException;
import org.apache.ignite.internal.util.typedef.X;
import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest;
import org.apache.ignite.testframework.junits.common.GridCommonTest;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.junit.runners.JUnit4;
/**
* Tests for {@link X}.
*/
@GridCommonTest(group = "Lang")
+@RunWith(JUnit4.class)
public class GridXSelfTest extends GridCommonAbstractTest {
/**
*
*/
+ @Test
public void testHasCause() {
ConnectException conEx = new ConnectException();
@@ -55,6 +60,7 @@ public class GridXSelfTest extends GridCommonAbstractTest {
/**
* Tests string presentation of given time.
*/
+ @Test
public void testTimeSpan() {
assertEquals(X.timeSpan2DHMSM(86400001L), "1 day, 00:00:00.001");
@@ -68,6 +74,7 @@ public class GridXSelfTest extends GridCommonAbstractTest {
/**
*
*/
+ @Test
public void testShallowClone() {
// Single not cloneable object
Object obj = new Object();
@@ -117,6 +124,7 @@ public class GridXSelfTest extends GridCommonAbstractTest {
*
*/
@SuppressWarnings({"StringEquality"})
+ @Test
public void testDeepCloner() {
// Single not cloneable object
Object obj = new Object();
@@ -272,4 +280,4 @@ public class GridXSelfTest extends GridCommonAbstractTest {
@SuppressWarnings({"unused"})
private final TestCycled anotherCycle = this;
}
-}
\ 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/lang/IgniteUuidSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/lang/IgniteUuidSelfTest.java b/modules/core/src/test/java/org/apache/ignite/lang/IgniteUuidSelfTest.java
index a3d82cb..4091e1b 100644
--- a/modules/core/src/test/java/org/apache/ignite/lang/IgniteUuidSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/lang/IgniteUuidSelfTest.java
@@ -30,11 +30,15 @@ import org.apache.ignite.internal.util.typedef.internal.S;
import org.apache.ignite.internal.util.typedef.internal.U;
import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest;
import org.apache.ignite.testframework.junits.common.GridCommonTest;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.junit.runners.JUnit4;
/**
* Tests for {@link org.apache.ignite.lang.IgniteUuid}.
*/
@GridCommonTest(group = "Lang")
+@RunWith(JUnit4.class)
public class IgniteUuidSelfTest extends GridCommonAbstractTest {
/** Sample size. */
private static final int NUM = 100000;
@@ -42,6 +46,7 @@ public class IgniteUuidSelfTest extends GridCommonAbstractTest {
/**
* JUnit.
*/
+ @Test
public void testToString() {
IgniteUuid id1 = IgniteUuid.randomUuid();
@@ -73,6 +78,7 @@ public class IgniteUuidSelfTest extends GridCommonAbstractTest {
/**
* JUnit.
*/
+ @Test
public void testGridUuid() {
IgniteUuid id1 = IgniteUuid.randomUuid();
IgniteUuid id2 = IgniteUuid.randomUuid();
@@ -95,6 +101,7 @@ public class IgniteUuidSelfTest extends GridCommonAbstractTest {
/**
* JUnit.
*/
+ @Test
public void testGridUuidPerformance() {
long start = System.currentTimeMillis();
@@ -121,6 +128,7 @@ public class IgniteUuidSelfTest extends GridCommonAbstractTest {
*
* @throws Exception If failed.
*/
+ @Test
public void testSerializationPerformance() throws Exception {
UuidBean[] uids = new UuidBean[NUM];
@@ -330,4 +338,4 @@ public class IgniteUuidSelfTest extends GridCommonAbstractTest {
/** {@inheritDoc} */
@Override public String toString() { return S.toString(UuidBean.class, this); }
}
-}
\ 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/lang/utils/GridBoundedConcurrentLinkedHashMapSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/lang/utils/GridBoundedConcurrentLinkedHashMapSelfTest.java b/modules/core/src/test/java/org/apache/ignite/lang/utils/GridBoundedConcurrentLinkedHashMapSelfTest.java
index 8ce7ae3..acfd481 100644
--- a/modules/core/src/test/java/org/apache/ignite/lang/utils/GridBoundedConcurrentLinkedHashMapSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/lang/utils/GridBoundedConcurrentLinkedHashMapSelfTest.java
@@ -21,10 +21,14 @@ import java.util.Iterator;
import java.util.Map;
import org.apache.ignite.internal.util.GridBoundedConcurrentLinkedHashMap;
import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.junit.runners.JUnit4;
/**
* Test for {@link GridBoundedConcurrentLinkedHashMap}.
*/
+@RunWith(JUnit4.class)
public class GridBoundedConcurrentLinkedHashMapSelfTest extends GridCommonAbstractTest {
/** Bound. */
private static final int MAX = 3;
@@ -32,6 +36,7 @@ public class GridBoundedConcurrentLinkedHashMapSelfTest extends GridCommonAbstra
/**
* @throws Exception If failed.
*/
+ @Test
public void testBound() throws Exception {
Map<Integer, Integer> map = new GridBoundedConcurrentLinkedHashMap<>(MAX);
http://git-wip-us.apache.org/repos/asf/ignite/blob/f0544d46/modules/core/src/test/java/org/apache/ignite/lang/utils/GridBoundedConcurrentOrderedMapSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/lang/utils/GridBoundedConcurrentOrderedMapSelfTest.java b/modules/core/src/test/java/org/apache/ignite/lang/utils/GridBoundedConcurrentOrderedMapSelfTest.java
index 05ba495..2c33ccf 100644
--- a/modules/core/src/test/java/org/apache/ignite/lang/utils/GridBoundedConcurrentOrderedMapSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/lang/utils/GridBoundedConcurrentOrderedMapSelfTest.java
@@ -23,15 +23,20 @@ import org.apache.ignite.internal.util.GridBoundedConcurrentOrderedMap;
import org.apache.ignite.internal.util.typedef.CI2;
import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest;
import org.apache.ignite.testframework.junits.common.GridCommonTest;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.junit.runners.JUnit4;
/**
* Test for {@link GridBoundedConcurrentOrderedMap}.
*/
@GridCommonTest(group = "Lang")
+@RunWith(JUnit4.class)
public class GridBoundedConcurrentOrderedMapSelfTest extends GridCommonAbstractTest {
/**
*
*/
+ @Test
public void testEvictionSingleElement() {
SortedMap<Integer,String> m = new GridBoundedConcurrentOrderedMap<>(1);
@@ -52,6 +57,7 @@ public class GridBoundedConcurrentOrderedMapSelfTest extends GridCommonAbstractT
/**
*
*/
+ @Test
public void testEvictionListener() {
GridBoundedConcurrentOrderedMap<Integer,String> m = new GridBoundedConcurrentOrderedMap<>(1);
@@ -78,4 +84,4 @@ public class GridBoundedConcurrentOrderedMapSelfTest extends GridCommonAbstractT
assertEquals(10, m.lastKey().intValue());
assertEquals(10, evicted.get());
}
-}
\ 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/lang/utils/GridBoundedPriorityQueueSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/lang/utils/GridBoundedPriorityQueueSelfTest.java b/modules/core/src/test/java/org/apache/ignite/lang/utils/GridBoundedPriorityQueueSelfTest.java
index bcaecc4..489a14f 100644
--- a/modules/core/src/test/java/org/apache/ignite/lang/utils/GridBoundedPriorityQueueSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/lang/utils/GridBoundedPriorityQueueSelfTest.java
@@ -26,11 +26,15 @@ import java.util.Random;
import org.apache.ignite.internal.util.GridBoundedPriorityQueue;
import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest;
import org.apache.ignite.testframework.junits.common.GridCommonTest;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.junit.runners.JUnit4;
/**
* Test for {@link GridBoundedPriorityQueue}.
*/
@GridCommonTest(group = "Lang")
+@RunWith(JUnit4.class)
public class GridBoundedPriorityQueueSelfTest extends GridCommonAbstractTest {
/** Queue items comparator. */
private static final Comparator<Integer> CMP = new Comparator<Integer>() {
@@ -45,6 +49,7 @@ public class GridBoundedPriorityQueueSelfTest extends GridCommonAbstractTest {
/**
* Test eviction in bounded priority queue.
*/
+ @Test
public void testEviction() {
GridBoundedPriorityQueue<Integer> queue = new GridBoundedPriorityQueue<>(3, CMP);
http://git-wip-us.apache.org/repos/asf/ignite/blob/f0544d46/modules/core/src/test/java/org/apache/ignite/lang/utils/GridCircularBufferPerformanceTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/lang/utils/GridCircularBufferPerformanceTest.java b/modules/core/src/test/java/org/apache/ignite/lang/utils/GridCircularBufferPerformanceTest.java
index c0fc486..7e510d5 100644
--- a/modules/core/src/test/java/org/apache/ignite/lang/utils/GridCircularBufferPerformanceTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/lang/utils/GridCircularBufferPerformanceTest.java
@@ -27,14 +27,19 @@ import org.apache.ignite.internal.util.GridCircularBuffer;
import org.apache.ignite.internal.util.typedef.internal.U;
import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest;
import org.apache.ignite.util.deque.FastSizeDeque;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.junit.runners.JUnit4;
/**
*
*/
+@RunWith(JUnit4.class)
public class GridCircularBufferPerformanceTest extends GridCommonAbstractTest {
/**
* @throws Exception If failed.
*/
+ @Test
public void testThroughput() throws Exception {
int size = 256 * 1024;
@@ -74,6 +79,7 @@ public class GridCircularBufferPerformanceTest extends GridCommonAbstractTest {
/**
* @throws Exception If failed.
*/
+ @Test
public void testDequeueThroughput() throws Exception {
final FastSizeDeque<Integer> buf = new FastSizeDeque<>(new ConcurrentLinkedDeque<>());
@@ -117,6 +123,7 @@ public class GridCircularBufferPerformanceTest extends GridCommonAbstractTest {
/**
* @throws Exception If failed.
*/
+ @Test
public void testArrayBlockingQueueThroughput() throws Exception {
final int size = 256 * 1024;
@@ -158,6 +165,7 @@ public class GridCircularBufferPerformanceTest extends GridCommonAbstractTest {
/**
* @throws Exception If failed.
*/
+ @Test
public void testAdderThroughput() throws Exception {
final int size = 256 * 1024;
@@ -194,6 +202,7 @@ public class GridCircularBufferPerformanceTest extends GridCommonAbstractTest {
/**
* @throws Exception If failed.
*/
+ @Test
public void testAtomicLongThroughput() throws Exception {
final int size = 256 * 1024;
@@ -226,4 +235,4 @@ public class GridCircularBufferPerformanceTest extends GridCommonAbstractTest {
info("Buffer: " + buf);
}
-}
\ 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/lang/utils/GridCircularBufferSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/lang/utils/GridCircularBufferSelfTest.java b/modules/core/src/test/java/org/apache/ignite/lang/utils/GridCircularBufferSelfTest.java
index 50d351b..93e9848 100644
--- a/modules/core/src/test/java/org/apache/ignite/lang/utils/GridCircularBufferSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/lang/utils/GridCircularBufferSelfTest.java
@@ -23,14 +23,19 @@ import java.util.concurrent.ConcurrentLinkedDeque;
import java.util.concurrent.atomic.AtomicInteger;
import org.apache.ignite.internal.util.GridCircularBuffer;
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 GridCircularBufferSelfTest extends GridCommonAbstractTest {
/**
*
*/
+ @Test
public void testCreation() {
try {
GridCircularBuffer<Integer> buf = new GridCircularBuffer<>(-2);
@@ -73,6 +78,7 @@ public class GridCircularBufferSelfTest extends GridCommonAbstractTest {
/**
* @throws Exception If failed.
*/
+ @Test
public void testSingleThreaded() throws Exception {
int size = 8;
int iterCnt = size * 10;
@@ -107,6 +113,7 @@ public class GridCircularBufferSelfTest extends GridCommonAbstractTest {
/**
* @throws Exception If failed.
*/
+ @Test
public void testMutliThreaded() throws Exception {
int size = 32 * 1024;
@@ -135,6 +142,7 @@ public class GridCircularBufferSelfTest extends GridCommonAbstractTest {
/**
* @throws Exception If failed.
*/
+ @Test
public void testMutliThreaded2() throws Exception {
int size = 256 * 1024;
@@ -173,4 +181,4 @@ public class GridCircularBufferSelfTest extends GridCommonAbstractTest {
info("Buffer: " + buf);
}
-}
\ 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/lang/utils/GridConcurrentLinkedHashMapSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/lang/utils/GridConcurrentLinkedHashMapSelfTest.java b/modules/core/src/test/java/org/apache/ignite/lang/utils/GridConcurrentLinkedHashMapSelfTest.java
index 7bcbd07..98524dc 100644
--- a/modules/core/src/test/java/org/apache/ignite/lang/utils/GridConcurrentLinkedHashMapSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/lang/utils/GridConcurrentLinkedHashMapSelfTest.java
@@ -27,6 +27,9 @@ import java.util.Random;
import java.util.concurrent.ThreadLocalRandom;
import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest;
import org.jsr166.ConcurrentLinkedHashMap;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.junit.runners.JUnit4;
import static org.jsr166.ConcurrentLinkedHashMap.QueuePolicy.PER_SEGMENT_Q;
import static org.jsr166.ConcurrentLinkedHashMap.QueuePolicy.PER_SEGMENT_Q_OPTIMIZED_RMV;
@@ -34,6 +37,7 @@ import static org.jsr166.ConcurrentLinkedHashMap.QueuePolicy.PER_SEGMENT_Q_OPTIM
/**
* This class tests basic contracts of {@code ConcurrentLinkedHashMap}.
*/
+@RunWith(JUnit4.class)
public class GridConcurrentLinkedHashMapSelfTest extends GridCommonAbstractTest {
/** */
private static final int KEYS_UPPER_BOUND = 1000;
@@ -47,6 +51,7 @@ public class GridConcurrentLinkedHashMapSelfTest extends GridCommonAbstractTest
/**
*
*/
+ @Test
public void testInsertionOrder() {
testOrder(false);
}
@@ -54,6 +59,7 @@ public class GridConcurrentLinkedHashMapSelfTest extends GridCommonAbstractTest
/**
*
*/
+ @Test
public void testInsertionOrderWithUpdate() {
testOrder(true);
}
@@ -61,6 +67,7 @@ public class GridConcurrentLinkedHashMapSelfTest extends GridCommonAbstractTest
/**
*
*/
+ @Test
public void testEvictionInsert() {
final int mapSize = 1000;
@@ -159,6 +166,7 @@ public class GridConcurrentLinkedHashMapSelfTest extends GridCommonAbstractTest
* Tests iterator when concurrent modifications remove and add the same keys to the map.
*
*/
+ @Test
public void testIteratorDuplicates() {
Map<Integer, String> tst = new ConcurrentLinkedHashMap<>();
@@ -187,6 +195,7 @@ public class GridConcurrentLinkedHashMapSelfTest extends GridCommonAbstractTest
/**
* @throws Exception If failed.
*/
+ @Test
public void testRehash() throws Exception {
Map<Integer, Date> map = new ConcurrentLinkedHashMap<>(10);
@@ -204,6 +213,7 @@ public class GridConcurrentLinkedHashMapSelfTest extends GridCommonAbstractTest
/**
*
*/
+ @Test
public void testDescendingMethods() {
ConcurrentLinkedHashMap<Integer, Integer> tst = new ConcurrentLinkedHashMap<>();
@@ -273,6 +283,7 @@ public class GridConcurrentLinkedHashMapSelfTest extends GridCommonAbstractTest
/**
*
*/
+ @Test
public void testIterationInPerSegmentModes() {
checkIteration(PER_SEGMENT_Q);
checkIteration(PER_SEGMENT_Q_OPTIMIZED_RMV);
http://git-wip-us.apache.org/repos/asf/ignite/blob/f0544d46/modules/core/src/test/java/org/apache/ignite/lang/utils/GridConcurrentWeakHashSetSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/lang/utils/GridConcurrentWeakHashSetSelfTest.java b/modules/core/src/test/java/org/apache/ignite/lang/utils/GridConcurrentWeakHashSetSelfTest.java
index 42a6a71..8316e5a 100644
--- a/modules/core/src/test/java/org/apache/ignite/lang/utils/GridConcurrentWeakHashSetSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/lang/utils/GridConcurrentWeakHashSetSelfTest.java
@@ -28,11 +28,15 @@ import org.apache.ignite.internal.util.typedef.internal.S;
import org.apache.ignite.internal.util.typedef.internal.U;
import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest;
import org.apache.ignite.testframework.junits.common.GridCommonTest;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.junit.runners.JUnit4;
/**
* Test for {@link GridConcurrentWeakHashSet}.
*/
@GridCommonTest(group = "Lang")
+@RunWith(JUnit4.class)
public class GridConcurrentWeakHashSetSelfTest extends GridCommonAbstractTest {
/** Time to wait after {@link System#gc} method call. */
private static final long WAIT_TIME = 3000;
@@ -43,6 +47,7 @@ public class GridConcurrentWeakHashSetSelfTest extends GridCommonAbstractTest {
/**
* @throws Exception Thrown if test failed.
*/
+ @Test
public void testA() throws Exception {
Collection<Integer> set = new GridConcurrentWeakHashSet<>();
@@ -129,6 +134,7 @@ public class GridConcurrentWeakHashSetSelfTest extends GridCommonAbstractTest {
* @throws Exception Thrown if test failed.
*/
@SuppressWarnings({"UnusedAssignment"})
+ @Test
public void testB() throws Exception {
Collection<SampleBean> set = new GridConcurrentWeakHashSet<>();
@@ -198,6 +204,7 @@ public class GridConcurrentWeakHashSetSelfTest extends GridCommonAbstractTest {
/**
* @throws Exception Thrown if test failed.
*/
+ @Test
public void testC() throws Exception {
final Collection<SampleBean> set = new GridConcurrentWeakHashSet<>();
@@ -243,6 +250,7 @@ public class GridConcurrentWeakHashSetSelfTest extends GridCommonAbstractTest {
/**
* @throws Exception Thrown if test failed.
*/
+ @Test
public void testD() throws Exception {
final Collection<SampleBean> set = new GridConcurrentWeakHashSet<>();
@@ -395,4 +403,4 @@ public class GridConcurrentWeakHashSetSelfTest extends GridCommonAbstractTest {
return S.toString(SampleBean.class, this);
}
}
-}
\ 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/lang/utils/GridConsistentHashSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/lang/utils/GridConsistentHashSelfTest.java b/modules/core/src/test/java/org/apache/ignite/lang/utils/GridConsistentHashSelfTest.java
index c44d91b..c727f9c 100644
--- a/modules/core/src/test/java/org/apache/ignite/lang/utils/GridConsistentHashSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/lang/utils/GridConsistentHashSelfTest.java
@@ -32,11 +32,15 @@ import org.apache.ignite.internal.util.GridConsistentHash;
import org.apache.ignite.internal.util.typedef.F;
import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest;
import org.apache.ignite.testframework.junits.common.GridCommonTest;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.junit.runners.JUnit4;
/**
* Consistent hash test.
*/
@GridCommonTest(group = "Lang")
+@RunWith(JUnit4.class)
public class GridConsistentHashSelfTest extends GridCommonAbstractTest {
/** */
private static final int NODES = 20;
@@ -102,6 +106,7 @@ public class GridConsistentHashSelfTest extends GridCommonAbstractTest {
*
* @throws Exception In case of any exception.
*/
+ @Test
public void testCollisions() throws Exception {
Map<Integer, Set<UUID>> map = new HashMap<>();
@@ -153,6 +158,7 @@ public class GridConsistentHashSelfTest extends GridCommonAbstractTest {
*
* @throws Exception In case of any exception.
*/
+ @Test
public void testTreeSetRestrictions() throws Exception {
// Constructs hash without explicit node's comparator.
GridConsistentHash<Object> hash = new GridConsistentHash<>();
@@ -186,6 +192,7 @@ public class GridConsistentHashSelfTest extends GridCommonAbstractTest {
/**
*
*/
+ @Test
public void testOneNode() {
GridConsistentHash<UUID> hash = new GridConsistentHash<>();
@@ -203,6 +210,7 @@ public class GridConsistentHashSelfTest extends GridCommonAbstractTest {
/**
*
*/
+ @Test
public void testHistory() {
for (int i = NODES; i-- > 0; ) {
GridConsistentHash<UUID> hash = new GridConsistentHash<>();
@@ -337,4 +345,4 @@ public class GridConsistentHashSelfTest extends GridCommonAbstractTest {
return keys;
}
-}
\ 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/lang/utils/GridLeanIdentitySetSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/lang/utils/GridLeanIdentitySetSelfTest.java b/modules/core/src/test/java/org/apache/ignite/lang/utils/GridLeanIdentitySetSelfTest.java
index 0cfe0c8..b0643e2 100644
--- a/modules/core/src/test/java/org/apache/ignite/lang/utils/GridLeanIdentitySetSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/lang/utils/GridLeanIdentitySetSelfTest.java
@@ -21,17 +21,22 @@ import java.util.Set;
import org.apache.ignite.internal.util.GridLeanIdentitySet;
import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest;
import org.apache.ignite.testframework.junits.common.GridCommonTest;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.junit.runners.JUnit4;
/**
* Tests for {@link org.apache.ignite.internal.util.GridLeanMap}.
*/
@GridCommonTest(group = "Lang")
+@RunWith(JUnit4.class)
public class GridLeanIdentitySetSelfTest extends GridCommonAbstractTest {
/**
* JUnit.
*
* @throws Exception If failed.
*/
+ @Test
public void testAddSizeContainsClear() throws Exception {
Set<Integer> set = new GridLeanIdentitySet<>();
@@ -59,4 +64,4 @@ public class GridLeanIdentitySetSelfTest extends GridCommonAbstractTest {
assert set.isEmpty();
}
-}
\ 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/lang/utils/GridLeanMapPerformanceTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/lang/utils/GridLeanMapPerformanceTest.java b/modules/core/src/test/java/org/apache/ignite/lang/utils/GridLeanMapPerformanceTest.java
index d9ff27c..f6fb99a 100644
--- a/modules/core/src/test/java/org/apache/ignite/lang/utils/GridLeanMapPerformanceTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/lang/utils/GridLeanMapPerformanceTest.java
@@ -20,10 +20,14 @@ package org.apache.ignite.lang.utils;
import java.util.Map;
import org.apache.ignite.internal.util.GridLeanMap;
import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.junit.runners.JUnit4;
/**
* Performance test for {@link GridLeanMap}.
*/
+@RunWith(JUnit4.class)
public class GridLeanMapPerformanceTest extends GridCommonAbstractTest {
/** */
private static final int RUN_CNT = 5;
@@ -34,6 +38,7 @@ public class GridLeanMapPerformanceTest extends GridCommonAbstractTest {
/**
* @throws Exception If failed.
*/
+ @Test
public void testPerformance() throws Exception {
long avgDur = 0;
@@ -80,4 +85,4 @@ public class GridLeanMapPerformanceTest extends GridCommonAbstractTest {
for (Integer v : map.values());
}
}
-}
\ 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/lang/utils/GridLeanMapSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/lang/utils/GridLeanMapSelfTest.java b/modules/core/src/test/java/org/apache/ignite/lang/utils/GridLeanMapSelfTest.java
index 887d05a..4dddf47 100644
--- a/modules/core/src/test/java/org/apache/ignite/lang/utils/GridLeanMapSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/lang/utils/GridLeanMapSelfTest.java
@@ -25,17 +25,22 @@ import org.apache.ignite.internal.util.GridLeanMap;
import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest;
import org.apache.ignite.testframework.junits.common.GridCommonTest;
import org.jetbrains.annotations.Nullable;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.junit.runners.JUnit4;
/**
* Tests for {@link GridLeanMap}.
*/
@GridCommonTest(group = "Lang")
+@RunWith(JUnit4.class)
public class GridLeanMapSelfTest extends GridCommonAbstractTest {
/**
* JUnit.
*
* @throws Exception If failed.
*/
+ @Test
public void testDefaultMap() throws Exception {
Map<String, String> map = new GridLeanMap<>();
@@ -102,6 +107,7 @@ public class GridLeanMapSelfTest extends GridCommonAbstractTest {
*
* @throws Exception If failed.
*/
+ @Test
public void testEmptyMap() throws Exception {
Map<String, String> map = new GridLeanMap<>(0);
@@ -168,6 +174,7 @@ public class GridLeanMapSelfTest extends GridCommonAbstractTest {
*
* @throws Exception If failed.
*/
+ @Test
public void testOneEntryMap() throws Exception {
Map<String, String> map = new GridLeanMap<>(0);
@@ -223,6 +230,7 @@ public class GridLeanMapSelfTest extends GridCommonAbstractTest {
*
* @throws Exception If failed.
*/
+ @Test
public void testMapPutSameKey() throws Exception {
Map<String, String> map = new GridLeanMap<>(0);
@@ -241,6 +249,7 @@ public class GridLeanMapSelfTest extends GridCommonAbstractTest {
*
* @throws Exception If failed.
*/
+ @Test
public void testMultipleEntriesMap() throws Exception {
Map<String, String> map = new GridLeanMap<>(0);
@@ -332,6 +341,7 @@ public class GridLeanMapSelfTest extends GridCommonAbstractTest {
*
* @throws Exception If failed.
*/
+ @Test
public void testMapRemove() throws Exception {
Map<String, String> map = new GridLeanMap<>(0);
@@ -386,6 +396,7 @@ public class GridLeanMapSelfTest extends GridCommonAbstractTest {
*
* @throws Exception If failed.
*/
+ @Test
public void testMapClear() throws Exception {
Map<String, String> map = new GridLeanMap<>();
@@ -407,6 +418,7 @@ public class GridLeanMapSelfTest extends GridCommonAbstractTest {
*
* @throws Exception If failed.
*/
+ @Test
public void testEntrySet() throws Exception {
Map<String, String> map = new GridLeanMap<>();
@@ -459,6 +471,7 @@ public class GridLeanMapSelfTest extends GridCommonAbstractTest {
*
* @throws Exception If failed.
*/
+ @Test
public void testWithInitSize1() throws Exception {
// Batch mode.
Map<String, String> map = new GridLeanMap<>(4);
@@ -527,6 +540,7 @@ public class GridLeanMapSelfTest extends GridCommonAbstractTest {
*
* @throws Exception If failed.
*/
+ @Test
public void testWithInitSize2() throws Exception {
// Batch mode.
Map<String, String> map = new GridLeanMap<>(10);
@@ -656,4 +670,4 @@ public class GridLeanMapSelfTest extends GridCommonAbstractTest {
else
checkImpl(map, "LeanHashMap");
}
-}
\ 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/lang/utils/GridListSetSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/lang/utils/GridListSetSelfTest.java b/modules/core/src/test/java/org/apache/ignite/lang/utils/GridListSetSelfTest.java
index 6dbff65..f7a93cc 100644
--- a/modules/core/src/test/java/org/apache/ignite/lang/utils/GridListSetSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/lang/utils/GridListSetSelfTest.java
@@ -25,15 +25,20 @@ import org.apache.ignite.internal.util.GridListSet;
import org.apache.ignite.internal.util.typedef.internal.S;
import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest;
import org.apache.ignite.testframework.junits.common.GridCommonTest;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.junit.runners.JUnit4;
/**
* Test for {@link GridListSet}.
*/
@GridCommonTest(group = "Lang")
+@RunWith(JUnit4.class)
public class GridListSetSelfTest extends GridCommonAbstractTest {
/**
*
*/
+ @Test
public void testUnsorted() {
GridListSet<V1> set = new GridListSet<>();
@@ -91,6 +96,7 @@ public class GridListSetSelfTest extends GridCommonAbstractTest {
/**
*
*/
+ @Test
public void testSortedNotStrict() {
GridListSet<V1> set = new GridListSet<>(new Comparator<V1>() {
@Override public int compare(V1 o1, V1 o2) {
@@ -153,6 +159,7 @@ public class GridListSetSelfTest extends GridCommonAbstractTest {
/**
*
*/
+ @Test
public void testSortedStrict() {
List<V2> vals = new ArrayList<>();
@@ -286,4 +293,4 @@ public class GridListSetSelfTest extends GridCommonAbstractTest {
return S.toString(V2.class, this, super.toString());
}
}
-}
\ 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/lang/utils/GridStripedLockSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/lang/utils/GridStripedLockSelfTest.java b/modules/core/src/test/java/org/apache/ignite/lang/utils/GridStripedLockSelfTest.java
index f6fb545..14d546565 100644
--- a/modules/core/src/test/java/org/apache/ignite/lang/utils/GridStripedLockSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/lang/utils/GridStripedLockSelfTest.java
@@ -24,10 +24,14 @@ import java.util.concurrent.locks.ReentrantLock;
import org.apache.ignite.internal.util.GridStripedLock;
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 GridStripedLockSelfTest extends GridCommonAbstractTest {
/** */
private static final int STRIPE_COUNT = 16;
@@ -54,6 +58,7 @@ public class GridStripedLockSelfTest extends GridCommonAbstractTest {
/**
* @throws Exception If failed.
*/
+ @Test
public void testIntLocking() throws Exception {
GridTestUtils.runMultiThreaded(new Runnable() {
@Override public void run() {
@@ -87,6 +92,7 @@ public class GridStripedLockSelfTest extends GridCommonAbstractTest {
/**
* @throws Exception If failed.
*/
+ @Test
public void testLongLocking() throws Exception {
GridTestUtils.runMultiThreaded(new Runnable() {
@Override public void run() {
@@ -120,6 +126,7 @@ public class GridStripedLockSelfTest extends GridCommonAbstractTest {
/**
* @throws Exception If failed.
*/
+ @Test
public void testObjectLocking() throws Exception {
GridTestUtils.runMultiThreaded(new Runnable() {
@Override public void run() {
@@ -197,4 +204,4 @@ public class GridStripedLockSelfTest extends GridCommonAbstractTest {
}
};
}
-}
\ 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/lang/utils/IgniteOffheapReadWriteLockSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/lang/utils/IgniteOffheapReadWriteLockSelfTest.java b/modules/core/src/test/java/org/apache/ignite/lang/utils/IgniteOffheapReadWriteLockSelfTest.java
index c5ebe6a..91c353d 100644
--- a/modules/core/src/test/java/org/apache/ignite/lang/utils/IgniteOffheapReadWriteLockSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/lang/utils/IgniteOffheapReadWriteLockSelfTest.java
@@ -29,11 +29,15 @@ import java.util.concurrent.CyclicBarrier;
import java.util.concurrent.ThreadLocalRandom;
import java.util.concurrent.atomic.AtomicBoolean;
import java.util.concurrent.atomic.AtomicInteger;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.junit.runners.JUnit4;
/**
*
*/
@SuppressWarnings("BusyWait")
+@RunWith(JUnit4.class)
public class IgniteOffheapReadWriteLockSelfTest extends GridCommonAbstractTest {
/** */
private static final int TAG_0 = 1;
@@ -44,6 +48,7 @@ public class IgniteOffheapReadWriteLockSelfTest extends GridCommonAbstractTest {
/**
* @throws Exception if failed.
*/
+ @Test
public void testConcurrentUpdatesSingleLock() throws Exception {
final int numPairs = 100;
final Pair[] data = new Pair[numPairs];
@@ -139,6 +144,7 @@ public class IgniteOffheapReadWriteLockSelfTest extends GridCommonAbstractTest {
/**
* @throws Exception if failed.
*/
+ @Test
public void testConcurrentUpdatesMultipleLocks() throws Exception {
final int numPairs = 100;
final Pair[] data = new Pair[numPairs];
@@ -225,6 +231,7 @@ public class IgniteOffheapReadWriteLockSelfTest extends GridCommonAbstractTest {
/**
* @throws Exception if failed.
*/
+ @Test
public void testLockUpgradeMultipleLocks() throws Exception {
final int numPairs = 100;
final Pair[] data = new Pair[numPairs];
@@ -312,6 +319,7 @@ public class IgniteOffheapReadWriteLockSelfTest extends GridCommonAbstractTest {
/**
* @throws Exception if failed.
*/
+ @Test
public void testTagIdUpdateWait() throws Exception {
checkTagIdUpdate(true);
}
@@ -319,6 +327,7 @@ public class IgniteOffheapReadWriteLockSelfTest extends GridCommonAbstractTest {
/**
* @throws Exception if failed.
*/
+ @Test
public void testTagIdUpdateContinuous() throws Exception {
checkTagIdUpdate(false);
}
http://git-wip-us.apache.org/repos/asf/ignite/blob/f0544d46/modules/core/src/test/java/org/apache/ignite/loadtests/GridCacheMultiNodeLoadTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/loadtests/GridCacheMultiNodeLoadTest.java b/modules/core/src/test/java/org/apache/ignite/loadtests/GridCacheMultiNodeLoadTest.java
index 35c3405..9f31dd8 100644
--- a/modules/core/src/test/java/org/apache/ignite/loadtests/GridCacheMultiNodeLoadTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/loadtests/GridCacheMultiNodeLoadTest.java
@@ -25,6 +25,9 @@ import org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi;
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.Test;
+import org.junit.runner.RunWith;
+import org.junit.runners.JUnit4;
import static org.apache.ignite.cache.CacheMode.PARTITIONED;
import static org.apache.ignite.cache.CacheRebalanceMode.SYNC;
@@ -33,6 +36,7 @@ import static org.apache.ignite.cache.CacheWriteSynchronizationMode.FULL_SYNC;
/**
* Multi-node cache test.
*/
+@RunWith(JUnit4.class)
public class GridCacheMultiNodeLoadTest extends GridCommonAbstractTest {
/** Cache name. */
public static final String CACHE_NAME = "partitioned";
@@ -97,7 +101,8 @@ public class GridCacheMultiNodeLoadTest extends GridCommonAbstractTest {
/**
* @throws Exception If test failed.
*/
+ @Test
public void testMany() throws Exception {
ignite1.compute().execute(GridCacheLoadPopulationTask.class, null);
}
-}
\ 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/loadtests/cache/GridCacheWriteBehindStoreLoadTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/loadtests/cache/GridCacheWriteBehindStoreLoadTest.java b/modules/core/src/test/java/org/apache/ignite/loadtests/cache/GridCacheWriteBehindStoreLoadTest.java
index e4c4b25..69d8f51 100644
--- a/modules/core/src/test/java/org/apache/ignite/loadtests/cache/GridCacheWriteBehindStoreLoadTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/loadtests/cache/GridCacheWriteBehindStoreLoadTest.java
@@ -31,12 +31,16 @@ import org.apache.ignite.internal.util.typedef.internal.U;
import org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi;
import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder;
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.cache.CacheWriteSynchronizationMode.FULL_SYNC;
/**
* Basic store test.
*/
+@RunWith(JUnit4.class)
public class GridCacheWriteBehindStoreLoadTest extends GridCommonAbstractTest {
/** Flush frequency. */
private static final int WRITE_FROM_BEHIND_FLUSH_FREQUENCY = 1000;
@@ -125,6 +129,7 @@ public class GridCacheWriteBehindStoreLoadTest extends GridCommonAbstractTest {
/**
* @throws Exception If failed.
*/
+ @Test
public void testLoadCacheSequentialKeys() throws Exception {
rndKeys = false;
@@ -136,6 +141,7 @@ public class GridCacheWriteBehindStoreLoadTest extends GridCommonAbstractTest {
/**
* @throws Exception If failed.
*/
+ @Test
public void testLoadCacheRandomKeys() throws Exception {
rndKeys = true;
@@ -198,4 +204,4 @@ public class GridCacheWriteBehindStoreLoadTest extends GridCommonAbstractTest {
@Override protected long getTestTimeout() {
return 0;
}
-}
\ 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/loadtests/communication/GridIoManagerBenchmark0.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/loadtests/communication/GridIoManagerBenchmark0.java b/modules/core/src/test/java/org/apache/ignite/loadtests/communication/GridIoManagerBenchmark0.java
index 68fff45..6439ebd 100644
--- a/modules/core/src/test/java/org/apache/ignite/loadtests/communication/GridIoManagerBenchmark0.java
+++ b/modules/core/src/test/java/org/apache/ignite/loadtests/communication/GridIoManagerBenchmark0.java
@@ -47,12 +47,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;
import static org.apache.ignite.internal.managers.communication.GridIoPolicy.PUBLIC_POOL;
/**
*
*/
+@RunWith(JUnit4.class)
public class GridIoManagerBenchmark0 extends GridCommonAbstractTest {
/** */
public static final int CONCUR_MSGS = 10 * 1024;
@@ -103,6 +107,7 @@ public class GridIoManagerBenchmark0 extends GridCommonAbstractTest {
/**
* @throws Exception If failed.
*/
+ @Test
public void testThroughput() throws Exception {
final IgniteKernal sndKernal = (IgniteKernal)grid(0);
final IgniteKernal rcvKernal = (IgniteKernal)grid(1);
@@ -198,6 +203,7 @@ public class GridIoManagerBenchmark0 extends GridCommonAbstractTest {
/**
* @throws Exception If failed.
*/
+ @Test
public void testLatency() throws Exception {
final IgniteKernal sndKernal = (IgniteKernal)grid(0);
final IgniteKernal rcvKernal = (IgniteKernal)grid(1);
@@ -293,6 +299,7 @@ public class GridIoManagerBenchmark0 extends GridCommonAbstractTest {
/**
* @throws Exception If failed.
*/
+ @Test
public void testVariableLoad() throws Exception {
final IgniteKernal sndKernal = (IgniteKernal)grid(0);
final IgniteKernal rcvKernal = (IgniteKernal)grid(1);
@@ -466,4 +473,4 @@ public class GridIoManagerBenchmark0 extends GridCommonAbstractTest {
@Override protected long getTestTimeout() {
return TEST_TIMEOUT + 60 * 1000;
}
-}
\ 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/loadtests/communication/GridTcpCommunicationBenchmark.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/loadtests/communication/GridTcpCommunicationBenchmark.java b/modules/core/src/test/java/org/apache/ignite/loadtests/communication/GridTcpCommunicationBenchmark.java
index b620949..b94ccca 100644
--- a/modules/core/src/test/java/org/apache/ignite/loadtests/communication/GridTcpCommunicationBenchmark.java
+++ b/modules/core/src/test/java/org/apache/ignite/loadtests/communication/GridTcpCommunicationBenchmark.java
@@ -583,4 +583,4 @@ package org.apache.ignite.loadtests.communication;
// @Override protected long getTestTimeout() {
// return TEST_TIMEOUT + 60 * 1000;
// }
-//}
\ 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/loadtests/datastructures/GridCachePartitionedAtomicLongLoadTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/loadtests/datastructures/GridCachePartitionedAtomicLongLoadTest.java b/modules/core/src/test/java/org/apache/ignite/loadtests/datastructures/GridCachePartitionedAtomicLongLoadTest.java
index 3017272..ad46a58 100644
--- a/modules/core/src/test/java/org/apache/ignite/loadtests/datastructures/GridCachePartitionedAtomicLongLoadTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/loadtests/datastructures/GridCachePartitionedAtomicLongLoadTest.java
@@ -34,6 +34,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.junits.common.GridCommonAbstractTest;
import org.apache.ignite.transactions.Transaction;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.junit.runners.JUnit4;
import static org.apache.ignite.cache.CacheMode.PARTITIONED;
import static org.apache.ignite.cache.CacheWriteSynchronizationMode.FULL_SYNC;
@@ -43,6 +46,7 @@ import static org.apache.ignite.transactions.TransactionIsolation.REPEATABLE_REA
/**
* Load test for atomic long.
*/
+@RunWith(JUnit4.class)
public class GridCachePartitionedAtomicLongLoadTest extends GridCommonAbstractTest {
/** Test duration. */
private static final long DURATION = 8 * 60 * 60 * 1000;
@@ -96,6 +100,7 @@ public class GridCachePartitionedAtomicLongLoadTest extends GridCommonAbstractTe
/**
* @throws Exception If failed.
*/
+ @Test
public void testLoad() throws Exception {
startGrid();
@@ -139,4 +144,4 @@ public class GridCachePartitionedAtomicLongLoadTest extends GridCommonAbstractTe
return true;
}
}
-}
\ 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/loadtests/direct/multisplit/GridMultiSplitsLoadTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/loadtests/direct/multisplit/GridMultiSplitsLoadTest.java b/modules/core/src/test/java/org/apache/ignite/loadtests/direct/multisplit/GridMultiSplitsLoadTest.java
index b6910b3..15926fc 100644
--- a/modules/core/src/test/java/org/apache/ignite/loadtests/direct/multisplit/GridMultiSplitsLoadTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/loadtests/direct/multisplit/GridMultiSplitsLoadTest.java
@@ -31,11 +31,15 @@ import org.apache.ignite.testframework.GridTestUtils;
import org.apache.ignite.testframework.config.GridTestProperties;
import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest;
import org.apache.ignite.testframework.junits.common.GridCommonTest;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.junit.runners.JUnit4;
/**
* Multi-splits load test.
*/
@GridCommonTest(group = "Load Test")
+@RunWith(JUnit4.class)
public class GridMultiSplitsLoadTest extends GridCommonAbstractTest {
/** */
public GridMultiSplitsLoadTest() {
@@ -87,6 +91,7 @@ public class GridMultiSplitsLoadTest extends GridCommonAbstractTest {
*
* @throws Exception If task execution failed.
*/
+ @Test
public void testLoad() throws Exception {
final Ignite ignite = G.ignite(getTestIgniteInstanceName());
http://git-wip-us.apache.org/repos/asf/ignite/blob/f0544d46/modules/core/src/test/java/org/apache/ignite/loadtests/direct/multisplit/GridMultiSplitsRedeployLoadTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/loadtests/direct/multisplit/GridMultiSplitsRedeployLoadTest.java b/modules/core/src/test/java/org/apache/ignite/loadtests/direct/multisplit/GridMultiSplitsRedeployLoadTest.java
index 46dc5bd..1b9bf2c 100644
--- a/modules/core/src/test/java/org/apache/ignite/loadtests/direct/multisplit/GridMultiSplitsRedeployLoadTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/loadtests/direct/multisplit/GridMultiSplitsRedeployLoadTest.java
@@ -27,11 +27,15 @@ import org.apache.ignite.testframework.GridTestUtils;
import org.apache.ignite.testframework.config.GridTestProperties;
import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest;
import org.apache.ignite.testframework.junits.common.GridCommonTest;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.junit.runners.JUnit4;
/**
* Multi splits redeploy load test.
*/
@GridCommonTest(group = "Load Test")
+@RunWith(JUnit4.class)
public class GridMultiSplitsRedeployLoadTest extends GridCommonAbstractTest {
/** Load test task type ID. */
public static final String TASK_TYPE_ID = GridLoadTestTask.class.getName();
@@ -74,6 +78,7 @@ public class GridMultiSplitsRedeployLoadTest extends GridCommonAbstractTest {
*
* @throws Exception If task execution failed.
*/
+ @Test
public void testLoad() throws Exception {
final Ignite ignite = G.ignite(getTestIgniteInstanceName());
http://git-wip-us.apache.org/repos/asf/ignite/blob/f0544d46/modules/core/src/test/java/org/apache/ignite/loadtests/direct/newnodes/GridSingleSplitsNewNodesAbstractLoadTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/loadtests/direct/newnodes/GridSingleSplitsNewNodesAbstractLoadTest.java b/modules/core/src/test/java/org/apache/ignite/loadtests/direct/newnodes/GridSingleSplitsNewNodesAbstractLoadTest.java
index 54d62c2..5263348 100644
--- a/modules/core/src/test/java/org/apache/ignite/loadtests/direct/newnodes/GridSingleSplitsNewNodesAbstractLoadTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/loadtests/direct/newnodes/GridSingleSplitsNewNodesAbstractLoadTest.java
@@ -29,11 +29,15 @@ import org.apache.ignite.testframework.GridTestUtils;
import org.apache.ignite.testframework.config.GridTestProperties;
import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest;
import org.apache.ignite.testframework.junits.common.GridCommonTest;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.junit.runners.JUnit4;
/**
* Base class for single split on new nodes tests.
*/
@GridCommonTest(group = "Load Test")
+@RunWith(JUnit4.class)
public abstract class GridSingleSplitsNewNodesAbstractLoadTest extends GridCommonAbstractTest {
/**
* @param cfg Current configuration.
@@ -87,6 +91,7 @@ public abstract class GridSingleSplitsNewNodesAbstractLoadTest extends GridCommo
*
* @throws Exception If task execution failed.
*/
+ @Test
public void testLoad() throws Exception {
final Ignite ignite = startGrid(getTestIgniteInstanceName());
http://git-wip-us.apache.org/repos/asf/ignite/blob/f0544d46/modules/core/src/test/java/org/apache/ignite/loadtests/direct/redeploy/GridSingleSplitsRedeployLoadTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/loadtests/direct/redeploy/GridSingleSplitsRedeployLoadTest.java b/modules/core/src/test/java/org/apache/ignite/loadtests/direct/redeploy/GridSingleSplitsRedeployLoadTest.java
index 057a1c8..85b1b27 100644
--- a/modules/core/src/test/java/org/apache/ignite/loadtests/direct/redeploy/GridSingleSplitsRedeployLoadTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/loadtests/direct/redeploy/GridSingleSplitsRedeployLoadTest.java
@@ -33,11 +33,15 @@ import org.apache.ignite.testframework.GridTestUtils;
import org.apache.ignite.testframework.config.GridTestProperties;
import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest;
import org.apache.ignite.testframework.junits.common.GridCommonTest;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.junit.runners.JUnit4;
/**
* Single splits redeploy load test.
*/
@GridCommonTest(group = "Load Test")
+@RunWith(JUnit4.class)
public class GridSingleSplitsRedeployLoadTest extends GridCommonAbstractTest {
/** Load test task type ID. */
public static final String TASK_NAME = "org.apache.ignite.tests.p2p.SingleSplitTestTask";
@@ -91,6 +95,7 @@ public class GridSingleSplitsRedeployLoadTest extends GridCommonAbstractTest {
*
* @throws Exception If task execution failed.
*/
+ @Test
public void testLoad() throws Exception {
final Ignite ignite = G.ignite(getTestIgniteInstanceName());
http://git-wip-us.apache.org/repos/asf/ignite/blob/f0544d46/modules/core/src/test/java/org/apache/ignite/loadtests/direct/session/GridSessionLoadTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/loadtests/direct/session/GridSessionLoadTest.java b/modules/core/src/test/java/org/apache/ignite/loadtests/direct/session/GridSessionLoadTest.java
index adc47cd..0b1957b 100644
--- a/modules/core/src/test/java/org/apache/ignite/loadtests/direct/session/GridSessionLoadTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/loadtests/direct/session/GridSessionLoadTest.java
@@ -26,11 +26,15 @@ import org.apache.ignite.testframework.GridTestUtils;
import org.apache.ignite.testframework.config.GridTestProperties;
import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest;
import org.apache.ignite.testframework.junits.common.GridCommonTest;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.junit.runners.JUnit4;
/**
* Session load test.
*/
@GridCommonTest(group = "Load Test")
+@RunWith(JUnit4.class)
public class GridSessionLoadTest extends GridCommonAbstractTest {
/** */
public GridSessionLoadTest() {
@@ -59,6 +63,7 @@ public class GridSessionLoadTest extends GridCommonAbstractTest {
/**
* @throws Exception If failed.
*/
+ @Test
public void testSessionLoad() throws Exception {
final Ignite ignite = G.ignite(getTestIgniteInstanceName());
http://git-wip-us.apache.org/repos/asf/ignite/blob/f0544d46/modules/core/src/test/java/org/apache/ignite/loadtests/direct/stealing/GridStealingLoadTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/loadtests/direct/stealing/GridStealingLoadTest.java b/modules/core/src/test/java/org/apache/ignite/loadtests/direct/stealing/GridStealingLoadTest.java
index cbc2ea0..6bfdd36 100644
--- a/modules/core/src/test/java/org/apache/ignite/loadtests/direct/stealing/GridStealingLoadTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/loadtests/direct/stealing/GridStealingLoadTest.java
@@ -32,11 +32,15 @@ import org.apache.ignite.testframework.GridTestUtils;
import org.apache.ignite.testframework.config.GridTestProperties;
import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest;
import org.apache.ignite.testframework.junits.common.GridCommonTest;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.junit.runners.JUnit4;
/**
*
*/
@GridCommonTest(group = "Load Test")
+@RunWith(JUnit4.class)
public class GridStealingLoadTest extends GridCommonAbstractTest {
/** */
public GridStealingLoadTest() {
@@ -86,6 +90,7 @@ public class GridStealingLoadTest extends GridCommonAbstractTest {
/**
* @throws Exception If failed.
*/
+ @Test
public void testStealingLoad() throws Exception {
final Ignite ignite = grid(0);
http://git-wip-us.apache.org/repos/asf/ignite/blob/f0544d46/modules/core/src/test/java/org/apache/ignite/loadtests/hashmap/GridHashMapLoadTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/loadtests/hashmap/GridHashMapLoadTest.java b/modules/core/src/test/java/org/apache/ignite/loadtests/hashmap/GridHashMapLoadTest.java
index 7d4f90e..7b2ddb6 100644
--- a/modules/core/src/test/java/org/apache/ignite/loadtests/hashmap/GridHashMapLoadTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/loadtests/hashmap/GridHashMapLoadTest.java
@@ -28,15 +28,20 @@ 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.jetbrains.annotations.Nullable;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.junit.runners.JUnit4;
/**
* Tests hashmap load.
*/
@SuppressWarnings("InfiniteLoopStatement")
+@RunWith(JUnit4.class)
public class GridHashMapLoadTest extends GridCommonAbstractTest {
/**
*
*/
+ @Test
public void testHashMapLoad() {
Map<Integer, Integer> map = new HashMap<>(5 * 1024 * 1024);
@@ -53,6 +58,7 @@ public class GridHashMapLoadTest extends GridCommonAbstractTest {
/**
*
*/
+ @Test
public void testConcurrentHashMapLoad() {
Map<Integer, Integer> map = new ConcurrentHashMap<>(5 * 1024 * 1024);
@@ -69,6 +75,7 @@ public class GridHashMapLoadTest extends GridCommonAbstractTest {
/**
* @throws Exception If failed.
*/
+ @Test
public void testMapEntry() throws Exception {
Map<Integer, GridCacheMapEntry> map = new HashMap<>(5 * 1024 * 1024);
http://git-wip-us.apache.org/repos/asf/ignite/blob/f0544d46/modules/core/src/test/java/org/apache/ignite/logger/java/JavaLoggerTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/logger/java/JavaLoggerTest.java b/modules/core/src/test/java/org/apache/ignite/logger/java/JavaLoggerTest.java
index d9ec810..f8b71f1 100644
--- a/modules/core/src/test/java/org/apache/ignite/logger/java/JavaLoggerTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/logger/java/JavaLoggerTest.java
@@ -23,11 +23,15 @@ import org.apache.ignite.IgniteLogger;
import org.apache.ignite.internal.util.typedef.internal.U;
import org.apache.ignite.logger.LoggerNodeIdAware;
import org.apache.ignite.testframework.junits.common.GridCommonTest;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.junit.runners.JUnit4;
/**
* Java logger test.
*/
@GridCommonTest(group = "Logger")
+@RunWith(JUnit4.class)
public class JavaLoggerTest extends TestCase {
/** */
@SuppressWarnings({"FieldCanBeLocal"})
@@ -36,6 +40,7 @@ public class JavaLoggerTest extends TestCase {
/**
* @throws Exception If failed.
*/
+ @Test
public void testLogInitialize() throws Exception {
log = new JavaLogger();
@@ -65,4 +70,4 @@ public class JavaLoggerTest extends TestCase {
// Ensure we don't get pattern, only actual file name is allowed here.
assert !log.fileName().contains("%");
}
-}
\ 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/marshaller/DynamicProxySerializationMultiJvmSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/marshaller/DynamicProxySerializationMultiJvmSelfTest.java b/modules/core/src/test/java/org/apache/ignite/marshaller/DynamicProxySerializationMultiJvmSelfTest.java
index cf4213b..e490afc 100644
--- a/modules/core/src/test/java/org/apache/ignite/marshaller/DynamicProxySerializationMultiJvmSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/marshaller/DynamicProxySerializationMultiJvmSelfTest.java
@@ -27,10 +27,14 @@ import org.apache.ignite.configuration.IgniteConfiguration;
import org.apache.ignite.internal.binary.BinaryMarshaller;
import org.apache.ignite.lang.IgniteCallable;
import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.junit.runners.JUnit4;
/**
* Multi-JVM test for dynamic proxy serialization.
*/
+@RunWith(JUnit4.class)
public class DynamicProxySerializationMultiJvmSelfTest extends GridCommonAbstractTest {
/** */
private static Callable<Marshaller> marshFactory;
@@ -57,6 +61,7 @@ public class DynamicProxySerializationMultiJvmSelfTest extends GridCommonAbstrac
/**
* @throws Exception If failed.
*/
+ @Test
public void testBinaryMarshaller() throws Exception {
marshFactory = new Callable<Marshaller>() {
@Override public Marshaller call() throws Exception {
@@ -70,6 +75,7 @@ public class DynamicProxySerializationMultiJvmSelfTest extends GridCommonAbstrac
/**
* @throws Exception If failed.
*/
+ @Test
public void testToBinary() throws Exception {
marshFactory = new Callable<Marshaller>() {
@Override public Marshaller call() throws Exception {
@@ -89,6 +95,7 @@ public class DynamicProxySerializationMultiJvmSelfTest extends GridCommonAbstrac
/**
* @throws Exception If failed.
*/
+ @Test
public void testBinaryField() throws Exception {
marshFactory = new Callable<Marshaller>() {
@Override public Marshaller call() throws Exception {
http://git-wip-us.apache.org/repos/asf/ignite/blob/f0544d46/modules/core/src/test/java/org/apache/ignite/marshaller/GridMarshallerAbstractTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/marshaller/GridMarshallerAbstractTest.java b/modules/core/src/test/java/org/apache/ignite/marshaller/GridMarshallerAbstractTest.java
index 05a8924..10100e2 100644
--- a/modules/core/src/test/java/org/apache/ignite/marshaller/GridMarshallerAbstractTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/marshaller/GridMarshallerAbstractTest.java
@@ -74,6 +74,9 @@ import org.apache.ignite.testframework.GridTestClassLoader;
import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest;
import org.apache.ignite.thread.IgniteThread;
import org.jetbrains.annotations.Nullable;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.junit.runners.JUnit4;
import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL;
import static org.apache.ignite.events.EventType.EVTS_CACHE;
@@ -81,6 +84,7 @@ import static org.apache.ignite.events.EventType.EVTS_CACHE;
/**
* Common test for marshallers.
*/
+@RunWith(JUnit4.class)
public abstract class GridMarshallerAbstractTest extends GridCommonAbstractTest implements Serializable {
/** */
private static final String CACHE_NAME = "namedCache";
@@ -157,6 +161,7 @@ public abstract class GridMarshallerAbstractTest extends GridCommonAbstractTest
/**
* @throws Exception If failed.
*/
+ @Test
public void testDefaultCache() throws Exception {
IgniteCache<String, String> cache = grid().cache(DEFAULT_CACHE_NAME);
@@ -187,6 +192,7 @@ public abstract class GridMarshallerAbstractTest extends GridCommonAbstractTest
/**
* @throws Exception If failed.
*/
+ @Test
public void testNamedCache() throws Exception {
IgniteCache<String, String> cache = grid().cache(CACHE_NAME);
@@ -219,6 +225,7 @@ public abstract class GridMarshallerAbstractTest extends GridCommonAbstractTest
*
* @throws Exception If test failed.
*/
+ @Test
public void testMarshalling() throws Exception {
GridMarshallerTestBean inBean = newTestBean(new Object());
@@ -246,6 +253,7 @@ public abstract class GridMarshallerAbstractTest extends GridCommonAbstractTest
*
* @throws Exception If test failed.
*/
+ @Test
public void testMarshallingAnonymousClassInstance() throws Exception {
final Ignite g = grid();
@@ -283,6 +291,7 @@ public abstract class GridMarshallerAbstractTest extends GridCommonAbstractTest
*
* @throws Exception If test failed.
*/
+ @Test
public void testMarshallingLocalClassInstance() throws Exception {
/**
* Local class.
@@ -320,6 +329,7 @@ public abstract class GridMarshallerAbstractTest extends GridCommonAbstractTest
*
* @throws Exception If test failed.
*/
+ @Test
public void testMarshallingNestedClassInstance() throws Exception {
GridMarshallerTestBean inBean = newTestBean(new NestedClass());
@@ -347,6 +357,7 @@ public abstract class GridMarshallerAbstractTest extends GridCommonAbstractTest
*
* @throws Exception If test failed.
*/
+ @Test
public void testMarshallingStaticNestedClassInstance() throws Exception {
GridMarshallerTestBean inBean = newTestBean(new StaticNestedClass());
@@ -374,6 +385,7 @@ public abstract class GridMarshallerAbstractTest extends GridCommonAbstractTest
*
* @throws Exception If test failed.
*/
+ @Test
public void testMarshallingNullObject() throws Exception {
GridMarshallerTestBean inBean = newTestBean(null);
@@ -397,6 +409,7 @@ public abstract class GridMarshallerAbstractTest extends GridCommonAbstractTest
* @throws IgniteCheckedException If marshalling failed.
*/
@SuppressWarnings({"ZeroLengthArrayAllocation"})
+ @Test
public void testMarshallingArrayOfPrimitives() throws IgniteCheckedException {
char[] inChars = "vasya".toCharArray();
@@ -429,6 +442,7 @@ public abstract class GridMarshallerAbstractTest extends GridCommonAbstractTest
*
* @throws Exception If test failed.
*/
+ @Test
public void testExternalClassesMarshalling() throws Exception {
ClassLoader tstClsLdr = new GridTestClassLoader(
Collections.singletonMap("org/apache/ignite/p2p/p2p.properties", "resource=loaded"),
@@ -452,6 +466,7 @@ public abstract class GridMarshallerAbstractTest extends GridCommonAbstractTest
*
* @throws Exception If test failed.
*/
+ @Test
public void testGridKernalMarshalling() throws Exception {
GridMarshallerTestBean inBean = newTestBean(grid());
@@ -477,6 +492,7 @@ public abstract class GridMarshallerAbstractTest extends GridCommonAbstractTest
*
* @throws Exception If test failed.
*/
+ @Test
public void testSubgridMarshalling() throws Exception {
final Ignite ignite = grid();
@@ -507,6 +523,7 @@ public abstract class GridMarshallerAbstractTest extends GridCommonAbstractTest
*
* @throws Exception If test failed.
*/
+ @Test
public void testLoggerMarshalling() throws Exception {
GridMarshallerTestBean inBean = newTestBean(grid().log());
@@ -532,6 +549,7 @@ public abstract class GridMarshallerAbstractTest extends GridCommonAbstractTest
* @throws Exception If test failed.
*/
@SuppressWarnings("unchecked")
+ @Test
public void testNodeLocalMarshalling() throws Exception {
ConcurrentMap<String, String> loc = grid().cluster().nodeLocalMap();
@@ -568,6 +586,7 @@ public abstract class GridMarshallerAbstractTest extends GridCommonAbstractTest
*
* @throws Exception If test failed.
*/
+ @Test
public void testExecutorServiceMarshalling() throws Exception {
ExecutorService inSrvc = grid().executorService();
@@ -599,6 +618,7 @@ public abstract class GridMarshallerAbstractTest extends GridCommonAbstractTest
*
* @throws Exception If test failed.
*/
+ @Test
public void testKernalContext() throws Exception {
GridMarshallerTestBean inBean = newTestBean(GridKernalTestUtils.context(grid()));
@@ -621,6 +641,7 @@ public abstract class GridMarshallerAbstractTest extends GridCommonAbstractTest
/**
* @throws Exception If failed.
*/
+ @Test
public void testScheduler() throws Exception {
IgniteScheduler scheduler = grid().scheduler();
@@ -653,6 +674,7 @@ public abstract class GridMarshallerAbstractTest extends GridCommonAbstractTest
/**
* @throws Exception If failed.
*/
+ @Test
public void testCompute() throws Exception {
IgniteConfiguration cfg = optimize(getConfiguration("g1"));
@@ -693,6 +715,7 @@ public abstract class GridMarshallerAbstractTest extends GridCommonAbstractTest
/**
* @throws Exception If failed.
*/
+ @Test
public void testEvents() throws Exception {
IgniteConfiguration cfg = optimize(getConfiguration("g1"));
@@ -735,6 +758,7 @@ public abstract class GridMarshallerAbstractTest extends GridCommonAbstractTest
/**
* @throws Exception If failed.
*/
+ @Test
public void testMessaging() throws Exception {
IgniteConfiguration cfg = optimize(getConfiguration("g1"));
@@ -771,6 +795,7 @@ public abstract class GridMarshallerAbstractTest extends GridCommonAbstractTest
/**
* @throws Exception If failed.
*/
+ @Test
public void testServices() throws Exception {
IgniteConfiguration cfg = optimize(getConfiguration("g1"));
@@ -878,6 +903,7 @@ public abstract class GridMarshallerAbstractTest extends GridCommonAbstractTest
/**
* @throws Exception If failed.
*/
+ @Test
public void testReadArray() throws Exception {
byte[] arr = new byte[10];
@@ -894,6 +920,7 @@ public abstract class GridMarshallerAbstractTest extends GridCommonAbstractTest
/**
* @throws Exception If failed.
*/
+ @Test
public void testReadFully() throws Exception {
byte[] arr = new byte[10];
@@ -952,4 +979,4 @@ public abstract class GridMarshallerAbstractTest extends GridCommonAbstractTest
in.read(arr);
}
}
-}
\ 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/marshaller/GridMarshallerMappingConsistencyTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/marshaller/GridMarshallerMappingConsistencyTest.java b/modules/core/src/test/java/org/apache/ignite/marshaller/GridMarshallerMappingConsistencyTest.java
index ba39e36..d822891 100644
--- a/modules/core/src/test/java/org/apache/ignite/marshaller/GridMarshallerMappingConsistencyTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/marshaller/GridMarshallerMappingConsistencyTest.java
@@ -32,10 +32,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 GridMarshallerMappingConsistencyTest extends GridCommonAbstractTest {
/** Test cache name. */
private static final String CACHE_NAME = "cache";
@@ -101,6 +105,7 @@ public class GridMarshallerMappingConsistencyTest extends GridCommonAbstractTest
*
* @throws Exception If failed.
*/
+ @Test
public void testMappingsPersistedOnJoin() throws Exception {
Ignite g1 = startGrid(1);
Ignite g2 = startGrid(2);
@@ -140,6 +145,7 @@ public class GridMarshallerMappingConsistencyTest extends GridCommonAbstractTest
*
* @throws Exception If failed.
*/
+ @Test
public void testPersistedMappingsSharedOnJoin() throws Exception {
Ignite g1 = startGrid(1);
startGrid(2);
http://git-wip-us.apache.org/repos/asf/ignite/blob/f0544d46/modules/core/src/test/java/org/apache/ignite/marshaller/GridMarshallerPerformanceTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/marshaller/GridMarshallerPerformanceTest.java b/modules/core/src/test/java/org/apache/ignite/marshaller/GridMarshallerPerformanceTest.java
index c4e29c5..3a7df77 100644
--- a/modules/core/src/test/java/org/apache/ignite/marshaller/GridMarshallerPerformanceTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/marshaller/GridMarshallerPerformanceTest.java
@@ -45,10 +45,14 @@ import org.apache.ignite.internal.util.typedef.internal.U;
import org.apache.ignite.lang.IgniteInClosure;
import org.apache.ignite.lang.IgniteOutClosure;
import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.junit.runners.JUnit4;
/**
* Marshallers benchmark.
*/
+@RunWith(JUnit4.class)
public class GridMarshallerPerformanceTest extends GridCommonAbstractTest {
/** Number of iterations per test. */
private static final int ITER_CNT = 1 * 1000 * 1000;
@@ -64,6 +68,7 @@ public class GridMarshallerPerformanceTest extends GridCommonAbstractTest {
/**
* @throws Exception If failed.
*/
+ @Test
public void testSerialization() throws Exception {
final ByteArrayOutputStream out = new ByteArrayOutputStream();
@@ -112,6 +117,7 @@ public class GridMarshallerPerformanceTest extends GridCommonAbstractTest {
/**
* @throws Exception If failed.
*/
+ @Test
public void testGridMarshaller() throws Exception {
final GridTuple<byte[]> tuple = new GridTuple<>();
@@ -135,6 +141,7 @@ public class GridMarshallerPerformanceTest extends GridCommonAbstractTest {
/**
* @throws Exception If failed.
*/
+ @Test
public void testByteBuffer() throws Exception {
final ByteBuffer buf = ByteBuffer.allocate(1024);
@@ -160,6 +167,7 @@ public class GridMarshallerPerformanceTest extends GridCommonAbstractTest {
/**
* @throws Exception If failed.
*/
+ @Test
public void testKryo() throws Exception {
final Kryo kryo = new Kryo();
@@ -524,4 +532,4 @@ public class GridMarshallerPerformanceTest extends GridCommonAbstractTest {
list.equals(obj.list) && map.equals(obj.map);
}
}
-}
\ 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/marshaller/MarshallerContextSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/marshaller/MarshallerContextSelfTest.java b/modules/core/src/test/java/org/apache/ignite/marshaller/MarshallerContextSelfTest.java
index da474df..a7661b7 100644
--- a/modules/core/src/test/java/org/apache/ignite/marshaller/MarshallerContextSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/marshaller/MarshallerContextSelfTest.java
@@ -37,6 +37,9 @@ import org.apache.ignite.internal.processors.pool.PoolProcessor;
import org.apache.ignite.internal.util.typedef.internal.U;
import org.apache.ignite.testframework.junits.GridTestKernalContext;
import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.junit.runners.JUnit4;
import static java.nio.file.Files.readAllBytes;
import static org.apache.ignite.internal.MarshallerPlatformIds.JAVA_ID;
@@ -44,6 +47,7 @@ import static org.apache.ignite.internal.MarshallerPlatformIds.JAVA_ID;
/**
* Test marshaller context.
*/
+@RunWith(JUnit4.class)
public class MarshallerContextSelfTest extends GridCommonAbstractTest {
/** */
private GridTestKernalContext ctx;
@@ -71,6 +75,7 @@ public class MarshallerContextSelfTest extends GridCommonAbstractTest {
/**
* @throws Exception If failed.
*/
+ @Test
public void testClassName() throws Exception {
MarshallerContextImpl marshCtx = new MarshallerContextImpl(null, null);
@@ -96,6 +101,7 @@ public class MarshallerContextSelfTest extends GridCommonAbstractTest {
*
* @throws Exception If failed.
*/
+ @Test
public void testMultiplatformMappingsCollecting() throws Exception {
String nonJavaClassName = "random.platform.Mapping";
@@ -132,6 +138,7 @@ public class MarshallerContextSelfTest extends GridCommonAbstractTest {
*
* @throws Exception If failed.
*/
+ @Test
public void testMultiplatformMappingsDistributing() throws Exception {
String nonJavaClassName = "random.platform.Mapping";
@@ -155,6 +162,7 @@ public class MarshallerContextSelfTest extends GridCommonAbstractTest {
/**
* @throws Exception If failed.
*/
+ @Test
public void testOnUpdated() throws Exception {
File workDir = U.resolveWorkDirectory(U.defaultWorkDirectory(), "marshaller", false);
MarshallerContextImpl ctx = new MarshallerContextImpl(null, null);
@@ -187,6 +195,7 @@ public class MarshallerContextSelfTest extends GridCommonAbstractTest {
* Tests that there is a null value inserted in allCaches list
* if platform ids passed to marshaller cache were not sequential (like 0, 2).
*/
+ @Test
public void testCacheStructure0() throws Exception {
MarshallerContextImpl ctx = new MarshallerContextImpl(null, null);
@@ -220,6 +229,7 @@ public class MarshallerContextSelfTest extends GridCommonAbstractTest {
* Tests that there are no null values in allCaches list
* if platform ids passed to marshaller context were sequential.
*/
+ @Test
public void testCacheStructure1() throws Exception {
MarshallerContextImpl ctx = new MarshallerContextImpl(null, null);
http://git-wip-us.apache.org/repos/asf/ignite/blob/f0544d46/modules/core/src/test/java/org/apache/ignite/marshaller/MarshallerEnumDeadlockMultiJvmTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/marshaller/MarshallerEnumDeadlockMultiJvmTest.java b/modules/core/src/test/java/org/apache/ignite/marshaller/MarshallerEnumDeadlockMultiJvmTest.java
index 7042c03..2ff8106 100644
--- a/modules/core/src/test/java/org/apache/ignite/marshaller/MarshallerEnumDeadlockMultiJvmTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/marshaller/MarshallerEnumDeadlockMultiJvmTest.java
@@ -30,10 +30,14 @@ import org.apache.ignite.lang.IgniteCallable;
import org.apache.ignite.marshaller.jdk.JdkMarshaller;
import org.apache.ignite.resources.IgniteInstanceResource;
import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.junit.runners.JUnit4;
/**
* Contains test of Enum marshalling with various {@link Marshaller}s. See IGNITE-8547 for details.
*/
+@RunWith(JUnit4.class)
public class MarshallerEnumDeadlockMultiJvmTest extends GridCommonAbstractTest {
/** */
private Factory<Marshaller> marshFactory;
@@ -44,6 +48,7 @@ public class MarshallerEnumDeadlockMultiJvmTest extends GridCommonAbstractTest {
}
/** */
+ @Test
public void testJdkMarshaller() throws Exception {
marshFactory = new JdkMarshallerFactory();
@@ -51,6 +56,7 @@ public class MarshallerEnumDeadlockMultiJvmTest extends GridCommonAbstractTest {
}
/** */
+ @Test
public void testOptimizedMarshaller() throws Exception {
marshFactory = new OptimizedMarshallerFactory();
@@ -58,6 +64,7 @@ public class MarshallerEnumDeadlockMultiJvmTest extends GridCommonAbstractTest {
}
/** */
+ @Test
public void testBinaryMarshaller() throws Exception {
marshFactory = new BinaryMarshallerFactory();
http://git-wip-us.apache.org/repos/asf/ignite/blob/f0544d46/modules/core/src/test/java/org/apache/ignite/messaging/GridMessagingNoPeerClassLoadingSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/messaging/GridMessagingNoPeerClassLoadingSelfTest.java b/modules/core/src/test/java/org/apache/ignite/messaging/GridMessagingNoPeerClassLoadingSelfTest.java
index 4338947..e562000 100644
--- a/modules/core/src/test/java/org/apache/ignite/messaging/GridMessagingNoPeerClassLoadingSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/messaging/GridMessagingNoPeerClassLoadingSelfTest.java
@@ -27,11 +27,15 @@ import java.util.concurrent.atomic.AtomicBoolean;
import org.apache.ignite.configuration.IgniteConfiguration;
import org.apache.ignite.internal.util.typedef.P2;
import org.apache.ignite.testframework.config.GridTestProperties;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.junit.runners.JUnit4;
/**
* Tests for Messaging public API with disabled
* peer class loading.
*/
+@RunWith(JUnit4.class)
public class GridMessagingNoPeerClassLoadingSelfTest extends GridMessagingSelfTest {
/** */
private static CountDownLatch rcvLatch;
@@ -52,6 +56,7 @@ public class GridMessagingNoPeerClassLoadingSelfTest extends GridMessagingSelfTe
*
* @throws Exception If error occurs.
*/
+ @Test
@Override public void testSendMessageWithExternalClassLoader() throws Exception {
URL[] urls = new URL[] { new URL(GridTestProperties.getProperty("p2p.uri.cls")) };
@@ -92,4 +97,4 @@ public class GridMessagingNoPeerClassLoadingSelfTest extends GridMessagingSelfTe
*/
assertFalse(rcvLatch.await(3, TimeUnit.SECONDS));
}
-}
\ No newline at end of file
+}