Skip to content

Commit bd9050e

Browse files
WIP
1 parent 12bd760 commit bd9050e

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheMdcGetTest.java

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,20 +17,26 @@
1717

1818
package org.apache.ignite.internal.processors.cache;
1919

20+
import java.util.ArrayList;
2021
import java.util.Collections;
22+
import java.util.List;
2123
import java.util.UUID;
2224
import java.util.concurrent.ThreadLocalRandom;
2325
import org.apache.ignite.IgniteCache;
2426
import org.apache.ignite.IgniteSystemProperties;
27+
import org.apache.ignite.cache.CacheAtomicityMode;
2528
import org.apache.ignite.configuration.CacheConfiguration;
2629
import org.apache.ignite.configuration.IgniteConfiguration;
2730
import org.apache.ignite.internal.IgniteEx;
2831
import org.apache.ignite.internal.IgniteNodeAttributes;
2932
import org.apache.ignite.internal.TestRecordingCommunicationSpi;
3033
import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest;
3134
import org.junit.Test;
35+
import org.junit.runner.RunWith;
36+
import org.junit.runners.Parameterized;
3237

3338
/** */
39+
@RunWith(Parameterized.class)
3440
public class CacheMdcGetTest extends GridCommonAbstractTest {
3541
/** */
3642
private static final String DC_ID_0 = "DC0";
@@ -44,6 +50,22 @@ public class CacheMdcGetTest extends GridCommonAbstractTest {
4450
/** */
4551
private static final String VAL = "val";
4652

53+
/** */
54+
@Parameterized.Parameters(name = "atomicity={0}")
55+
public static Iterable<Object[]> data() {
56+
List<Object[]> res = new ArrayList<>();
57+
58+
for (CacheAtomicityMode mode : CacheAtomicityMode.values()) {
59+
res.add(new Object[] {mode});
60+
}
61+
62+
return res;
63+
}
64+
65+
/** */
66+
@Parameterized.Parameter()
67+
public CacheAtomicityMode atomicityMode;
68+
4769
/** {@inheritDoc} */
4870
@Override protected void afterTest() throws Exception {
4971
super.afterTest();
@@ -88,6 +110,7 @@ public void test() throws Exception {
88110
CacheConfiguration<Object, Object> ccfg = new CacheConfiguration<>(DEFAULT_CACHE_NAME);
89111

90112
ccfg.setBackups(1);
113+
ccfg.setAtomicityMode(atomicityMode);
91114

92115
IgniteCache<Object, Object> cache = client.createCache(ccfg);
93116

0 commit comments

Comments
 (0)